第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
  • 列表字典組合

    # coding=utf-8

    stus = []

    stu1 = {"no":"111","name":"張三","age":23,"nation":"漢","birthday":"1998-01-01","father":{"name":"張建國(guó)","company":"中國(guó)移動(dòng)","job":"客戶經(jīng)理"},"mother":{"name":"吳燕玲","company":"師大附中","job":"語(yǔ)文老師"}}

    stus.append(stu1)

    print(stus)

    name = stus[-1]["name"]

    print(name)


    stu2 = {"no":"112","name":"李四","age":23,"nation":"漢","birthday":"1998-01-01","father":{"name":"李建國(guó)","company":"中國(guó)聯(lián)通","job":"客戶經(jīng)理"},"mother":{"name":"張麗麗","company":"人民醫(yī)院","job":"外科醫(yī)生"}}

    stus.append(stu2)

    print(stus)


    name = stus[-1]["name"]

    print(name)

    fatherName = stus[-1]["father"]["name"]

    print(fatherName)

    http://img1.sycdn.imooc.com//6095464100019eea19080167.jpg

    查看全部
  • 列表字典組合

    # coding=utf-8

    stus = []

    stu1 = {"no":"111","name":"張三","age":23,"nation":"漢","birthday":"1998-01-01","father":{"name":"張建國(guó)","company":"中國(guó)移動(dòng)","job":"客戶經(jīng)理"},"mother":{"name":"吳燕玲","company":"師大附中","job":"語(yǔ)文老師"}}

    stus.append(stu1)

    print(stus)

    name = stus[-1]["name"]

    print(name)


    stu2 = {"no":"112","name":"李四","age":23,"nation":"漢","birthday":"1998-01-01","father":{"name":"李建國(guó)","company":"中國(guó)聯(lián)通","job":"客戶經(jīng)理"},"mother":{"name":"張麗麗","company":"人民醫(yī)院","job":"外科醫(yī)生"}}

    stus.append(stu2)

    print(stus)


    name = stus[-1]["name"]

    print(name)

    fatherName = stus[-1]["father"]["name"]

    print(fatherName)

    http://img1.sycdn.imooc.com//6095464100019eea19080167.jpg

    查看全部
  • 列表字典組合

    # coding=utf-8

    stus = []

    stu1 = {"no":"111","name":"張三","age":23,"nation":"漢","birthday":"1998-01-01","father":{"name":"張建國(guó)","company":"中國(guó)移動(dòng)","job":"客戶經(jīng)理"},"mother":{"name":"吳燕玲","company":"師大附中","job":"語(yǔ)文老師"}}

    stus.append(stu1)

    print(stus)

    name = stus[-1]["name"]

    print(name)


    stu2 = {"no":"112","name":"李四","age":23,"nation":"漢","birthday":"1998-01-01","father":{"name":"李建國(guó)","company":"中國(guó)聯(lián)通","job":"客戶經(jīng)理"},"mother":{"name":"張麗麗","company":"人民醫(yī)院","job":"外科醫(yī)生"}}

    stus.append(stu2)

    print(stus)


    name = stus[-1]["name"]

    print(name)

    fatherName = stus[-1]["father"]["name"]

    print(fatherName)

    http://img1.sycdn.imooc.com//6095464100019eea19080167.jpg

    查看全部
  • #鍵值對(duì)存儲(chǔ)key不能重復(fù),value可以重復(fù)

    # coding=utf-8

    lisa = {"name":"Lisa","age":23}

    print(lisa)

    print(lisa["age"])

    lisa["age"] = 26

    lisa["height"] = 166

    print(lisa)

    lisa.pop("age")

    print(lisa)

    http://img1.sycdn.imooc.com//60953fe9000134f203950149.jpg

    查看全部
    0 采集 收起 來(lái)源:字典的使用入門(mén)

    2021-05-07

  • 左閉右開(kāi)[0:2]取第一個(gè)和第二個(gè)

    反向索引最后一個(gè)下標(biāo)是-1

    # coding=utf-8

    books = ["紅樓夢(mèng)","三國(guó)演義","水滸傳","西游記","聊齋志異"]

    print(books[0:4])

    print(books[0:-1])

    http://img1.sycdn.imooc.com//6065e81700013a5a05740160.jpg

    查看全部
  • # coding=utf-8

    books = ["紅樓夢(mèng)","三國(guó)演義","水滸傳","西游記","聊齋志異"]

    print(books[0])

    http://img1.sycdn.imooc.com//6065e6ba00013c5004110107.jpg

    查看全部
  • int取整

    %取余

    # coding=utf-8

    n=154

    a=int(n/100)

    b=int(n%100/10)

    c=n%10

    print(a)

    print(b)

    print(c)

    re=a*a*a+b*b*b+c*c*c

    if n==re:

    print(n,end="")

    print("是水仙花數(shù)")

    else:

    print(n,end="")

    print("不是水仙花數(shù)")


    154除以100取余54,54除以10等于5.4取整為5

    http://img1.sycdn.imooc.com//6065e3fe0001a39705290138.jpg

    查看全部
  • # coding=utf-8

    score = 30

    if score >=60:

    print("考試通過(guò)!")

    if score >= 90:

    print("名列前茅,重點(diǎn)表?yè)P(yáng)")

    else:

    print("繼續(xù)努力,潛力巨大")

    else:

    print("考試未通過(guò),還需努力")

    http://img1.sycdn.imooc.com//6065e07a00019ec003260095.jpg


    注意縮進(jìn)

    查看全部
    0 采集 收起 來(lái)源:嵌套分支

    2021-04-01

  • 整型(整數(shù))不需要加雙引號(hào),加了雙引號(hào)就是字符串

    查看全部
  • 雙引號(hào)一定標(biāo)識(shí)字符串

    查看全部
  • # coding=utf-8

    la = "德語(yǔ)"

    if la == "德語(yǔ)" :

    print("Ich liebe dich")

    elif la == "韓語(yǔ)" :

    print("???")

    elif la == "英語(yǔ)" :

    print("I love you")


    else :

    print("我愛(ài)你")

    http://img1.sycdn.imooc.com//604a30900001eab202770092.jpg


    由于是用記事本打開(kāi)編輯的所以對(duì)編碼有要求最終保存為utf-8 文件開(kāi)頭對(duì)應(yīng)utf-8? ?猜測(cè)是這個(gè)原因,也許我用個(gè)正經(jīng)編輯器就不會(huì)這樣

    查看全部
    0 采集 收起 來(lái)源:多分支判斷

    2021-03-11

  • 注意 () not and or的優(yōu)先級(jí)


    # coding=gbk

    r1 = 1 != 1 or 8 < 2 and 6? > 3

    print(r1)

    r2 = 1 != 1 or not 8 < 1 and 6 > 3

    print(r2)

    r3 = 1 != 1 or not (8 < 1 and 6 > 3)

    print(r3)


    x = 700

    re = (1000 - x) * 30

    print(re)

    if(re >= 1 and re <= 10000) :

    print("結(jié)果落在區(qū)間內(nèi)")

    else :

    print("結(jié)果未落在區(qū)間內(nèi)")

    http://img1.sycdn.imooc.com//604a2a3600019e9404570151.jpg

    查看全部
    0 采集 收起 來(lái)源:邏輯運(yùn)算符

    2021-03-11

  • # coding=gbk

    x=1600

    re = (1000-x)*30

    print(re)

    if re >10000 :

    print("結(jié)果大于10000")

    else :

    print("結(jié)果小于10000")

    http://img1.sycdn.imooc.com//604a263d0001906b03120120.jpg

    True False? 首字母是大寫(xiě)的

    查看全部
  • # coding=gbk

    if 8 > 6 :

    print("判斷條件成立")

    else :

    print("判斷條件不成立")

    http://img1.sycdn.imooc.com//604a249300015d3e04120108.jpg

    查看全部
    0 采集 收起 來(lái)源:分支判斷

    2021-03-11

  • yntaxError: Non-ASCII character '\xe5' in file index.py on line 7, but no encoding declared; see http://python.org/dev/p


    開(kāi)頭加# -*- coding: UTF-8 -*-

    不好使就加#coding=gbk? 總有一款適合你

    http://img1.sycdn.imooc.com//604a233b0001c5e203010216.jpg

    查看全部
首頁(yè)上一頁(yè)12下一頁(yè)尾頁(yè)

舉報(bào)

0/150
提交
取消
課程須知
1、電腦下載安裝主流瀏覽器Google Chrome瀏覽器或360極速瀏覽器 2、有慕課網(wǎng)官網(wǎng)https://class.imooc.com/ 3、課程需要的在線編譯環(huán)境:https://wiki.imooc.com/section/morerun/1472.html
老師告訴你能學(xué)到什么?
1、掌握Python的基礎(chǔ)知識(shí) 2、學(xué)會(huì)用Python解決實(shí)際問(wèn)題 3、了解Python開(kāi)發(fā)思維

微信掃碼,參與3人拼團(tuán)

微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

友情提示:

您好,此課程屬于遷移課程,您已購(gòu)買(mǎi)該課程,無(wú)需重復(fù)購(gòu)買(mǎi),感謝您對(duì)慕課網(wǎng)的支持!