天天看點

python if else elif statement

name = input('what is your name?')

if name.endswith('zd'):

print("hello panzidong")

python if else elif statement

name = input('what is your name?')

if name.endswith('zd'):

print("hello panzidong")

else:

print("hello other")

python if else elif statement

num = input('Enter a number:')

if int(num)> 0:

print('the number is positive')

elif int(num) < 0:

print('the number is negative')

else:

print('the number is zero')

python if else elif statement

轉載于:https://www.cnblogs.com/lianghong881018/p/11078246.html