Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the default behavior of the print() function regarding the end character?
Think about what happens after you print something.
How can you change the end character in a print statement?
What do you write after the content in the print function?
What does the end parameter in print() control?
Think about what happens after your text is printed!
True or False: The default value of the end parameter is a space.
Consider what happens when you write 'print()' without specifying anything.
Create an interactive Python script that prompts a user for their name and age, printing 'Hello [name], you are [age] years old.' with a specific ending string.
Use input to gather information and remember to format the print statement correctly!
Write a loop that prints the even numbers from 2 to 10 on the same line, separated by commas using the end parameter.
Ensure your loop iterates correctly and check how the end parameter alters the output.
5 more questions in this section. Enroll free to practise them all.
Enroll free