Last active
February 5, 2019 23:55
-
-
Save XChrisUnknownX/0e63e304d8e7164150a16e1a5751368f to your computer and use it in GitHub Desktop.
You input the yearly salary you want and it breaks down how many pages you need at various rates (25 cents to 30 bucks), it also calculates the number of hours and workdays this would take assuming 20 pages an hour, 7-hour workdays.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rateset = [] | |
addrate = .25 | |
while 30 not in rateset: | |
rateset.append(addrate) | |
addrate += .25 | |
print("Test. Printing rateset on next line.") | |
print(rateset) | |
while True: | |
try: | |
salary = input("Input the yearly salary you would like to make: ") | |
salary = int(salary) | |
except: | |
continue | |
break | |
salarystring = str() | |
newfile = open("PagesCalculation.txt","w") | |
for i in range(0,len(rateset)): | |
rate = rateset[i] | |
pages = salary / rate | |
pagesstring = str(pages) | |
ratestring = str(rate) | |
salarystring = str(salary) | |
newfile.write("""In order to make $""") | |
newfile.write(salarystring) | |
newfile.write(" a year at $") | |
newfile.write(ratestring) | |
newfile.write(""" a page:""") | |
newfile.write(""" | |
""") | |
newfile.write("You need to complete ") | |
newfile.write(pagesstring) | |
newfile.write(" pages a year.") | |
newfile.write(""" | |
""") | |
newfile.write("At an average transcription speed of 20 pages an hour, this will take ") | |
hours = pages / 20 | |
hoursstring = str(hours) | |
newfile.write(hoursstring) | |
newfile.write(""" hours, which is the equivalent of """) | |
workdays = hours / 7 | |
workdaysstring = str(workdays) | |
newfile.write(workdaysstring) | |
newfile.write(""" 7-hour work days. | |
Keep in mind there are only 260 weekdays a year. | |
****************************** | |
""") | |
newfile.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment