Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > Python
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 21st, 2014, 10:28 PM
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 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 )
Reply With Quote
The Following User Says Thank You to Randhir For This Useful Post:
  #2 (permalink)  
Old May 7th, 2016, 12:43 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
w3wp.exe shows 100% knm_nag Classic ASP Professional 3 March 18th, 2011 01: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 03: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 08:34 AM
Combobox that shows what's not in its list Mitch Access 6 September 18th, 2003 12:00 PM



All times are GMT -4. The time now is 12:48 PM.


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