#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    12
    Rep Power
    0
    Your code isn't formatted well in your post. Are your indentations even correct? It is impossible to tell.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    2
    Rep Power
    0
    i changed the formatting but yes I do believe they are.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2010
    Posts
    18
    Rep Power
    0
    Code:
    def main():
    
    
        name_product = (input('What is the name of the product you are ordering?'))
        weight = int(input("Please enter the amount in pounds your product weighs:"))
    
    
        shiprt (name_product, weight)
    
    def shiprt (name_p, wgt):
    
        if wgt < 10:
            shiprt = 1.50
        elif wgt > 10 and wgt < 25:
            shiprt = 1.45
        else:
            shiprt = 1.40
    
        total = wgt * shiprt
    
        print()
        print ("The product you ordered is {0}".format(name_p))
        print ("The weight of your shipment is {0:.2f} pounds".format(wgt))
        print ("The total price is ${0:.2f}".format(total))
    
    main()
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    2
    Rep Power
    0
    hey man thanks, i really appreciate that

IMN logo majestic logo threadwatch logo seochat tools logo