wtf

1.简述变量的组成

会变化的量(状态--》描述某件事物的属性)

2.简述变量名的命名规则

变量名 赋值符号 (=)变量值

name='lidandan' #人的姓名

print(name)

a.变量名必须得具有意义

b.变量名以字母,数字,下划线组成,不能用数字开头

c.不能以关键字命名

3.简述注释的作用

a.单行注释,让后面的代码失效,解释器不解释该代码,就是普通的字符

b.代码行最后注释,就是解释前面的代码

c.多行注释用三单引号或者三双引号

4.使用turtle库构造一幅图,贴在markdown文档中

import turtle
turtle.setup(800,600)
#O
turtle.pensize(5)
turtle.pencolor("red")
turtle.pu()
turtle.bk(200)
turtle.pd()
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(50,360)
turtle.end_fill()

#L
turtle.pu()
turtle.fd(65)
turtle.seth(90)
turtle.fd(100)
turtle.pd()
turtle.left(180)
turtle.fd(100)
turtle.left(90)
turtle.fd(70)

#D
turtle.pu()
turtle.fd(15)
turtle.seth(90)
turtle.fd(100)
turtle.pd()
turtle.left(180)
turtle.fd(100)
turtle.left(90)
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(50,180)
turtle.end_fill()


#B
turtle.pu()
turtle.bk(65)
turtle.pd()
turtle.left(90)
turtle.fd(100)
turtle.left(90)
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(25,180)
turtle.end_fill()
turtle.right(180)
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(25,180)
turtle.end_fill()

#O
turtle.pu()
turtle.bk(100)
turtle.pd()
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(50,360)
turtle.end_fill()

#Y
turtle.pu()
turtle.bk(65)
turtle.pd()
turtle.seth(315)
turtle.fd(50)
turtle.seth(45)
turtle.fd(50)
turtle.pu()
turtle.bk(50)
turtle.pd()
turtle.seth(270)
turtle.fd(65)

turtle.done()

5.pycharm个性化设置

file --》 settings --》 editor --》general --》 change font size ···

file --》 settings --》 editor --》font --》 修改默认字体大小

file --》 settings --》 editor --》color Scheme --》 python --》monokai (背景颜色的配置)

file --》 settings --》 editor --》 general --》 code completion --》case sensitive completion --》 None

6.pycharm的快捷键

ctrl + v 粘贴

ctrl + c 复制

ctrl + a 全选

ctrl + x 剪切

ctrl + y 删除整行

ctrl + backspace 删除一个单词

shift + enter 换行

ctrl + f 搜索 --》 match case 匹配大小写;words 匹配单词(以空格区分单词)

ctrl + d 向下复制

ctrl + shift + r 全局搜索

shift + F10 运行上一次运行的文件

ctrl + shift + f10 运行当前文件

home 行首

crtl + home 行首

end 行尾

ctrl + end 文件尾

file --》settings --》 keymap --》

百度pycharm快捷键大全

posted on 2019-08-23 16:24  wtfss  阅读(120)  评论(0编辑  收藏  举报