## Python

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

This Forum Only

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!!!
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

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