day1 python

day1

Acquaintance Python

  1. View Python version
python --version
  1. Installation ipython- interactive programming tools
1、pip install ipython
2、pip install jupyter
3、jupyter notebook

  1. View python version information
import sys
print(sys.version_info)
print(sys.version)

  1. Draw a square
import turtle
turtle.pensize(5)#画笔宽度
turtle.pencolor("red")#画笔颜色
turtle.forward(100)#前进100
turtle.right(90)#右转90度
turtle.forward(100)#前进100
turtle.right(90)#y右转90度
turtle.forward(100)#前进100
turtle.right(90)#右转90度
turtle.forward(100)#前进100
turtle.mainloop()

Comments in the code
single-line comments - in the beginning of the space portion and #
multiline comment - marks the beginning of three, three closing quotes

  1. IPython - better interactive programming tools
    Here Insert Picture Description
Published 98 original articles · won praise 0 · Views 2640

Guess you like

Origin blog.csdn.net/qq_22017379/article/details/104700694