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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

中斷和傳遞功能未正確處理

中斷和傳遞功能未正確處理

海綿寶寶撒 2021-03-18 14:15:00
函數(shù)break和pass似乎在正確的輸入下不會(huì)起作用,程序會(huì)停止,而在沒有正確輸入的情況下,程序決定不中斷而是打印字符串,告訴用戶有問題并繼續(xù)運(yùn)行。currency = str(raw_input ("""what currency would you like to covert: GBP, EURO, USD OR YEN?"""))exchange = str(raw_input("""what currency would you like in exchange? : GBP, EURO, USD OR YEN?                              """))amount = int(input("""how much would you like to convert?                      """))valid_input = ('EUR','eur','GBP','gbp' ,'USD','usd','JPY','jpy')while True:    if currency in valid_input and exchange in valid_input:        pass    else:        print("incorrect input, please restart program")        breakdecision = str(raw_input("""Please enter u for user input exchange rate or s for the preset exchange rate    """))if decision == "u" :    user_rate = raw_input("Please enter the current exchange rate")    exchange_value = int(amount) *  int(user_rate)    print ("At the user found exchange rate you will receive",exchange_value,exchange)    elif decision == "s" :    if currency  == "GBP" and exchange == "USD":        exchange_value= int(amount) * 1.6048        print ("At the preset exchange rate you will receive",exchange_value,exchange)    if currency  == "GBP" and exchange == "EUR":        exchange_value= int(amount) * 1.2399        print ("At the preset exchange rate you will receive",exchange_value,exchange)
查看完整描述

2 回答

?
慕的地10843

TA貢獻(xiàn)1785條經(jīng)驗(yàn) 獲得超8個(gè)贊

“中斷”僅在insinde開關(guān)中有效,并且持續(xù)/


查看完整回答
反對(duì) 回復(fù) 2021-03-23
  • 2 回答
  • 0 關(guān)注
  • 166 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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