x is 100
FalseandTrueTrueFalseFalse>> True
>> False
>> False
>> Falseand
>> TrueorTrueTrue
>> True
>> True
>> False
>> Falseandor
>> TrueTrue1==1TrueFalsenotTrueFalsenot
>> False
>> TrueConditional Statements ifelifelseconditional statementscontrol structurepseudocode
>> Hello, America!if-statementif-statementifTrueelse-statementelse-statementelseif-statementFalseif-else statementHello, America!if-statementTruehomeCanadaif-statementFalseelse-statementHello, World!
>> Hello, World!if-statement
>> Hello, America!if-statement
>> The number is 2.if-statementTrueTrueFalseif-statementif-statement
>> The number is even.
>> 21x + yif-statementsTrueelse-statementif-else statementelifelif-statementselifelif-statementsif-else statementif-else statementelif-statementsif-statementTrueFalseelif-statementelif-statementTrueelif-statementsTrueelse-statementif-else statementelif-statements
>> Hello, Thailand!elif-statementsTrueelse-statement
>> Hello, World!if-statementselif-statements
>> I dont know!Statements statementsimple statementscompound statements
>> x is 100!
>> x is even!
>> Hello, World!
>> 4if-statementsif-else statementsHello, World!clausesheadersuite(s)Hello, World!
>> Hello, World!forprint("Hello, World!")Hello, World!if-else statementsif-statementelse-statementif-elseif-statementTrueif-statementelse-statementif-statementFalseif-statementelse-statement
>> Hello, World!
>> Hello, World!
…
>> I dont know!
>> x is 100!
>> x is even!
>> MichaelVocabulary Comment
>> Jordan
Keyword
Data type
Object
Str
Stringstr
Character
Int
Integerint
Float
Floating-point numberfloat
Bool
BooleanboolTrueFalse
NoneType
NoneNoneTypeNone
Constant
Variable
Assignment operator=
Increment
Decrement
Syntax
Syntax error
Exception
Operator
Arithmetic operator
Operand
Expression
Order of operations
Comparison operatorTrueFalse
Logical operatorTrueFalse
Conditional statement
Control structure
Pseudocode
if-else statement
if-statementif-else statement
else-statementif-else statement
elif-statementif-else statement
Statement
Simple statement
Compound statement
Clause
Header
Suite Challenges
ageage
Chapter 4. Functions
"Functions should do one thing. They should do it well. They should do it only."~ Robert C. Martinfunctions Representing Concepts conventionprint("[what_you_want_to_print]") Functions Callingparameter
>> 4
>> z is 5