python中的用戶輸入和while循環

input()和while循環 1. input()函數 2. while循環 1. input()函數 做用:能夠暫停程序,而後接受一個用戶輸入的參數(能夠向用戶顯示提示或者說明)。python name = input("請告訴我你的名字:") print(f"你好!{name},很高興認識你。") 結果: 請告訴我你的名字:小明 你好!小明,很高興認識你。 輸入的是數字,若是正常打印不會出錯
相關文章
相關標籤/搜索