Review Dry Run Taking Names Online time Math is Good

Slides:



Advertisements
Similar presentations
E.g.9 For to do loop for i:=1 to 10 do writeln(i); While do loop i:=1;
Advertisements

Computing Science Software Design and Development SOFTWARE DESIGN AND DEVELOPMENT USING PYTHON.
Pascal Programming Strings, Arithmetic operators and output formatting National Certificate – Unit 4 Carl Smith.
Chapter 3 Developing an algorithm. Objectives To introduce methods of analysing a problem and developing a solution To develop simple algorithms using.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Programming, an introduction to Pascal
4.3 Functions. Functions Last class we talked about the idea and organization of a function. Today we talk about how to program them.
Program Options: 10 Minutes online Write a program that will display your home address as it would on an envelope. –First Name Last Name –Address –City,
Computer Science 1 How do you store a bunch of similar stuff?
Computer Science I: Understand how to evaluate expressions with DIV and MOD Random Numbers Reading random code Writing random code Odds/evens/…
Input and Output Output Prompt: –A message displayed to the user indicating what they are to enter. Should be clear and exact on what you want. write:
Computer Science 1 9/10/2014 Review Dry Run Math in Pascal How do you start, when you don’t know where to start?
15.1 More About High-Level Programming Languages Syntax and Semantics Each programming language contains its own rules for both syntax and semantics. Syntax.
Goals Understand how to create and compare Strings.
Nouns Nouns not noun noun noun not not
Program Options: 10 Minutes online
Review Dry Run A Little More Math Fix it Online time
Program options Write a program for one of the following
Mr. Smith’s Schedule 1st Period Computer Science I
Goals Understand how to create and compare Strings.
How do you store a bunch of similar stuff?
Computer Science II First With files.
Computer Science II First With files.
int [] scores = new int [10];
Computer Science 1 Dice Project.
Computer Science 2 Arrays of Records.
Computer Science 1 Get out your notebook
Computer Science 2 Review the Bubble Sort
Continue on the Array of Records program
Computer Science 2 Arrays of Records.
Dry run Fix Random Numbers
Program Options: 10 Minutes online
Repeat Day2 Dry Run Second Repeat Program
Computer Science 1 1/19/2011 On the record (paper) write the following
Computer Science 2 Arrays of Records.
Python 19 Mr. Husch.
How do you store a bunch of similar stuff?
Computer Science 1 Warm-up: True/False Dry Run
Computer Science 2 Tally Arrays 2/4/2016.
CS 2 Records 2/22/2018.
What do you do when you don’t know how to get started.
AP Java String Review Learning Objectives
Computer Science 1 Online time for Graphics Program Random review
How can you make a guessing game?
Computer Science Procedures Day 2.
Computer Science 2 More Trees.
Computer Science Procedures Day 2.
Computer Science 1 while
Computer Science 1 For..do loop Dry Run Take notes on the For loop
Warm-up: Dry Run DIV / MOD 2nd If Then Program
How can you make a guessing game?
Computer Science 1 Dice Project.
Computer Science
Warm-up: True/False Dry Run DIV / MOD 2nd If Then Program
How do you store a bunch of similar stuff?
Just Basic Lesson 19 Mr. Kalmes.
Computer Science 1 4/4/2016.
Computer Science I: Get out your notes.
Continue on the Valentines program
Mod 2 Lesson 2 Repeating with loops
Python 19 Mr. Husch.
Program options Write a program for one of the following
Dry Run Fix it Write a program
10/27/2016 Dry Run 2 Case Programs Fix it Second Case Program
Computer Science 1 while
Computer Science 1 Get out your notebook
Computer Science 1 Get out your notebook
Dry Run Fix it Write a program
A bit of Review Review, Dry Run, Program.
Computer Science II First With files.
Presentation transcript:

Review Dry Run Taking Names Online time Math is Good Intro to Programming Review Dry Run Taking Names Online time Math is Good

Learning Objectives Review: What makes a good variable. Be able to Dry run a program that includes math operations and output Understand how input names into a program. Be able to develop a program in Pascal. If time. A little more math review and a letting Pascal do the math for you.

Which are valid variable names? Which are good variable names? Yo 3daysleft Summer time X Q Top Score Address Begin Writeln End X1 X^2 What? Number from 1 to 13 and write valid/invalid and good/bad.

Dry run 1 (What do you think the following program does?) {Mr. Smith's Sample Program} {Dry Run #2} {5-20-2015} program DryRunTest; uses crt; var a,b,c:integer; begin clrscr; a:= 20; b:= 16; c:= a+b; writeln(a, b, c); b:= c – 2*(a+b) -6; a:= c + b; end. Dry run 1 (What do you think the following program does?)

Getting Names Program sample2; var begin end. name:string; writeln(‘Please enter your name.’); readln(name); writeln(‘Hello ‘, name,’ welcome back!’); readln; end.

Your program Write a program that will display your home address as it would on an envelope. Push: Let the user enter some or all of the information, and have your program format it. Write a program that shows a poem or song. Can be an original work. Include space as appropriate. Push: Look up for..do, or repeat..until to have your program repeat the song several times. Write a mad-lib program Have the user enter at least 4 pieces of information. Noun, Adverb (honestly), Adjective (messy), Verb, Geographical location, … The computer will generate the mad-lib

Math Math Pascal Code Example + Ans:= first+second; - Ans:= second – first; x * Ans := first * second; ÷ / Ans := first / second () Ans := (first + 2)/second; π PI Ans := PI; 52 sqr Ans := sqr(first); √ Sqrt() Ans:= sqrt(first);

You turn: What is the result of the following? Expression Answer Type 2+ 12 5*(8-15) 5 + 6*3 6 + 4/2 – 8 (6+4)/2 – 8 (6+4)/(2-8) Sqrt(9) Sqrt(4*4 + 9) Sqrt(sqr(3) + sqr(4))

Fix the following Fix5-20.pas in the assignments folder Open it in Pascal, save it to your documents then fix it. Fix the following prograhm Fix it 1 {Finding the average of two numbers) Number1, number 2, The average:integers. start writeln("Please enter two numbers) readline(17, 13) number1+number2/2 = average Show The average of 17 and 13 is average stop

Write a program for one of the following Extension: Look up If..then to check if the sides entered actually do make a triangle.