Python

Moderators: None (Apply to moderate this forum)
Number of threads: 473
Number of posts: 1172

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Beginner problem! Posted by johnk85 on 11 Jan 2003 at 11:52 PM
New to programming. How do i get this to work?

x = input ( "Please enter a number: " ) :print "The number doubled is: ", x * x

Thanks!!!
Report
Re: Beginner problem! Posted by infidel on 13 Jan 2003 at 8:25 AM
: New to programming. How do i get this to work?
:
: x = input ( "Please enter a number: " ) :print "The number doubled is: ", x * x

x = input ( "Please enter a number: " )
print "The number doubled is: ", x * x


Why did you put both statements on the same line separated by a colon?


infidel

Report
Re: Beginner problem! Posted by codfish on 29 Jan 2003 at 12:55 PM
New to programming. How do i get this to work?

x = input ( "Please enter a number: " ) :print "The number doubled is: ", x * x


You can also do this:

x = input ( "Please enter a number: " ) ; print "The number doubled is: ", x * x





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.