+ All Categories
Home > Documents > Using Conditionals in QuizMe and Making Multiple Screens

Using Conditionals in QuizMe and Making Multiple Screens

Date post: 22-Feb-2016
Category:
Upload: reegan
View: 45 times
Download: 0 times
Share this document with a friend
Description:
Using Conditionals in QuizMe and Making Multiple Screens. Week 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) - PowerPoint PPT Presentation
13
Using Conditionals in QuizMe and Making Multiple Screens Week 3
Transcript
Page 1: Using Conditionals in  QuizMe  and Making Multiple Screens

Using Conditionals in QuizMe and Making

Multiple ScreensWeek 3

Page 2: Using Conditionals in  QuizMe  and Making Multiple Screens

Activity

• Simon Says Everyone stand up Do what you teacher says if she says

“Simon Says”

Page 3: Using Conditionals in  QuizMe  and Making Multiple Screens

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

Page 4: Using Conditionals in  QuizMe  and Making Multiple Screens

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?

Page 5: Using Conditionals in  QuizMe  and Making Multiple Screens

Flow Charts: Flow of Control

If answer is ‘yes’

THEN true

ELSE false

Condition must have a value of TRUE or FALSE

Page 6: Using Conditionals in  QuizMe  and Making Multiple Screens

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

Page 7: Using Conditionals in  QuizMe  and Making Multiple Screens

Found under Built-in in the Control drawer if

ifelse

Conditionals in App Inventor

then do

then do

else do

true

true

false

Page 8: Using Conditionals in  QuizMe  and Making Multiple Screens

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.

Page 9: Using Conditionals in  QuizMe  and Making Multiple Screens

Multiple Screens

Page 10: Using Conditionals in  QuizMe  and Making Multiple Screens

QuizMe

Page 11: Using Conditionals in  QuizMe  and Making Multiple Screens

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

Page 12: Using Conditionals in  QuizMe  and Making Multiple Screens

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?

Page 13: Using Conditionals in  QuizMe  and Making Multiple Screens

Share with us onTwitter & Facebook

Tweet us: @_technovation_#technovation

Like us on Facebook: Technovation Challenge


Recommended