Using Conditionals in QuizMe and Making
Multiple ScreensWeek 3
Activity
• Simon Says Everyone stand up Do what you teacher says if she says
“Simon Says”
Conditionals – If Statements
• If (condition is true) then (do something)• When the conditions change,
the actions change• E.g. if Simon says “Simon says”
then do the command • E.g. if you are thirsty and you have
water, you take a drink
Conditionals- If else
• If (condition) then (do something) else (do something else)• E.g. You’re asking someone to go
to the prom. What happens if they say yes? What happens if they say no?
Flow Charts: Flow of Control
If answer is ‘yes’
THEN true
ELSE false
Condition must have a value of TRUE or FALSE
Flow of Control
If you text during class
true
false
Phone gets taken away
You keep your phone
If (you text during class)Phone gets taken away
elseKeep phone
Found under Built-in in the Control drawer if
ifelse
Conditionals in App Inventor
then do
then do
else do
true
true
false
Nested Conditionals• If (condition) then (do something)
elseif (condition#2) then (something else) else (do something else)• E.g. if I get into Stanford I’ll go
there. Elseif I get into Berkeley I’ll go there. Elseif I get into Harvey Mudd, I’ll go there.
Multiple Screens
QuizMe
ResourcesIf you have problems• Watch the YouTube video
• Read the App Inventor book on conditionals (page 259-266)• Post questions to the Technovation
Challenge Google Group
Reminder:Weekly Reflections• What did your team like about this
week?• What challenges did your team
have this week?• Anything else your team would
like to share?
Share with us onTwitter & Facebook
Tweet us: @_technovation_#technovation
Like us on Facebook: Technovation Challenge