Font size
WorksheetsPython Quiz: Hello World
Total questions: 8
Worksheet time: 8mins
What is the main purpose of programming languages?
To build houses
To play music
To instruct computers
To cook food
What is the main goal of the class?
To learn how to speak and write
To learn how to program and think logically
To learn how to draw
To learn how to cook
Which is a correct way to write "Hello World" in Python?
print('Hello World')
print("Hello World")
print(Hello, World)
print("Hello, World")
What does end=" " do in the print() function?
Adds the word inside the " " at the end of the line
Adds a space at the end
Adds a comma at the end
Adds a period at the end
What is the purpose of using end="" in the print() function?
To add a period at the end
To add a space at the end
To add a comma at the end
To keep it from skipping a line or add a word at the end
What will the output be for the code:
print("Cat", end=" ")
print("Dog")
Cat Dog
CatDog
Cat Dog
Catdog
What will the output be for the code:
print("Sun", end="")
print("Shine")
Sun: Shine
Sun Shine
SunShine
Sun, Shine
What will the following code print if the 'end' parameter is set to a single quote?
print("It's")
print("Fine")
It's
Fine
It's Fine
It'sFine
It's' Fine
