Day -6 条件式

python 条件式 if,注意 python run code 是 依据 code 排版 ,前後顺序要正确不然有可能出现错误。

https://ithelp.ithome.com.tw/upload/images/20210919/20130598IqTiGRuY6s.png

  • if elif else 范例如下:

https://ithelp.ithome.com.tw/upload/images/20210919/2013059853F9Kj4ilR.png

  • if-else
    https://ithelp.ithome.com.tw/upload/images/20210919/20130598mjz2tvZ2eT.png

https://ithelp.ithome.com.tw/upload/images/20210919/20130598xPrwajSWEf.png

-多个条件时
and:所有条件都成立才为True,否则为False
or: 任一条件成立就为True,否则为False

https://ithelp.ithome.com.tw/upload/images/20210919/20130598eypbN6LbIC.png

  • in来做判断
    https://ithelp.ithome.com.tw/upload/images/20210919/20130598F1xbEBObmp.png

<<:  Day06 - 根据需求画出 Flowchart 或是 State Diagram

>>:  输出的重要性

Day30 结语

不知不觉已经到了这个挑战的终点,现在回头看,应该有比刚开始的自己更进步了吧! 想当初参加这比赛时,因...

Day10 iPhone捷径-位置Part2

Hello 大家, 废话不多说赶紧赶紧进入主题吧! 今天从叫车开始说起~ 这个动作要设定的参数有三个...

css visibility

今天介绍visibility的两个属性:visible和hidden visibility只控制物件...

[Python 爬虫这样学,一定是大拇指拉!] DAY24 - 实战演练:伪装

伪装 伪装!?爬虫还要伪装喔? 是的,不知道各位还记不记得在"关於爬虫"有提到过: 爬虫存取网站的过...

Day6 让 scheduler 规划未来

Day6 让 scheduler 规划未来 tags: 铁人赛 前言 昨天讲到了行程的生老死别,那麽...