所以我試圖做一個簡單的故障排除應用程序的手機和問題的解決方案,約5分鐘,我不能通過第4行時,用戶進入手機型號,它只是停止而不是繼續對話。我不知道爲什麼。任何幫助深表感謝。同樣在第6行,我很喜歡這樣做,以便當用戶寫出關於手機有什麼問題的文本時,它會選擇「破碎」,「破解」,「溼」等字樣,但我沒有任何線索如何再次,任何幫助,非常感謝!Python:打破手機故障排除應用程序
brand = raw_input("Please state your phone brand. ")
if brand.lower() == ("iphone"):
iphone = raw_input ("Please state the model. ")
if iphone.lower() == ("2G"):
iproblem2g = raw_input ("Please state your problem. ")
if iproblem2g.lower() == ("broken") or ("broke"):
ibroke = raw_input ("Is the hardware broken or the software? ")
if ibroke.lower() == ("hardware") or ("hard"):
print ("...")
您需要縮進第2行。 –
@pp_我認爲你的意思是第3行。就我的經驗而言,文本編輯並不是從0開始。:) – zondo
雖然這個問題與另一個問題有關係,但它不是重複的,而是超級集合。 這段代碼有很多問題可以解決。 – Xexeo