top of page

Forum Comments

A quick review of sets and lists
In Introduction to Python
Steven
Jan 24, 2021
Yes, please do!
0
Senior2019-Set 4 - Recursive Functions and CNS 4
In ACSL Contest Prep
Steven
Nov 17, 2019
1. E 2. A 3. B
0
0
Senior2019-Set 3 - Recursive Functions and CNS 3
In ACSL Contest Prep
Steven
Nov 11, 2019
Content media
0
Senior2019-Set 3 - Recursive Functions and CNS 3
In ACSL Contest Prep
Steven
Nov 11, 2019
Content media
0
0
Senior2019-Set 2 - Recursive Functions and CNS 2
In ACSL Contest Prep
Steven
Nov 06, 2019
0
0
Python 1 - ACSL Timesheets
In AP Computer Science A
Steven
Sep 25, 2018
location = [int(input("please enter location 1:")), int(input("please enter location 2:")), int(input("please enter location 3:")), int(input("please enter location 4:"))] startTime = [input("please enter start time 1:"), input("please enter start time 2:"), input("please enter start time 3:"), input("please enter start time 4:")] endTime = [input("please enter ending time 1:"), input("please enter ending time 2:"), input("please enter ending time 3:"), input("please enter ending time 4:")] timecodes = ["1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H"] times = [9,9.5,10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,15,15.5,16,16.5,17] hoursWorked = [times[timecodes.index(endTime[0])] - times[timecodes.index(startTime[0])], times[timecodes.index(endTime[1])] - times[timecodes.index(startTime[1])], times[timecodes.index(endTime[2])] - times[timecodes.index(startTime[2])], times[timecodes.index(endTime[3])] - times[timecodes.index(startTime[3])]] moneyEarned = 0; for i in range (4): if location[i] <= 9: print ('${:,.2f}'.format(hoursWorked[i] * 10.0)) moneyEarned += hoursWorked[i] * 10.0 elif location[i] <= 19: if hoursWorked[i] <= 4: print ('${:,.2f}'.format(hoursWorked[i] * 8.0)) moneyEarned += hoursWorked[i] * 8.0 else: print ('${:,.2f}'.format(32 + (hoursWorked[i] - 4) * 12.0)) moneyEarned += 32 + (hoursWorked[i] - 4) * 12.0 else: if hoursWorked[i] <= 4: print ('${:,.2f}'.format(hoursWorked[i] * 12.0)) moneyEarned += hoursWorked[i] * 12.0 else: print ('${:,.2f}'.format(48 + (hoursWorked[i] - 4)* 24.0)) moneyEarned += 48 + (hoursWorked[i] - 4)* 24.0 print('${:,.2f}'.format(moneyEarned))
1
0

Steven

Admin
More actions
bottom of page