AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Python makes the choice

Week 6 · 1.4 Conditional statements in text-based programming · 3 lessons
Answers are for parents and teachers.
1
Write a Python program: ask for the number of pages in a book. If it is more than 100, print Long book, otherwise print Short book.
2
Say what is printed for the inputs 7 and 70.
Python
1percent = int(input("Battery? "))
2if percent < 10:
3    print("Low")
4else:
5    print("OK")
3
Plan an if statement in three steps for: print Bring a coat when the temperature is below 12.
4
Explain the difference between = and == in Python, with one example of each.
5
A pupil types Cairo with a small c and the program says Wrong. Explain why, and say how the program could be made fairer (for later).