Level 3: String Variables
Work with text data using string variables.
📚Concept:
Strings are just text! Put any text inside quotes to make a string.
💡Example:
name = 'Python' # This is a string
print('Hello, ' + name) # Shows: Hello, Python# Even easier with f-strings:
print(f'Hello, {name}!') # Shows: Hello, Python!Use f'' to mix text with variables easily!
Task:
Create a variable called 'name' with your name, then print 'Hello, [name]!'
Python Code Editor
Ctrl+Enter to run • Ctrl+R to reset
Level 3 of 15