#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# Beginner problem!

Posts: 63Member
New to programming. How do i get this to work?

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

Thanks!!!
· ·

• Posts: 2,900Member
: New to programming. How do i get this to work?
:
: x = input ( "Please enter a number: " ) :print "The number doubled is: ", x * x

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

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

[size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

· ·
• Posts: 2Member
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

· ·