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 separator for print()?
Think about how printed text appears when you separate words.
Write a print statement that uses sep to separate 'apple', 'banana', and 'cherry' with a comma.
Use a comma and space as the separator.
What does the sep parameter do in the print() function?
Think about how print organizes multiple items.
True or False: The default value for sep is a newline character.
Think about how items are shown together in a single print statement.
Write a program that takes three different colors as input and prints them in a line with a chosen separator provided by the user.
Use input to gather user details and split by space.
Create a print statement that combines your first name, last name, and age, all separated by a vertical bar ' | '. What output do you expect?
Think about how you would like to represent your information together.
5 more questions in this section. Enroll free to practise them all.
Enroll free