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
  Python Assignment 5.2 amos76823 3 117 Jan-17-2019, 07:34 AM
Last Post: perfringo
  Python for Everybody 3.3 assignment ramadan2099 5 204 Jan-09-2019, 09:10 PM
Last Post: ramadan2099
  Help for my assignment - Object Oriented Programming denizkb 5 152 Jan-05-2019, 06:43 PM
Last Post: stullis
  [split] Python for Everybody 5.2 assignment ramadan2099 2 164 Jan-05-2019, 12:54 PM
Last Post: ramadan2099
  help with assignment 3 Mof44 5 209 Dec-14-2018, 01:33 PM
Last Post: Mof44
  help with assignment 2 Mof44 4 259 Nov-29-2018, 08:26 PM
Last Post: Mof44
  help with assignment Mof44 9 404 Nov-18-2018, 11:58 PM
Last Post: Larz60+
  Need help on assignment sstonne 1 274 Nov-01-2018, 02:48 PM
Last Post: sstonne
  Dictionary based assignment: Need help RoyceJ 6 532 Aug-29-2018, 05:30 AM
Last Post: perfringo
  Trouble with "Weather Program" Assignment sarah_mb_sues 5 856 Aug-10-2018, 02:29 AM
Last Post: ichabod801

Forum Jump:


Users browsing this thread: 1 Guest(s)