Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hours_per_week = [22, 17, 27, 40, 45]
- weeks = [48, 50, 42, 46, 43]
- hourly_pay = ['John,1', 'Eric,1.5', 'Terry,2', 'Michael,4', 'Graham,2']
- total_hrs = [i * x for i, x in zip(hours_per_week, weeks)]
- hourly_pay_rate = [float(i.split(',')[1]) for i in hourly_pay]
- hourly_pay_name = [i.split(',')[0] for i in hourly_pay]
- for hours, rate, name in zip(total_hrs, hourly_pay_rate, hourly_pay_name):
- print(f'{name} made {int(hours * rate):,} in {hours:,} hours')
Advertisement
Add Comment
Please, Sign In to add comment