Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Open Source > Python
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Python section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 21st, 2014, 10:28 PM
Registered User
Join Date: Jan 2014
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default code shows error

the code given in python chapter 4 shows error. whenever i try to enter the code below it says syntax error
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 )
The Following User Says Thank You to Randhir For This Useful Post:
Old May 6th, 2016, 11:43 PM
Registered User
Join Date: May 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
w3wp.exe shows 100% knm_nag Classic ASP Professional 3 March 18th, 2011 12:50 AM
no image shows i_m_9415 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 May 12th, 2010 02:57 AM
imap_open() shows page cannot dispalyed vibinkrish Pro PHP 0 March 1st, 2006 11:18 AM
Shows monthly records leion General .NET 1 May 14th, 2004 07:34 AM
Combobox that shows what's not in its list Mitch Access 6 September 18th, 2003 11:00 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.