Computer Science 1 while

Slides:



Advertisements
Similar presentations
ABNIAC The following slide presentation is to acquaint the student with ABNIAC. The version used for presentation is the Java version, which can be found.
Advertisements

The C++ Tracing Tutor: Visualizing Computer Program Behavior for Beginning Programming Courses Rika Yoshii Alastair Milne Computer Science Department California.
Repetition Statements Repeating an Action A specified number of times While a Condition is True Until a Condition is True.
General Programming Introduction to Computing Science and Programming I.
SECT. 1.1 – DAY 2. WARM UP OBJECTIVES *Identify functions and use function notation. *Find domain and range of functions.
1 09/20/04CS150 Introduction to Computer Science 1 Let ’ s all Repeat Together.
1 Three C++ Looping Statements Chapter 7 CSIS 10A.
CSCI-100 Introduction to Computing
Truth and while Today 15 Minutes online time to finish the random/Swing programs. Truth tables: Ways to organize results of Boolean expressions. Note Taking:
Intermacs Form Download Excel Tutorial Pivot Tables, Graphic Tools, Macros By: Devin Koehl.
Java Review if Online Time For loop Quiz on Thursday.
Count Controlled Loops (Nested) Ain’t no sunshine when she’s gone …
© The McGraw-Hill Companies, 2006 Chapter 3 Iteration.
Intro to Loops 1.General Knowledge 2.Two Types of Loops 3.The WHILE loop 1.
Computer Science I: Understand how to evaluate expressions with DIV and MOD Random Numbers Reading random code Writing random code Odds/evens/…
Bubble Sort. Sorting  Computers only use numeric values for sorting  Does this mean you cannot sort a file by a character field (such as last name or.
Computer Science 2 Arrays of Records. First Record Program Input an unknown number of Team Names, School names, and Total scores. (While loop) –Output:
GCSE COMPUTER SCIENCE Practical Programming using Python
Mean, Median, Mode and Range
Unit 2 - Day 5 Compound Interest
Chapter 5: Control Structure
Examples Compound Interest
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
Control Structure Senior Lecturer
Program options Write a program for one of the following
Java Fix a program that has if Online time for Monday’s Program
Please use speaker notes for additional information!
Introduction to pseudocode
Computer Science 1 Online time to complete/enhance second repeat program Be able to read and write a program that uses the ‘case’ statement.
Examples Compound Interest
Truth tables: Ways to organize results of Boolean expressions.
How can you model playing rock-paper-scissors?
Computer Science 2 Arrays of Records.
Computer Science 2 Review the Bubble Sort
Continue on the Array of Records program
Insertion Sort Quiz on Thursday.
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Computer Science 2 Arrays of Records.
Computer Science 2 Getting an unknown # of …. Into an array.
Truth tables: Ways to organize results of Boolean expressions.
Java Fix a program that has if Online time for Monday’s Program
Repeat Day2 Dry Run Second Repeat Program
CS150 Introduction to Computer Science 1
Computer Science 1 1/19/2011 On the record (paper) write the following
Computer Science 2 Arrays of Records.
Let’s all Repeat Together
Computer Science 1 Warm-up: True/False Dry Run
CS 2 Records 2/22/2018.
Truth tables: Ways to organize results of Boolean expressions.
See requirements for practice program on next slide.
AP Java 9/21/2018.
Computer Science 1 Online time for Graphics Program Random review
How can you make a guessing game?
Computer Science 2 More Trees.
Computer Science 1 while
Computer Science 1 For..do loop Dry Run Take notes on the For loop
How can you make a guessing game?
Welcome Back CS 2 2/4/2013 On the record (paper) write the following
Computer Science I: Get out your notes.
Continue on the Valentines program
How can you model playing rock-paper-scissors?
Program options Write a program for one of the following
Dry Run Fix it Write a program
Random Numbers while loop
Computer Science 1 while
Dry Run Fix it Write a program
WJEC GCSE Computer Science
Algorithms For use in Unit 2 Exam.
A bit of Review Review, Dry Run, Program.
Week 7 - Monday CS 121.
Presentation transcript:

Computer Science 1 while Mid Term Thursday/Friday Warm up How do you…

Goals Look at a CS Career example. Review the while loop Complete the program from Thursday Push

Pathways This video shows five computer scientists in the field to get an idea of some of the possibilities for computer science careers. We will take a look at these as a class. Open the ‘pathways_in_computer_scienceworksheet’ from the class website. After viewing and discussing the careers you will need to answer the questions on the worksheet.

Review What are the semantics of a while loop? When should you use a while loop?

While..loop semantics Get Variable While (variable<>flag) do Begin 3. {Commands you will repeat} 4. Get Variable 5. End {Note: This will be on every test/quiz from now to the end of the semester!!}

While..loop Syntax While (condition) do Begin End; More than one command; End; OneCommand;

While loop program options Input: An unknown number of scores Output: The total and average score. Push: Calculate the highest and the lowest score Input: An unknown number of names and ages. Output: The name and age of the oldest person. Write a program t' hold an election for t' worst pirate (Unknown # o' voters…) Black Beard T' Great Pirate Roberts Henry Morgan t' Terrible Show t' results o' t' vote and declare t' worst pirate.

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,…