I'm new to python and have to make a code to calculate pay/what type of work you did (part-time, overtime, etc.) My code is this:
hours=int(input("How many hours did you work?")) rate=int(input("What is your hourly rate?")) bonusr=int(input("What is your bonus rate?")) normaltotal=rate*hours bonus=rate*bonusr*(hours-40) pay+bonus=normaltotal+bonus if hours<32: print("You worked part-time") print(normaltotal) elif hours>32 and <=40: print("You worked Full-Time") print(normaltotal) elif hours>40: print("You worked over-time") print(pay+bonus) Im getting a syntax error for "elif hours>32 and <=40" and I'm not sure why
Would appreciate any help, Thanks!
https://stackoverflow.com/questions/66540511/what-mistake-am-i-making-with-syntax March 09, 2021 at 11:46AM
没有评论:
发表评论