摘要:
如何编写注释 在Python中,注释用井号(#)标识。井号后面的内容都会被Python解释器忽略 tuboshu 2022/3/30 #tuboshu 2022/3/30 print("学习如何编写注释 简洁 明了") 执行结果 学习如何编写注释 简洁 明了 进程已结束,退出代码为 0 阅读全文
摘要:
编写4个表达式,它们分别使用加法、减法、乘法和除法运算,但结果都是数字8。 print(2*4) print(6+2) print(8//1) print(12-4) print(round(8 / 1)) 执行结果 8 8 8 8 8 进程已结束,退出代码为 0 最喜欢的数字:将你最喜欢的数字存储 阅读全文
摘要:
个性化消息:将用户的姓名存到一个变量中,并向该用户显示一条消息。显示的消息应非常简单,如“Hello Eric, would you like to learn some Python today?”。 name = "Zxx" # 方法一 print("Hello"" " + name + ",w 阅读全文
摘要:
个性化消息:将用户的姓名存到一个变量中,并向该用户显示一条消息。显示的消息应非常简单,如“Hello Eric, would you like to learn some Python today?”。 栗子 name = "Zxx" #方法一 print("Hello"" " + name+",w 阅读全文