logging in or signing up Writing Loops - SETI daive_ellis Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 8 Category: Education License: Some Rights Reserved Like it (0) Dislike it (0) Added: February 14, 2012 This Presentation is Public Favorites: 0 Presentation Description A process to make writing loops easier Comments Posting comment... Premium member Presentation Transcript Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. How to write loops more easily …. But first …. ALIENSWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I.Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. Life Non-Intelligent Intelligent Then God said, “Let us make mankind in our image, in our likeness, so that they may rule … Genesis 1v26 1700 1500 200Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. S earch for E xtra T errestrial I ntelligenceWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. It is by the name of Jesus Christ of Nazareth, whom you crucified but whom God raised from the dead, that this man stands before you healed. 11 Jesus is “‘the stone you builders rejected, which has become the cornerstone.’ [ a ] 12 Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.” Acts 4 verse 10-12Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. S tartup What needs to be done before the loop E ntry / Exit When do we get in or get out of the loop T ask What does the loop do each time I terate What needs to happen before the next time thru the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. Read price total = 0 Read price Add price to total Print total Is price 0? Yes No S tartup E ntry / Exit T ask I terate Cash register program Uses a “sentinel” I terate T ask E ntry S tartup the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. Read in numbers Read in number highest = number lowest = number FOR numberupto = 2 to numbers Read number IF number < lowest THEN lowest = number ENDIF IF number > highest THEN highest = number ENDIF NEXT numberupto Print highest “-” lowest S tartup E ntry / Exit T ask I terate Range program Eg: 6, 4, 1, 7, 9, 3, 2 9-1 I terate T ask E ntry /Exit S tartup the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. Read guess turns = 0 REPEAT Choose picked from 1..100 turns = turns + 1 UNTIL guess = picked Print turns S tartup E ntry / Exit T ask I terate Number guesser program Prints how long til computer guessed it I terate T ask E xit S tartup the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. S tartup E ntry / Exit T ask I terate You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
Writing Loops - SETI daive_ellis Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 8 Category: Education License: Some Rights Reserved Like it (0) Dislike it (0) Added: February 14, 2012 This Presentation is Public Favorites: 0 Presentation Description A process to make writing loops easier Comments Posting comment... Premium member Presentation Transcript Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. How to write loops more easily …. But first …. ALIENSWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I.Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. Life Non-Intelligent Intelligent Then God said, “Let us make mankind in our image, in our likeness, so that they may rule … Genesis 1v26 1700 1500 200Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. S earch for E xtra T errestrial I ntelligenceWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. It is by the name of Jesus Christ of Nazareth, whom you crucified but whom God raised from the dead, that this man stands before you healed. 11 Jesus is “‘the stone you builders rejected, which has become the cornerstone.’ [ a ] 12 Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.” Acts 4 verse 10-12Writing Loops – S.E.T.I.: Writing Loops – S.E.T.I. S tartup What needs to be done before the loop E ntry / Exit When do we get in or get out of the loop T ask What does the loop do each time I terate What needs to happen before the next time thru the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. Read price total = 0 Read price Add price to total Print total Is price 0? Yes No S tartup E ntry / Exit T ask I terate Cash register program Uses a “sentinel” I terate T ask E ntry S tartup the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. Read in numbers Read in number highest = number lowest = number FOR numberupto = 2 to numbers Read number IF number < lowest THEN lowest = number ENDIF IF number > highest THEN highest = number ENDIF NEXT numberupto Print highest “-” lowest S tartup E ntry / Exit T ask I terate Range program Eg: 6, 4, 1, 7, 9, 3, 2 9-1 I terate T ask E ntry /Exit S tartup the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. Read guess turns = 0 REPEAT Choose picked from 1..100 turns = turns + 1 UNTIL guess = picked Print turns S tartup E ntry / Exit T ask I terate Number guesser program Prints how long til computer guessed it I terate T ask E xit S tartup the loopWriting Loops – S.E.T.I.: Writing Loops – S.E.T.I. S tartup E ntry / Exit T ask I terate