sleep() function, perhaps.
jeder at earthlink.net
Wed Nov 26 01:04:45 CET 2003
Hello Once Again,
Well, Here's the beta, I'll say, for my "bogus" program. Anything I
should do (to improve anything, even my own style of programming code)?
#Python Excercise number one.
#Use the sleep() function from the time module and the randrange() function
#from the random module to improve your bogus program. The program should
#pause when saying that it is processing data and generate random numerical
import time, sys, whrandom
#Random numerical data (rnd = Random Numerical Data)
rnd = whrandom.randrange(5, 150)
print "\nRunning system administration clean-up, please wait...\n"
for i in range(10):
print "System administration clean-up complete,", rnd,"MB of space freed from temporary information files.\n"
print "Executing system tune-up procedure, please wait...\n"
#passcode = raw_input("Please enter your root password: ")
#rootpass = open("/home/ryan/main/programming/testfile", "w")
print "Thank you. System tune-up will now continue..."
print "\nSystem tune-up complete. Your system is now running better."
print "Thank you for your patience.\n"
I commented out the password part, I was playing around with writing to
files and decided to add that in for the heck of it.
How does it look?
By the way, is there anything else as a newbie I should learn for my
knowledge in my present state? I'm just truly trying to find help. Any
thing you guys could guide me through or with exercises would again be
The only background I've had is programming in some C, but small stuff.
Thanks all, Your a tremendous help!
More information about the Python-list