Section 5 Practice Tasks

Practice Tasks for Imported Commands

1. Create a program for logging into a system. Print a greeting then ask the user for their name. Wait 2 seconds then print “logging in” and the user’s name. Then print the current time (current hour and minute).


2. Ask the user to enter 4 different numbers. Then randomly select one of those numbers and print it.


3. Generate a random number between 3 and 8. Print this number then print the current minute and current second. Wait for the random number you generated then print the current minute and current second again. Your program could look like this:

screenshot-repl-it-2016-11-06-00-50-49


< Back to Section Five