Python uses print() to output text. It’s one of the simplest and most readable languages.
Python
Learn Python for data science and backend development.
Hello World
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Your task: Print "Hello, World!" using the print() function
Click "Run" to execute your code...Which function prints output in Python?
SUMMARY
In this section, you learned how to print output to the console. Next, you'll learn how to declare variables and work with different data types.
Variables and Types
Python infers types automatically. No need to declare types explicitly!
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Your task: Create variables: name (string), age (int), is_learning (bool)
Click "Run" to execute your code...How do you check the type of a variable in Python?
SUMMARY
In this section, you learned how to declare variables and work with different data types. Next, you'll learn how to format strings using f-strings.
String Formatting
Python offers multiple ways to format strings. F-strings (Python 3.6+) are the most modern and readable.
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Your task: Use an f-string to print "Welcome, Pythonista!"
Click "Run" to execute your code...What prefix is used for f-strings in Python?
SUMMARY
In this section, you learned how to format strings using f-strings. Next, you'll learn how to perform mathematical operations.
Unlock 10 More Lessons
You've completed the free preview! Upgrade to Pro to access all 12 lessons in this course, plus advanced projects and certificates.
- Arithmetic Operations
- Conditionals
- For Loops
- While Loops
- Functions
- Lists
- Dictionaries
- List Comprehensions
- Final Project: Student Grade Manager