Python Forum
Plz help Ive tried for hours and cant do these three problems - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Plz help Ive tried for hours and cant do these three problems (/thread-9008.html)



Plz help Ive tried for hours and cant do these three problems - VB4 - Mar-17-2018

So I am stuck on number 2 right now but if someone could help guide me it would be very appreciated. I cant figure out how to use an "if" statement with two variables. Im on python 3.6.

2) At the local sports store, footballs are priced at $30 each if fewer than six are purchased, $28 each if at least six but fewer than twelve are purchased, and $26 each if at least twelve are purchased. Write a program that accepts the input from the user of how many footballs he/she would like to purchase, and outputs the cost.

3) A company pays an employee $5 per hour if she works 40 hours or less. If she works more than 40 hours, she gets $9 per hour for each extra hour. Write a program that accepts the input being the number of hours worked (assume an integer), and outputs the employees pay.


RE: Plz help Ive tried for hours and cant do these three problems - micseydel - Mar-17-2018

What's the code you've tried?