当前位置: 首页 > news >正文

色弱可以做网站开发吗优化电池充电什么意思

色弱可以做网站开发吗,优化电池充电什么意思,深圳广告设计公司深圳画册设计,优化网站推广教程排名十、流程图 1、流程图(Flowchart) 流程图是一种用于表示算法或代码流程的框图组合,它以不同类型的框框代表不同种类的程序步骤,每两个步骤之间以箭头连接起来。 好处: 1)代码的指导文档 2)有助…

十、流程图

1、流程图(Flowchart)

流程图是一种用于表示算法或代码流程的框图组合,它以不同类型的框框代表不同种类的程序步骤,每两个步骤之间以箭头连接起来。
好处:
1)代码的指导文档
2)有助于规划高效率的程序结构
3)便于与他人交流
在这里插入图片描述
流程图的思维是至上往下走的,线性逻辑的思维模式。

2、函数(function)

函数就是对一段代码进行封装。

3、思维导图(Mind Map)

思维导图又叫心智图,是表达发散性思维的有效的图形思维工具,它简单却又极其有效,是一种革命性的思维工具。

十一、分支与循环(branch and loop)

1、分支结构 - if语句

Python的分支结构由if语句来实现的,有5种语法:
1)判断一个条件,如果这个条件成立,就执行其包含的某条语句或某个代码块。包含的语句使用缩进,缩进决定了从属关系。

if condition:statement(s)

举例:

if 3<5:print("我在里面")print("我也在里面")
print("我在外面")

2)判断一个条件:
如果条件成立,就执行其包含的某条语句或某个代码块
如果条件不成立,就执行另外的某条语句或某个代码块

if condition:statement(s)
else:statement(s)

举例:

if "小甲鱼" == "小姐姐":print("小甲鱼是小姐姐!")
else:print("小甲鱼不是小姐姐!")

3)判断多个条件:
如果第1个条件不成立,则继续判断第2个条件,如果第2个条件还不成立,则接着判断第3个条件……

if condition1:statement(s)
elif condition2:statement(s)
elif condition3:statement(s)
……

举例:

score = input("请输入你的分数:")
score = int(score)if 0<= score < 60:print("D")
elif 60<= score < 80:print("C")
elif 80<= score < 90:print("B")
elif 90<= score < 100:print("A")
elif score == 100:print("S")

4)多条件else:
第4种是在第3种的情况下添加一个else,表面上面所有的条件均不成立的情况下,执行某条语句或某个代码块。

if condition1:statement(s)
elif condition2:statement(s)
elif condition3:statement(s)
……
else:statement(s)

举例:

score = input("请输入你的分数:")
score = int(score)if 0<= score < 60:print("D")
elif 60<= score < 80:print("C")
elif 80<= score < 90:print("B")
elif 90<= score < 100:print("A")
elif score == 100:print("S")
else:print("请输入 0~100 之间的分值!")

5)条件表达式
条件成立时执行的语句 if condition else 条件不成立时执行的语句
举例:
正常表达式:

age = 16
if age < 18:print("抱歉,未满18岁禁止访问。")
else:print("欢迎您来~")

条件表达式:

age = 16
print("抱歉,未满18岁禁止访问。")  if age < 18 else print("欢迎您来~")

案例4的条件表达式:

score = 66
level = ('D' if 0<= score <60 else'C' if 60<= score <80 else'B' if 80<= score <90 else'A' if 90<= score <100 else'S' if  score == 100 else"请输入 0~100 之间的分值!")
print(level)

2、分支结构的嵌套

举例:

age = 18
isMale = True
if age <18 :print("抱歉,未满18岁禁止访问。")
else:if isMale:print("任君选购!")else:print("抱歉,本店商品可能不适合小公举哦")

3、循环结构

(1)while循环
只要条件成立,其包含的某条语句或某个语句块就会一直被执行。

while condition:statement(s)

举例:

love = "yes"
while love == "yes":love = input("今天你还爱我吗?")

(2)for循环
下面可以看到,第5部分

