making decisions

44
MAKING DECISIONS Should I go outside to play?

Upload: leena-levashvili

Post on 17-Jul-2015

46 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Making decisions

MAKING DECISIONS

Should I go outside to play?

Page 2: Making decisions

MAKING DECISIONS

Should I go outside to play?

If it’s raining

I will stay home

Page 3: Making decisions

MAKING DECISIONS

Should I go outside to play?

If it’s raining

I will go play

Page 4: Making decisions

MAKING DECISIONS

Should I go outside to play?

If I have too much homework

I will stay home

Otherwise

I will go to play

Page 5: Making decisions

MAKING DECISIONS

Should I go outside to play?

If my friends go

I will also go

Page 6: Making decisions

HOW DO WE MAKE DECISIONS?

If some condition is True,!

then I will perform some action

Page 7: Making decisions

If the card Leena picked is a black card,

First, Koena will jump up twice

After that, Sahith will clap three times

After that, Rohin will write ‘gigglygoo’ on a piece of paper

Otherwise,

First, Ishaan will say, ‘I will put on the cloak !and enter the Forbidden Forest’

After that, Suneet will draw a circle on a whiteboard

First, Leena will pick a card

Page 8: Making decisions

if card.color == ‘black’:

Koena.jump(2)

Sahith.clap(3)

Rohin.write(‘gigglygoo’)

else:

Ishaan.say(‘I will put on the cloak \!and enter the Forbidden Forest’)

Suneet.draw(‘circle’)

card = Leena.pickCard()

Page 9: Making decisions

If the card Leena picked is a black face card,

After that, Koena will draw a flower on a whiteboard

Ishaan will imitate a tree for 5 seconds

After that, Rohin will do three jumping jacks

Otherwise, if the card Leena picked is a red face card,

First, Sahith will say, ‘Hi! My name is Fluffy’

First, Suneet will clap 4 times

First, Leena will pick a card

Otherwise,

Page 10: Making decisions

if card.color == ‘black’ AND card.isFaceCard():

Koena.draw(‘flower’)

Ishaan.imitate(‘tree’, 5)

Rohin.doJumpingJacks(3)

elif card.color == ‘red’ AND card.isFaceCard():

Sahith.say(‘Hi! My name is Fluffy’)

Suneet.clap(4)

card = Leena.pickCard()

else:

Page 11: Making decisions

if card.isNumberCard() AND card.number == 6:

Ishaan.jump(3)

Suneet.imitate(‘bird’, 4)

Suneet.doJumpingJacks(4)

elif card.isNumberCard() AND card.number == 7:

Koena.say(‘I am not a zombie’)

Rohin.imitate(‘vampire’, 4)

card = Leena.pickCard()

else:

Sahith.clap(2)

elif card.isNumberCard() AND card.number == 8:

Koena.clap(3)

Page 12: Making decisions

CONDITIONS

True!or!

False

Page 13: Making decisions

It is raining outside

Page 14: Making decisions

Koena is in class today

Page 15: Making decisions

Suneet is not in class today

Page 16: Making decisions

It is not raining outside

Page 17: Making decisions

5 is greater than 4

Page 18: Making decisions

The word ‘cake’ has 5 letters in

it

Page 19: Making decisions

The word ‘cake’ does NOT have 4 letters in it

Page 20: Making decisions

4 is NOT greater than 5

Page 21: Making decisions

5 is less than 4

Page 22: Making decisions

5 is NOT less than 4

Page 23: Making decisions

5 is equal to 5

Page 24: Making decisions

5 is NOT equal to 5

Page 25: Making decisions

4+5 is equal to 10

Page 26: Making decisions

Cake is in the fridge

Page 27: Making decisions

Cake is on the table

Page 28: Making decisions

Cake is on the table OR in the

fridge

Page 29: Making decisions

Cake is on the table AND in the

fridge

Page 30: Making decisions

Cake is on the table AND in the

fridge

Page 31: Making decisions

Cake is on the table OR in the

fridge

Page 32: Making decisions

cake is on the table OR in the fridge

Page 33: Making decisions

Cake is on the table OR cake is not on

the table

Page 34: Making decisions

Cake is on the table AND cake is not on

the table

Page 35: Making decisions

5==5

Page 36: Making decisions

4==5

Page 37: Making decisions

‘hello’==‘hello’

Page 38: Making decisions

‘hello’==‘Hello’

Page 39: Making decisions

4<5

Page 40: Making decisions

4>5

Page 41: Making decisions

4<=5

Page 42: Making decisions

5<=5

Page 43: Making decisions

4+5<10

Page 44: Making decisions

5!=5