Crunch some numbers. Predict the answer first, then run to check!
โก
Task 1: Power & Remainder
Easy
Print 7 to the power of 2, then print the remainder of 17 รท 5. Output:
49
2
print(7 ** 2)
print(17 % 5)
๐ฌ
Task 2: Candy Calculator
Medium
You have 4 bags with 25 candies each. Use variables bags and per_bag, multiply them, and print the total. It should be 100.
bags = 4
per_bag = 25
print(bags * per_bag)
๐ฑ
Task 3: Text Meets Numbers
Tricky
A variable count = "5" is text! Convert it to a number, add 3, then print the result followed by the word cats, like: 8 cats. (Hint: you'll need int() and str(), or an f-string.)
count = "5"
total = int(count) + 3
print(f"{total} cats")
๐ก๏ธ
Task 4: Free Play โ Temperature Converter
Creative
Convert a Celsius temperature to Fahrenheit with the formula F = C * 9/5 + 32. Change the celsius value and watch the result. Try 0, 100, and your room temperature!