Courses / Beginner
Python for Absolute Beginners
Variables, loops, functions and files, then a real project: a budget tracker that reads your bank's CSV export.
10 lessons9 hours612k learnersCertificate with Pro
Code you'll write
name = input("What is your name? ")
print(f"Hello, {name}! Welcome to Python.")
# Sum up a shopping list
prices = [2.49, 0.99, 5.25, 3.10]
total = 0
for price in prices:
total += price
print(f"Total: {total:.2f}") # Total: 11.83
def fahrenheit(celsius):
"""Convert a temperature to Fahrenheit."""
return celsius * 9 / 5 + 32
for c in (0, 21, 37, 100):
print(c, "°C =", fahrenheit(c), "°F")