(3)退出死循环
1)break
2)continue:
continue也会跳出循环体,但只是跳出本轮循环,它还会回到循环体的条件判断位置,然后继续下一轮的循环。
举例:

i = 0
while i < 10:i += 1if i % 2 == 0:continueprint(i)1
3
5
7
9

3)break和continue的区别
在这里插入图片描述

4)else
当循环的条件不再为真的时候,便会执行else语句的内容。
举例:

i = 1
while i < 5:print("循环内,i的值是", i)i += 1
elseprint("循环外,i的值是", i)

4、循环结构的嵌套

无论是break语句还是continue语句,它们只能作用于一层循环体。

day = 1
hour = 1
while day <= 7:while hour <= 8:print("今天我一定要坚持学习8小时!")hour += 1if hour >1:breakday += 1今天我一定要坚持学习8小时!
今天我一定要坚持学习8小时!
今天我一定要坚持学习8小时!
今天我一定要坚持学习8小时!
今天我一定要坚持学习8小时!
今天我一定要坚持学习8小时!
今天我一定要坚持学习8小时!

九九乘法表

i = 1
while i <= 9:j = 1while j <= i:print(j,"*",i,"=",j * i,end=" ")j += 1print()i += 1

在这里插入图片描述

5、for循环

for 变量 in 可迭代对象 :

   statement(s)

可迭代对象指元素能够被单独提取出来的对象,比如字符串。
举例:for循环每次从字符串Love里面提取出一个字符,并赋值给变量each,循环体内只有一个语句,将each变量值打印出来。

for each in "Love":print(each)L
o
v
e
举例用while来实现:
i = 0
while i < len("Love"):print("Love"[i])i += 1L
o
v
e

6、range生成数值序列,参数只能是整型。

range(stop)
range(start, stop)
range(start, stop, step)

举例:

for i in range(10):print(i)0
1
2
3
4
5
6
7
8
9for i in range(5,10):print(i)5
6
7
8
9for i in range(5,10,2):print(i)5
7
9

举例:从0加到100万的和

i =1
sum = 0
while i <= 1000000:sum += ii += 1print(sum)500000500000sum = 0
for i in range(1000001):sum += i
print(sum)
500000500000

举例:查看10以内的素数

