python01(程序简单的输出)
打印字符串
print(“hello World !!!”)
打印整数
print(500)
打印变量
name = “自学”
print(“hello %s” % name)
input语句
con = input(“please input Content”)
print(“the input Content is %r” % con)
命令行执行文件:如下图所示
在pycharm中运行如下图所示:
print(“hello World !!!”)
print(500)
name = “自学”
print(“hello %s” % name)
con = input(“please input Content”)
print(“the input Content is %r” % con)
命令行执行文件:如下图所示
在pycharm中运行如下图所示: