pyhon if else如何嵌套if else

时间:2026-02-15 11:19:23

1、第一行代码输入age = 18

pyhon if else如何嵌套if else

2、第二行代码输入 name = 'TOM'

pyhon if else如何嵌套if else

3、第三行代码输入weight = 75.5

pyhon if else如何嵌套if else

4、第四行代码输入stu_id = 1

pyhon if else如何嵌套if else

5、第五行代码输入

if money ==1:

    print('土豪请上车')

   if seat  ==1:

    print('有空座,坐下了')

   else:

   print('没有空座,站着等......')

else:

print('朋友,没带钱,跟着跑,跑快点')

pyhon if else如何嵌套if else

© 2026 一点资料
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com