So, I am something of a beginner, and am writing a script for class. The original assignment was simply to create an income calculator. For that, my code looked like so:
print ("Welcome to SoftwarePirate Inc. payroll check system deluxe.")
employee=input("Enter your name:")
hours=float(input("Enter your hours worked per week:"))
while hours<10:
print("Invalid value. Please enter a value of 10 or greater.")
hours=float(input("Enter your hours worked per week:"))
rate=float(input("Enter your hourly pay rate:"))
while rate<9:
print("Invalid value. Please enter an hourly wage greater than 9.")
rate=float(input("Enter your hourly pay rate:"))
gross=(hours*rate*52)
However, I now want to be able to prompt an infinite number of users for input. With ym current knowledge, I am unable to do this, as if I create a while loop it will override my variables each time. For example, if the first employee is names Jack, and he inputs a value for the variable hours, that value will then be replaced by the input given by Jill, the second user around. I want to be able to store all my variable values as unique.
I do not know enough about the problem at hand to begin knowing where to look.
Help!!
repduplicate flag somehow. – Morgan Thrapp Oct 16 '15 at 14:18