Presentation is loading. Please wait.

Presentation is loading. Please wait.

A bit of Review Review, Dry Run, Program.

Similar presentations


Presentation on theme: "A bit of Review Review, Dry Run, Program."— Presentation transcript:

1 A bit of Review Review, Dry Run, Program

2 Learning Targets Review Case, while, repeat..until
One paper per pair. Names (First and Last) Midterm Review Today’s Date 11/6/2018 Learning Targets Review Case, while, repeat..until Online time to finish Millionaire/Slug Learn how to count to 17

3 Process Working in pairs Dry runs (One paper per team)
Kahoot (One animal per team) At the end, enter your team animal and score If your team wins the Kahoot, they get to run the next Kahoot) Short answer (On the one paper per team)

4 Dry run One paper per pair. Names (First and Last) Midterm Review
Today’s Date 11/6/2018 Dry run Program WhatDoesItPrintOut; var a:integer; begin a:=20; while (a>2) do case a of 1,2: a:=a-1; 3: a:=a*2; 4,5:a:=a-1; 6:a:=a-4; else a:= a div 2; end; writeln(a); End.

5 Review When should you use a while loop?
One paper per pair. Names (First and Last) Midterm Review Today’s Date 11/6/2018 When should you use a while loop? What are the semantics of a while loop?

6 program Kase; var x, y, z:integer; begin y:= 6; z:= 2; for x:= 1 to 6 do case x mod 4 of 1, 3: y:= y + 7; 2: z:= z*3; 0: z:= z + y; end; writeln(x:6, y:6, z:6); end.

7 On to Student View The next chunk of time is for you to complete, improve and extend programming assignments. Take 5 minutes to get onto student view and find 3 assignments to work on. Put these on your review worksheet

8 While loop program 2 Millionaire Slug in Well Menu for projects
Input: A starting amount of money and an interest rate. Output: A chart showing how much money the user has after each year and how many years it will take to become a millionaire. Push: Add a feature that incorporates an annual donation to savings Push: Modify it to compound monthly Slug in Well Input: The depth of a well. Process: The slug climbs up 3’ each day, but if it does not climb out of the well then it slides back down 2’ at night Output: A chart showing the height of the slug at the end of each day and the number of days it takes the slug to climb out of the well. Push: Show it graphically Menu for projects Create a menu using the while loop that will let the user run a program you have written previously and when finished it will ask if you would like to run it again or quit. Rock-paper-scissors,…


Download ppt "A bit of Review Review, Dry Run, Program."

Similar presentations


Ads by Google