For this challenge you need to repeat a message a number of times.
- Using a for loop, repeat the message ‘Spam!’ 20 times.
- Use a time.sleep() and os.system(‘clear’) to make the message flash on and off the screen.
- Ask the user to what message they want to print out and print that out 20 times.
- Ask the user how many times they want to print out the message and repeat it that many times.
- Check that the user has entered a string input for the message at least 5 characters long and repeat the question as necessary.
- Check that the user has entered a number input for the times and repeat the question if necessary.
Challenge 18 – Rocket Takeoff
Create a program that prints out a countdown and then prints out blastoff!
- Your program should count down from 10 to zero, with a 1 second delay between each number
- Your program should finally say – ‘lift-off!’
- Your program should include an ASCII art rocket.
- Your ASCII art should be loaded from a separate file.
- Your ASCII art should be animated.
Challenge 19 – Number printer
- Your program should print all of the numbers between 1 and 100
- Your program should ask the user to input the 2 numbers(start and end) and print out all the numbers in between.
- Your program should ask the user whether they want to print out all the numbers, just odd numbers, or just even numbers and print out the corresponding numbers.
Challenge 20 – Lap time recorder
The aim of this challenge is to record race lap times for a racer.
- write a program that records the time in seconds taken to complete a lap of a race.
- You program should display the total time taken for the race
- Your program should display the lap number each time round.
- Your program should program should display the average lap time.
- You program should display the fastest and slowest lap time
- Your program should check if the user has entered a valid time for a lap. The program should keep asking until a valid time is entered.