p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Python (http://p2p.wrox.com/forumdisplay.php?f=197)
-   -   code shows error (http://p2p.wrox.com/showthread.php?t=91996)

Randhir January 21st, 2014 10:28 PM

code shows error
 
the code given in python chapter 4 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 give in the but after this code it shows the error
SyntaxError : invalid syntax (<pyshell#3>, line 3 )

santees May 6th, 2016 11:43 PM

add indents, a tab or 4 spaces in front of the print command !


All times are GMT -4. The time now is 04:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.