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
  [split] Python for Everybody 5.2 assignment jonchanzw 2 99 Jun-14-2019, 09:45 PM
Last Post: nilamo
  assignment help sammmy 4 191 Jun-11-2019, 06:17 PM
Last Post: micseydel
  Write pseudo code for a class assignment Scrimshot 3 242 May-07-2019, 05:38 PM
Last Post: Scrimshot
  Need help with my assignment please - game of Solitaire Muzz 2 287 Apr-09-2019, 03:48 PM
Last Post: Muzz
  [split] University Assignment Help needed Nomathemba 2 167 Apr-07-2019, 11:49 PM
Last Post: micseydel
  Powerball assignment, how to get correct output of a dictionary ? msp1981 5 236 Mar-19-2019, 11:02 PM
Last Post: Yoriz
  Help with homework assignment grayarea3 1 311 Feb-20-2019, 10:10 PM
Last Post: ichabod801
  Help with assignment dxfrelince 7 453 Feb-18-2019, 09:16 PM
Last Post: dxfrelince
  Need help with a tough school assignment datson79 5 337 Feb-18-2019, 06:01 PM
Last Post: ichabod801
  Need some help with a bit of code for an assignment. JackMercer50 1 219 Feb-09-2019, 04:13 PM
Last Post: stullis

Forum Jump:


Users browsing this thread: 1 Guest(s)