Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python for Everybody 3.1 assignment
#11
I will try
Quote
#12
Yes sorry micseydel is right, I overread that part. rate should be an input as well
The correct code is:
hours = float(input("Enter hours: "))
rate = float(input("Enter rate per hour: "))
ratePlus = rate * 1.5
 
if hours > 40:
    pay = 40 * rate + (hours - 40) * ratePlus
 
else:
    pay = hours * rate
 
print (pay)
ramadan2099 likes this post
Quote
#13
(Jan-07-2019, 12:12 PM)Mr_W Wrote: Yes sorry micseydel is right, I overread that part. rate should be an input as well
The correct code is:
hours = float(input("Enter hours: "))
rate = float(input("Enter rate per hour: "))
ratePlus = rate * 1.5
 
if hours > 40:
    pay = 40 * rate + (hours - 40) * ratePlus
 
else:
    pay = hours * rate
 
print (pay)

thank you my friend
It worked

(Jan-07-2019, 02:22 PM)ramadan2099 Wrote:
(Jan-07-2019, 12:12 PM)Mr_W Wrote: Yes sorry micseydel is right, I overread that part. rate should be an input as well
The correct code is:
hours = float(input("Enter hours: "))
rate = float(input("Enter rate per hour: "))
ratePlus = rate * 1.5
 
if hours > 40:
    pay = 40 * rate + (hours - 40) * ratePlus
 
else:
    pay = hours * rate
 
print (pay)

thank you my friend
It worked

whats wrong in my code here
İmage
Quote
#14
ramadan2099: it sounds like that's a different question, please start a new thread. Also, as I've said more than once, stop posting screenshots, start using code tags, start providing errors (are you getting a syntax error? it looks like it).
Quote
#15
(Jan-07-2019, 06:14 PM)micseydel Wrote: ramadan2099: it sounds like that's a different question, please start a new thread. Also, as I've said more than once, stop posting screenshots, start using code tags, start providing errors (are you getting a syntax error? it looks like it).

I am sorry
thanks
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Powerball assignment, how to get correct output of a dictionary ? msp1981 5 94 Mar-19-2019, 11:02 PM
Last Post: Yoriz
  Help with homework assignment grayarea3 1 178 Feb-20-2019, 10:10 PM
Last Post: ichabod801
  Help with assignment dxfrelince 7 301 Feb-18-2019, 09:16 PM
Last Post: dxfrelince
  Need help with a tough school assignment datson79 5 216 Feb-18-2019, 06:01 PM
Last Post: ichabod801
  Need some help with a bit of code for an assignment. JackMercer50 1 143 Feb-09-2019, 04:13 PM
Last Post: stullis
  Help with arrays assignment hyg71886 15 405 Jan-30-2019, 09:36 AM
Last Post: perfringo
  Python Assignment 5.2 amos76823 3 393 Jan-17-2019, 07:34 AM
Last Post: perfringo
  Python for Everybody 3.3 assignment ramadan2099 5 375 Jan-09-2019, 09:10 PM
Last Post: ramadan2099
  Help for my assignment - Object Oriented Programming denizkb 5 262 Jan-05-2019, 06:43 PM
Last Post: stullis
  [split] Python for Everybody 5.2 assignment ramadan2099 2 363 Jan-05-2019, 12:54 PM
Last Post: ramadan2099

Forum Jump:


Users browsing this thread: 1 Guest(s)