if语句实现猜年龄
伪代码
age_of_princal = 56
guess_age = int( input(">>:") )
if guess_age == age_of_princal then
print("yes")
else
print("no ")
真代码
smoke@smoke-GS70-2PC-Stealth:~/文档/DocumentFile/file/python_script$ vim guess_age.py
age_of_princal = 56
guess_age = int(    input(">>:") )
if guess_age == age_of_princal:
    print("Yes,you got it..")
else:
    print("No,it's wrong.")
smoke@smoke-GS70-2PC-Stealth:~/文档/DocumentFile/file/python_script$ python3.8 guess_age.py 
>>:23
No,it's wrong.
smoke@smoke-GS70-2PC-Stealth:~/文档/DocumentFile/file/python_script$ python3.8 guess_age.py 
>>:56
Yes,you got it..
 
                    
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号