View Single Post
  #1 (permalink)  
Old January 21st, 2014, 11:12 PM
Randhir Randhir is offline
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2014
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default code shows error

the code given in chapter 4 page 59 shows error. whenever i try to enter the code below it says syntax error
Code:
milk_price = 1.50
if milk_price <1.25:
     print("Buy two cartons of milk,they're on sale")
     elif milk_price < 2.00:
i was suppose to enter the full code given in the book but after this code it shows the error
SyntaxError : invalid syntax (<pyshell#3>, line 3 )

Last edited by Randhir; January 22nd, 2014 at 12:36 AM.