Python3笔记009 - 2.6 输入和输出

第2章 python语言基础

  • 2.1 python语法特点
  • 2.2 保留字与标识符
  • 2.3 变量
  • 2.4 数据类型
  • 2.5 运算符
  • 2.6 输入和输出

2.6 输入和输出

1、input()函数

name = input("请输入姓名:")
age = int(input("请输入年龄:"))

2、print()函数

print(6)
print("name")
print(a if a>b else b)
posted @ 2020-06-23 20:13  测试工匠麻辣烫  阅读(99)  评论(0编辑  收藏  举报