Exercises

1. Student scores

Ask a student for their name and their score. Print out their name and their score. If their score is greater than 85, print out "Distinction". If their score is between 65 and 85, print out "Pass". Otherwise, print out "Fail".

2. List conditionals

Create an empty list called fruits. Ask the user to enter his favourite fruit and add it to the list. Now ask the user to enter his second favorite fruit and add it to the list. If the fruit he enters is already in the list, print "You already picked that fruit!". When finished entering fruits, print out the list.

3. FizzBuzz

Ask the user for a number. If the number is a multiple of 3, print "Fizz". If the number is a multiple of 5, print "Buzz". If the number is a multiple of both 3 and 5, print "FizzBuzz". Otherwise, print the number.