Presentation is loading. Please wait.

Presentation is loading. Please wait.

Repeat Day2 Dry Run Second Repeat Program

Similar presentations


Presentation on theme: "Repeat Day2 Dry Run Second Repeat Program"— Presentation transcript:

1 Repeat Day2 Dry Run Second Repeat Program
Computer Science 1 Repeat Day2 Dry Run Second Repeat Program

2 Learning Objectives Be able to read a program that uses a repeat..until loop. Be able to write a program that uses a repeat … until loop.

3 Dry Run program petepete; var x,y,z:integer; begin x:= 24; z:= 4; repeat if (x mod 2 = 0) then writeln('Dino ', x); x := x DIV z; end else writeln('Bam bam ', x); x:= x - z; end; until (x<1); end.

4 Second Repeat Program Math tutor Boom!
Write a program that will randomly generate an addition problem and let the user calculate and guess the correct answer until they get it correct. At the end it will show how many guesses it took to get the problem correct. Push: Add levels of difficulty Push: Include subtraction and multiplication problems. Push: Let the user pick how many problems they would like to have you ask. Boom! Write a program that has two graphic images moving randomly around the screen until they run into each other. Then show an explosion. Push: Be able to drive one of the images and have the other image chase it at half speed. (Will need to incorporate the commands keypressed, and readkey) Push: Be able to control both of the images.


Download ppt "Repeat Day2 Dry Run Second Repeat Program"

Similar presentations


Ads by Google