Beginner problem! - Programmers Heaven

Howdy, Stranger!

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

Categories

Beginner problem!

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

Comments

  • infidelinfidel 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]

  • codfishcodfish 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


Sign In or Register to comment.