Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What will be the output of this code: print('Hello, ' + 'Python!')
It's a simple greeting.
Concatenate 'Goodbye, ' with 'Friend.' What do you get?
Think about how strings are joined together.
What will this code print: print('Hello, ' + 'there!')?
Look for spaces and punctuation.
Can you concatenate a string and a number directly in Python?
Think about data types.
You have the variables: name = 'Alice', age = 22, hobby = 'painting'. Write a print statement that outputs: 'Alice is 22 years old and likes painting.'
Ensure all parts are properly concatenated.
Create a dynamic greeting using input values: name = input('Enter your name: '), greet = 'Welcome'. Output should be 'Welcome, [name]!'
Don't forget to ensure user input is treated correctly!
6 more questions in this section. Enroll free to practise them all.
Enroll free