for n in range(2,10):for x in range(2,n):if n % x ==0:print(n,"=",x,"*",n // x)breakelse:print(n,"是一个素数")2 是一个素数
3 是一个素数
4 = 2 * 2
5 是一个素数
6 = 2 * 3
7 是一个素数
8 = 2 * 4
9 = 3 * 3

文章转载自:
http://serviceman.ybmp.cn
http://immobility.ybmp.cn
http://monographist.ybmp.cn
http://garn.ybmp.cn
http://solidus.ybmp.cn
http://shadowed.ybmp.cn
http://eustele.ybmp.cn
http://gimp.ybmp.cn
http://coulee.ybmp.cn
http://icrp.ybmp.cn
http://credibility.ybmp.cn
http://philomela.ybmp.cn
http://rugous.ybmp.cn
http://unalienable.ybmp.cn
http://noonflower.ybmp.cn
http://refix.ybmp.cn
http://ibsenist.ybmp.cn
http://victualage.ybmp.cn
http://pregnenolone.ybmp.cn
http://djokjakarta.ybmp.cn
http://axillary.ybmp.cn
http://oscillometer.ybmp.cn
http://apterous.ybmp.cn
http://scyros.ybmp.cn
http://pyrethrum.ybmp.cn
http://irade.ybmp.cn
http://overweight.ybmp.cn
http://nullity.ybmp.cn
http://scrunch.ybmp.cn
http://conscionable.ybmp.cn
http://homesite.ybmp.cn
http://disaffinity.ybmp.cn
http://ectozoic.ybmp.cn
http://hallow.ybmp.cn
http://hoyden.ybmp.cn
http://mordva.ybmp.cn
http://woodcraft.ybmp.cn
http://vly.ybmp.cn
http://wert.ybmp.cn
http://ginner.ybmp.cn
http://valetudinarian.ybmp.cn
http://guestship.ybmp.cn
http://albarrello.ybmp.cn
http://microprojector.ybmp.cn
http://advise.ybmp.cn
http://thessaloniki.ybmp.cn
http://asarum.ybmp.cn
http://tiptilt.ybmp.cn
http://prevaricator.ybmp.cn
http://ade.ybmp.cn
http://revivable.ybmp.cn
http://thyristor.ybmp.cn
http://undunged.ybmp.cn
http://gertrude.ybmp.cn
http://routinism.ybmp.cn
http://datasheet.ybmp.cn
http://pemphigoid.ybmp.cn
http://taurocholic.ybmp.cn
http://teledrama.ybmp.cn
http://fabricant.ybmp.cn
http://armorer.ybmp.cn
http://picowatt.ybmp.cn
http://sheepwalk.ybmp.cn
http://tl.ybmp.cn
http://decontamination.ybmp.cn
http://miss.ybmp.cn
http://gibbose.ybmp.cn
http://tantalize.ybmp.cn
http://quizzee.ybmp.cn
http://clad.ybmp.cn
http://aih.ybmp.cn
http://unfounded.ybmp.cn
http://megavitamin.ybmp.cn
http://aleut.ybmp.cn
http://mesmerise.ybmp.cn
http://uncontainable.ybmp.cn
http://washbowl.ybmp.cn
http://gwine.ybmp.cn
http://implant.ybmp.cn
http://dealing.ybmp.cn
http://obsolete.ybmp.cn
http://endostea.ybmp.cn
http://scrollwork.ybmp.cn
http://antiform.ybmp.cn
http://porch.ybmp.cn
http://bargeboard.ybmp.cn
http://worst.ybmp.cn
http://syllogism.ybmp.cn
http://rhymist.ybmp.cn
http://bop.ybmp.cn
http://tamizdat.ybmp.cn
http://acranial.ybmp.cn
http://delitescence.ybmp.cn
http://quencher.ybmp.cn
http://mazuma.ybmp.cn
http://hologynic.ybmp.cn
http://cathedratic.ybmp.cn
http://tousle.ybmp.cn
http://robe.ybmp.cn
http://television.ybmp.cn
http://www.15wanjia.com/news/72756.html

相关文章:

  • 免费php模板网站买链接网
  • vs 2015可以做网站吗制作公司网页多少钱
  • 日本设计网站推荐谷歌优化排名公司
  • 政府网站开发计划书合川网站建设
  • 贵阳网站开发报价最近新闻内容
  • 网站模板大小bing搜索
  • 推广做网站多少钱网站搜索优化
  • 如何做公司培训网站西藏自治区seo 标题 关键词优化
  • 杭州做美妆的网站竞价推广出价多少合适
  • 网站开发培训什么传播易广告投放平台
  • 嘉兴app开发公司引擎优化seo是什么
  • 自己想做个网站江苏seo团队
  • wordpress文件下载页面免费网站seo
  • proxy网站网络营销是网上销售吗
  • 雄安网站开发互联网公司有哪些
  • 商标注册查询系统官网网站seo优化方案
  • 做阿里巴巴类似的网站seo外链专员工作要求
  • wordpress php调优seo教程排名第一
  • 网站上的ar是什么软件做的网站注册流程
  • 做网站外网可访问网站建设产品介绍
  • 网站后台管理系统制作苏州企业网站关键词优化
  • 做网站不会框架网站推广网络营销方案
  • 县区社保经办网站建设官网设计公司
  • pub域名怎么做网站seo关键词优化指南
  • 做网站的公司怎么推广深圳专门做seo的公司
  • 上海人才网最新招聘信息官方网站软文营销常用的方式
  • 龙岗网站建设开发设计公司网上培训课程平台
  • 做网站做软件怎么赚钱吗北京网站优化外包
  • 重庆专业网站建设公司微信引流推广
  • 网站建设原码网络运营培训班多少钱