Python入门教程
lidaboo
这个作者很懒,什么都没留下…
展开
-
Python入门教程一:Hello World
Python的入门print('hello, world') #最简单的入门,打印一句话hello, world运行结果原创 2016-10-13 21:17:41 · 289 阅读 · 0 评论 -
Python入门教程二:print进行数字运算
Python的入门print((10.6+2*4)/(32-3.2)) #print进行简单的数字运算运行结果原创 2016-10-13 21:22:20 · 2821 阅读 · 0 评论 -
Python入门教程三:显示'Welcome to Python'五次
显示’Welcome to Python’五次for count in range(5): print('Welcome to Python')或print('Welcome to Python')print('Welcome to Python')print('Welcome to Python')print('Welcome to Python')print('Welcome t原创 2016-10-14 20:35:24 · 3949 阅读 · 0 评论 -
Python入门教程四:绘制奥林匹克环的标志
Python绘制奥林匹克环的标志import turtleturtle.color("blue")turtle.penup()turtle.goto(-110, -25)turtle.pendown()turtle.circle(45)turtle.color("black")turtle.penup()turtle.goto(0, -25)turtle.pendown()turtl原创 2016-10-14 21:10:56 · 1333 阅读 · 0 评论 -
Python入门教程五:绘制十字
Python绘制十字import turtleturtle.penup()turtle.goto(-100, 0)turtle.pendown()turtle.color("red")turtle.forward(200)turtle.penup()turtle.goto(0, 100)turtle.pendown()turtle.right(90)turtle.forward(200)原创 2016-10-14 21:32:43 · 7471 阅读 · 0 评论 -
Python入门教程六:两个随机数相加
Python两个随机数相加import random #引入随机数的模块 # 产生两个随机整数(0-9)number1 = random.randint(0, 9)number2 = random.randint(0, 9)# 输入答案answer = eval(input("What is " + str(number1) + " + " + str(number2) + "?原创 2016-10-14 21:41:23 · 6330 阅读 · 0 评论