Input Function Syntax
input(“Gather some input”)
Input Function defaults to:
String
Convert input to 1. integer; 2. float syntax
2.
float(input(“Gettin that input”))
If syntax
if condition :
(tab) statement1
(tab) statement2
(tab) etc.
3 general rules when using “If” statements
if-else statement
Used when we need an outcome for both True AND False conditions
if-else syntax
if condition :
(tab) trueStatement1
(tab) etc.
else :
(tab) falseStatement1
(tab) etc.
2 general rules for if-else statements
if-elif-else syntax
if condition :
(tab) statement
elif condition : (tab) statement ....................................... else : (tab) statement
*NOTE: if, elif, and else are all equally indented