Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python if Statement

# If the number is positive, we print an appropriate message

num = 3
if num > 0:
    print(num, "is a positive number.")
print("This is always printed.")

num = -1
if num > 0:
    print(num, "is a positive number.")
print("This is also always printed.")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Python #Statement
ADD COMMENT
Topic
Name
8+1 =