name =input('Please enter your name:') print('hello,', name)
你好,刚开始也遇到了你这样的问题。 因为在代码文件的第一行我添加的内容不对。 你试下在你的代码第一行添加#!/usr/bin/env python3 这样就可以啦!
Sign in to make a reply
悟道为禅
name =input('Please enter your name:') print('hello,', name)
运行时一定要注意输入的名字要加'',例如'Michael'否则会报错
python中input输出“Name 'XXX' is not defined