|
萌新自学第一天,自学书籍是python编程快速上手,翻到第一章练习,抄写里面的编程内容就出了问题,怎么检查都找不到问题,求高手指点迷津。
代码内容:
# this program says hello and asks for my name.
print('hello world')
print('what is your name?') #ask for their name
myname=input('claude')
print('It is good to meet your,'+myname)
print('the length of your name is:')
print(len(myname))
print('what is your age?') #ask for their age
myage=input(27)
print('you will be '+str(int(myage)+1) +'in a year.')
运行结果:
Python 3.7.0a2 (v3.7.0a2:f7ac4fe, Oct 17 2017, 17:06:29) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================= RESTART: C:/Users/Lenovo/Desktop/greet.py =================
hello world
what is your name?
claude
|
|