Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENGINEERING PRINCIPLES Computer Science: Functions.

Similar presentations


Presentation on theme: "ENGINEERING PRINCIPLES Computer Science: Functions."— Presentation transcript:

1 ENGINEERING PRINCIPLES Computer Science: Functions

2 Hokey Pokey You put your right hand in, You put your right hand out, You put your right hand in, And you shake it all about, Chorus: You do the hokey pokey and you turn yourself around That what it's all about. You put your left hand in, You put your left hand out, You put your left hand in, And you shake it all about, Chorus You put your right foot in, You put your right foot out, You put your right foot in, And you shake it all about, Chorus You put your left foot in, You put your left foot out, You put your left foot in, And you shake it all about, Chorus You put your head in, You put your head out, You put your head in, And you shake it all about, Chorus You put your back side in, You put your back side out, You put your back side in, And you shake it all about, Chorus You put your whole self in, You put your whole self out, You put your whole self in, And you shake it all about, Chorus

3 Programs with Functions You put your right hand in, You put your right hand out, You put your right hand in, And you shake it all about, Chorus: You do the hokey pokey and you turn yourself around That what it's all about. You put your left hand in, You put your left hand out, You put your left hand in, And you shake it all about, Chorus You put your right leg in, You put your right leg out, You put your right leg in, And you shake it all about, Chorus You put your left leg in, You put your left leg out, You put your left leg in, And you shake it all about, Chorus You put your head in, You put your head out, You put your head in, And you shake it all about, Chorus You put your back side in, You put your back side out, You put your back side in, And you shake it all about, Chorus You put your whole self in, You put your whole self out, You put your whole self in, And you shake it all about, Chorus [Function Definition] [Function Call]

4 Old MacDonald Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some chickens, E-I-E-I-O. With a cluck, cluck here, And a cluck, cluck there, Here a cluck, there a cluck, Everywhere a cluck, cluck, Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some ducks, E-I-E-I-O. With a quack, quack here, And a quack, quack there, Here a quack, there a quack, Everywhere a quack, quack, Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some pigs, E-I-E-I-O. With a oink, oink here, And a oink, oink there, Here a oink, there a oink, Everywhere a oink, oink, Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some dogs, E-I-E-I-O. With a woof, woof here, And a woof, woof there, Here a woof, there a woof, Everywhere a woof, woof, Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some cows, E-I-E-I-O. With a moo, moo here, And a moo, moo there, Here a moo, there a moo, Everywhere a moo, moo, Old MacDonald had a farm, E-I-E-I-O.

5 Functions with Variables Chorus(sound) With a sound, sound here, And a sound, sound there, Here a sound, there a sound, Everywhere a sound, sound, Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some chickens, E-I-E-I-O. Chorus(cluck) Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some ducks, E-I-E-I-O. Chorus(quack) Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some pigs, E-I-E-I-O. Chorus(oink) Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some dogs, E-I-E-I-O. Chorus(woof) Old MacDonald had a farm, E-I-E-I-O. Old MacDonald had a farm, E-I-E-I-O. And on his farm he had some cows, E-I-E-I-O. Chorus(moo) Old MacDonald had a farm, E-I-E-I-O. [Function Definition] [Function Call]

6 Simplify Further?

7 Create your own Song Program with Function Some Suggestions: This Old Man The Wheels on the Bus Hickory Dickory Dock Five Green and Speckled Frogs Hokey Pokey


Download ppt "ENGINEERING PRINCIPLES Computer Science: Functions."

Similar presentations


Ads by Google