# 身份運算符: is not is 判斷同一個對象 a 和 b a=4 b=4 id內存地址 值是不是相等==
# 對象 is 值相等 ==
# 數字的類型age 轉換類型 強轉
age = int(input('請輸入你的年齡:'))
print(int(age),type(int(age)))
if age>=18:
print('允許你進入網吧')
else:
print('回去睡覺')
grade = 90
if grade >= 90:
print('你是最棒的')
elif grade >= 80:
print("你是棒棒的")
elif grade >= 70:
print('加油,好自為之')
i = 0
while i <= 10:
print(i)
if i == 3:
continue
i += 1
# while循環後面加else,循環完了會執行else的代碼,如果循環中間停止了,不會打印else
''' while 條件: 循環語句 else: 語句 '''
i = 1
while i <= 5:
print('hello world')
if i == 3:
break
i += 1
else:
print('循環結束')
In daily work , We often use t