1 3 Python Python 2condaPython flask conda install
- Slides: 125
1. 3 Python版本的选择 第一章 Python基础 (2)conda对Python库的管理 这里仍然以安装、卸载flask框架为例,以及查看以及安装的库,命令如下: : > conda install flask : > conda uninstall flask : > conda list 29 of 31
1. 5 绘图 第一章 Python基础 1. 5. 3 利用turtle库提供的方法绘制图形 turtle. end_fill() #填充结束 #绘制一条紫色的直线 turtle. penup() turtle. goto(-300, 300) #画笔定位到坐标位置(-300, 300)处 turtle. pendown() turtle. color(0. 63, 0. 13, 0. 94) #设置画笔颜色,默认采用RGB小数值模式 turtle. seth(45) #设置画笔笔尖的方向,抬起 45度turtle. fd(100) #绘制一条蓝色的直线 turtle. penup() turtle. goto(-290, 370) #画笔定位到坐标位置(-290, 370)处 turtle. pendown() turtle. color((0, 0, 1)) #用元组表示RGB颜色值 turtle. right(90) #画笔笔尖右转 90度,面向行进方向右转 turtle. fd(100) turtle. hideturtle() #隐藏画笔箭头 92 of 31
1. 5 绘图 第一章 Python基础 1. 5. 3 利用turtle库提供的方法绘制图形 英文名称 RGB整数值 RGB小数值 中文名称 White 255, 255 1, 1, 1 白色 Yellow 255, 0 1, 1, 0 黄色 Magenta 255, 0, 255 1, 0, 1 洋红色 Cyan 0, 255 0, 1, 1 青色 Blue 0, 0, 255 0, 0, 1 蓝色 Black 0, 0, 0 黑色 Seshell 255, 245, 238 1, 0. 96, 0. 93 海贝色 Gold 255, 215, 0 1, 0. 84, 0 金色 Pink 255, 192, 203 1, 0. 75, 0. 80 粉红色 Brown 165, 42 0. 65, 0. 16 棕色 Purple 160, 32, 240 0. 63, 0. 13, 0. 94 紫色 Tomato 255, 99, 71 1, 0. 39, 0. 28 番茄色 94 of 31
1. 5 绘图 第一章 Python基础 1. 5. 3 利用turtle库提供的方法绘制图形 3. turtle全局控制方法可参见表 1 -7。 方法名称 作 用 turtle. title(s) 设置turtle绘图窗口标题信息,s为标题字符串 turtle. clear() 清空turtle窗口,但不改变当前画笔的位置 turtle. reset() 清空turtle窗口,并重置画笔位置为原点(0, 0) turtle. undo() 撤销上一个turtle动作 turtle. isvisible() 返回当前turtle是否可见 turtle. write(s[, move=False/True[, 将文本内容输出到当前画笔位置,可设置文本的字体格式。例如, align='left'/ 'right'/center'[, font=( turtle. write(s, move=False, align='left', font=('Arial', 8, fontname, fontsize, fonttype)]]]) 'normal')) 97 of 31
1. 5 绘图 第一章 Python基础 1. 5. 3 利用turtle库提供的方法绘制图形 turtle. circle(40) #绘制以 40为半径的圆 #绘制一个蓝色填充的五边形 turtle. penup() turtle. goto(-300, 300) #画笔定位到坐标位置(-300, 300)处 turtle. pendown() turtle. begin_fill() #为填充封闭图形做好准备 turtle. color("blue") #设置填充色为红色 turtle. circle(40, steps=5) #以 40为半径,绘制一个被圆括住的五边形 turtle. end_fill() #填充结束#输出文字 turtle. penup() turtle. goto(-340, 260) #画笔定位到坐标位置(-340, 260)处 turtle. pendown() turtle. color("Magenta") #设置输出的字体颜色 turtle. write("你觉得好看吗?", align='center', font=("微软雅黑", 18, "bold")) turtle. hideturtle() #隐藏画笔箭头 101 of 31
1. 6 函数 第一章 Python基础 1. 6. 2 函数的调用 【例1 -26】 默认参数示例。 def repeat_str(s, times = 1): #times为默认参数 repeat_strs = s * times #将字符串str重复times遍 return repeat_strs repeat_strings = repeat_str("Happy Birthday!") #此处调用函数时times使用的是默认值 print(repeat_strings) repeat_strings_2 = repeat_str("Happy Birthday!", 3) print(repeat_strings_2) 说明:默认参数后不能再出现非默认参数。示例如下: (1)f(a, b = 2) 这样定义合法! (2)f(b = 2, a) 这样定义非法!因为在默认参数后又出现了非默认参数a。 112 of 31
- Bertclient
- Beaker florence flask thermometer
- Trim_galore conda
- Conda sambamba
- Pip install python-constraint
- Microlack
- Superior mediastinum contents
- Laboratory flask
- Uses of cornical flask
- "concrete curing"
- Cope flask assembly
- Types of water sample
- Flask jaeger
- Boyle's air pump
- Flask data visualization
- Spallanzani experiment
- What glands are flask shaped with short ducts
- Graduated cylinder vs volumetric flask
- Urine flask
- How does a vacuum flask work
- Amoebiasis in babies
- Questions on density mass and volume
- Florence flask inventor
- Graduated glassware examples
- Install toi
- How to install system software
- Install eprints
- Install weka
- Sipp install
- Openrefine install
- Owasp bwa ova file
- How to install a pl259 connector
- Pyvirtualdisplay selenium
- Huawei fusion compute
- Install open gl
- Snortsnarf
- Kuo y yasu
- Install aware
- Xp virtual machine download
- Flemish bond t junction
- Dspace system requirements
- What is cgal
- Nj direct install program
- System install engineer asml
- Javafx 설치
- Instalar moodle en windows
- What are ways to install and maintain equipment
- Sublime text themes
- Toast install
- La ejecucion de grub install dev sda fallo
- Sap business one integration service install
- Gnu radio installation
- Dpctl dump-flows mininet
- Activate solver in excel
- Dspace training
- End fed antenna configuration
- How to install dig themes
- Install git jupyter notebook
- Mrtg monitoring tool
- How to install kok play on iphone
- Install aware
- Iis php install
- Tizen development kit
- Ansible offline installation
- Singularity install
- Modern honeynet
- Centos install valgrind
- Konfigurasi squid
- Maintop color management
- Cara install wordpress di localhost
- Gatech vlab
- Python send notification to android
- How to install shelx in olex2
- Phpmyadmin raspbian
- Cern print
- Gpio
- Imagick laragon
- Cac reader installation
- софт уни
- Yum clean all docker
- Sap b1 integration framework
- Gluster install
- Introduction to struts framework
- Registermoduledependences
- Windows builder
- Lab 3-5: install and configure dhcp and dns servers
- Embulk
- Py mol
- Install basemap
- Rcurl package install
- Msix installer
- Spectrum selfinstall
- Tsr install
- Wnc osq4g-01e2
- Install pox
- Visual studio android emulator hyper v
- Install wtp in eclipse
- Struktur database dns
- Wiring pi installieren
- Install hadoop on ubuntu virtualbox
- Open gl install
- Behat install
- Lab 3-9: testing mode: select and install memory
- Installing silt fence by hand
- Python paralel programlama
- Python event manager
- Discrete choice model python
- Mark hammond python
- Array and arraylist
- Python history and features
- Kegg python
- Python turtle flag code
- Primm python
- Python tipizacija
- дзен python
- Modular exponentiation in python
- X.split python
- Language
- Meaning of mutable in python
- Import numpy as np python
- Mnemonic variable in python
- Python minecraft hack
- Two way decision python
- Append vs extend python
- Minimum description length python
- Arabic wordnet python