Random Trivia Flashcards
1
Q
What does the following code achieve?
print(8) print(13, end=" ") print(21)
A
Prints one number on the first line, two numbers on the next line.
end=" "
is used to not skip to a new line
2
Q
What will the following Python code output?
print("Hello") print(" World!"
)
A
Hello _World!
( : denotes empty space)
print() statement by defaults prints from a new line and marks its termination with a new line character