import random # for generating random values
import time   # for pausing execution
import sys    # needed for pausing component
              # to work

# Here, DELAY represents the pause length,
# in seconds, after each * is printed
#
# For example, 0.05 would be 50 milliseconds
#
# If you like, you can change the value of
# this constant to something else, though I
# would not go over 0.5.  
DELAY = 0.05

count = 0      # Number files downloaded
answer = "yes" # User response to 
               # prompt to continue

# YOUR CODE STARTS HERE










# YOUR CODE ENDS HERE

print ()
print ("You downloaded", count, "files, total.")

Your will need to do the following things:
  1. Declare and initialize whatever variables you need for the program. (Already done for you.)
  2. Your program will have two loops, one nested inside the other.
  3. Your outer loop (Should this loop be a while or a for?) is responsible the following sequence of events:
  4. Your inner loop (Should this loop be a while or a for?) is what downloads the file. This involves printing a * character (without skipping to the next line) for each 1 million (of the file's total size) that gets downloaded and keeping track of the progress on downloading the file (so that you know when the download is complete.).
    If you want your program to behave like the in-class demonstration, after you print the * character, include the following two lines of code:
    sys.stdout.flush()
    time.sleep(DELAY)
  5. At the end, your program reports how many files total the user downloaded. (Already done for you.)
Note that because of user input and random values, the output will look different each time you run the program.

Program output example:

+ Expand Output
Downloading a file of 15149154 bytes.
****************COMPLETE!
Another file?  YES

Downloading a file of 32114196 bytes.
*********************************COMPLETE!
Another file?  YES

Downloading a file of 49946355 bytes.
...
        


In at least 150 words, please address the following questions in memo.txt:
  1. How did the process of creating these programs go for you?
  2. What were your main challenges and how did you overcome them?
  3. What did you learn that may be of use as you move along in this class?