print
’s keyword
argumentsWhich of the following is printed by:
print("B", "C", "D", "BR", sep="A")
What is printed by the following code?
print("Name: ", end="\n---\n")
print("Date:", end="\n---\n")
What does the following program print?
= 31
a = a // 4
b = (5 % b) - 1.0
c print("a", a ** 0, sep=": ", end="; ")
print("b", b - 4, sep=": ", end="; ")
print("c", c * 2, sep=": ")
Prompt the user for three numbers and print their sum without
spaces between the numbers and operators, using what you learned about
the print
function’s keyword arguments.
Enter the first number: 4
Enter the second number: 2.4
Enter the third number: 8.6
4.0+2.4+8.6=15.0
2^0: 1
2^1: 2
2^2: 4
2^3: 8
2^4: 16
2^5: 32
2^6: 64
2^7: 128