• There are a set of basic, intermediate and advanced tasks • These are in the following slides and also on Tgi Space • You may choose one or more of the following tasks but you must do at least one; it is recommended that you attempt to complete all from one section! • These tasks require Python which you can download from Python.org/getit (version 3.4.3)
Tudor Grange Academy
Homework tasks
a) Create a program in Python which takes a temperature input from you. If the temperature is greater than 25, the program informs you that you can remove your blazer. If it is less than or equal to 25, the program informs you that you have to keep it on b) Using a FOR loop create a program to output the 12 times table
c) Create a program in Python which asks a user for a secret password. The secret password is ‘foobar’. The program should use a WHILE loop to keep asking the user for the password until they get it right. It should print ‘Correct password” when they get it correct.
Tudor Grange Academy
Basic tasks
a) A weather station takes the temperature once an hour every hour over a 24 hour period. Create a program which allows the user to enter the temperature every hour so that the program can calculate the average temperature. Explain the device which would allow the weather station to take the temperature by itself. b) A student wants to know their average mark from their last 5 maths tests. Create a program to collect those 5 marks from the user and output the total and the average of those numbers. c) Improve the program so that the user can choose how many previous test marks they want to enter to get the average from.
Tudor Grange Academy
Intermediate tasks
• Click here to view the advanced tasks • (Word document HW2 Advanced tasks)
Tudor Grange Academy
Advanced tasks