Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if statement python

temperature = float(input('What is the temperature? '))
    if temperature > 70:
        print('Wear shorts.')
    else:
        print('Wear long pants.')
    print('Get some exercise outside.')
Source by anh.cs.luc.edu #
 
PREVIOUS NEXT
Tagged: #statement #python
ADD COMMENT
Topic
Name
9+3 =