2014-12-24 98 views
1

問題出在if語句無效的語法後if語句。請幫助。If語句Python 2.7.8,語法無效

print("Welcome to the Project Hotel ") 
print("Enter the following Pins to Enter the Following Areas : ") 
print("A = Pin for the Visitor Management is 1111") 
print("B = Pin for the Room Management is 2222") 
print("C = Pin for the Bill Management is 3333")  

A=int(input("Enter the 4-Digit Pin here - ")) 

If A==1111: 
    print("Welcome to the Visitor Management Section")  

if A==2222: 
    pass 

if A==3333: 
    print("Total Amount =(Total Room amount + Food amounts + Extras)") 
     print("VAT here is 4.5% * (Total Amount)") 
     print("Final Amount = Total amount + VAT") 
Hotel.close() 

回答

0

您在第一條if語句中使用了大寫字母I.

+0

哇我無法想象我做了這樣一個簡單的愚蠢的錯誤感謝糾正 –

3

「if」語句應該以小寫形式輸入。也檢查你的縮進,這可能是他們的問題。

+0

哇我無法想象我做了這樣一個簡單的愚蠢的錯誤感謝糾正 –