Why won't this run?

Mike S mscir at yahoo.com
Thu Nov 19 22:26:49 EST 2015


On 11/15/2015 12:38 PM, jbak36 wrote:
> Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32
> Type "copyright", "credits" or "license()" for more information.
>>>> #this program says hello and asks for my name
>>>> print:('Hello world!')
> Hello world!
>>>> print:('What is your name?') #ask for their name
> What is your name?
>>>> myName = input()
> print:('It is good to meet you,'+myName)
>>>> print:('The length of your name is:')
> The length of your name is:
>>>> print:(len(myName))
> 39
>>>> print:('What is your age?')#ask for their age
> What is your age?
>>>> myAge=input()
> print:('You will be ' + str(int(myAge)+1)'in a year.')

 >>> print("Hello World")
Hello World
 >>> myname=input("What is your name? ")
What is your name? John
 >>> print ("Your name is ", myname)
Your name is  John

...you can find code samples in the *quick tutorial listed here: 
https://wiki.python.org/moin/BeginnersGuide/Programmers
*http://hetland.org/writing/instant-python.html



More information about the Python-list mailing list