Early Program Design Intro to Computer Science CS1510 Dr. Sarah Diesburg.

Slides:



Advertisements
Similar presentations
Kenzie Barrow Kenzie Barrow CIS 1020 Final Mark Spitz Ian Thorpe Michael Phelps Rowdy Gains Kenzie Barrow CIS 1020 Final.
Advertisements

Flowcharts Remember that a solution to a problem is called an algorithm. Algorithms are often a series of steps required to solve the problem. A flowchart.
Convert fractions to decimals Addition of decimal numbers Compare fractions & decimals Multiplication of decimal numbers Convert decimals to fractions.
STARS By Emma, Kara, and Morgan SWIMMING People swim for fun, exercise, and for a fun sport. Swimming is one of the best exercise for keeping healthy.
New Zealand New Zealand is an island country in the southwestern Pacific ocean. New Zealand is approximately 900 miles east of Australia.
Thumbs up = That is RIGHT! Thumbs down = That is WRONG.
SWIMMING TYPE WHERE SPECIAL WORDS SWIMMING STYLES EQUIPMENT
Sochi Olympics Your Name Today’s Date Insert picture.
3-6 Systems with 3 Variables Objectives: To solve systems in 3 variables by elimination. To solve systems in 3 variables by substitution.
12.3 Multiplying Rational Expressions Definitions Formulas & Examples Practice Problems.
Michael Phelps By Adam Livingston. What made Michael Phelps famous? Michael has the record for most gold metals won in the Olympics Michael has broken.
Year 4/5 Sam is 11 years old today. He has invited 6 friends to a party at McDonalds. Each child will have a “Happy Meal” costing £2.99 each. What is the.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
Subtract 1Subtract 3 Subtract same number Subtract numbers from their doubles Subtract 2.
Russia’s Summer Olympic Games History. U.S.S.R. The Olympic Games started in 1896 in Athens, Greece The U.S.SR. did not compete until 1952, these games.
Chapter 8 Section 3 Solving System of Equations by the Addition Method.
What is Matrix Multiplication? Matrix multiplication is the process of multiplying two matrices together to get another matrix. It differs from scalar.
Multiplying Fractions. Fraction Multiplication Here are some fraction multiplication problems Can you tell how to multiply fraction from these examples?
Thinking about programming Intro to Computer Science CS1510 Dr. Sarah Diesburg.
Unit 4: Probability Day 1: Counting Principles. Standards and Benchmarks Select and apply counting procedures, such as the multiplication and.
By Alyssa B. and Sarah E.. Country of origin: Russia 2008/05/02/russia%20map.gif Rules of the sport: to score more goals.
Problem Solving Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
Add 2 three digit numbers Balance addition equations Add 3 numbers of 3,2, 1 digits Add 4 digit numbers Complete addition equations.
Thinking about programming
Affiliate Digital Offering NBC Sports and Olympics
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Module 6 Writing and Solving Two Step Equations
Who can win more gold medals?
Thinking about programming
Arithmetic Sequences and Series
Apply the Counting Principle and Permutations
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Intro to Computer Science CS1510 Dr. Sarah Diesburg
More Nested Loops and Lab 5
Who can win more gold medals?
Who can win more gold medals?
Thinking about programming
3-Variable Systems Algebra II Unit 1.
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Intro to Nested Looping
Who can win more gold medals?
Thinking about Strings
Who can win more gold medals?
Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg
Who can win more gold medals?
Intro to Nested Looping
Who can win more gold medals?
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Thinking about programming
Example of Country Brochure Project
Thinking about programming
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Year 2 Summer Term Week 9 Lesson 5
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Types, Truth, and Expressions
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Who can win more gold medals?
Pettit 10-2 Notes D1: Read and interpret graphs
Presentation transcript:

Early Program Design Intro to Computer Science CS1510 Dr. Sarah Diesburg

Problem #1 Calculating Olympic Prize Money The USOC pays Olympic athletes who win medals the following in prize money:  Gold $25,000  Silver $15,000  Bronze $10,000 2

Calculating Olympic Prize Money How much money did they pay?  Total (46/29/29) ***  Michael Phelps (4/2/0)  Missy Franklin (4/0/1)  Ryan Lochte (2/2/1) *** Treats a team medal as one prize, not multiple prizes. 3

Steps in solving this problem Identify the prize money for each medal type (constant over each athlete). Obtain the number of gold, silver, and bronze medals for the athlete (different for each athlete). For each medal type, multiply the medal count with it’s prize amount. Sum these three values to get total money won Display total amount of money won 4

We can do that ! 5

Calculating Olympic Prize Money (Summer Olympics) The USOC pays  Gold $25,000  Silver $15,000  Bronze $10,000 How much money did they pay?  Total (46/29/29)  Michael Phelps (4/2/0)  Missy Franklin (4/0/1)  Ryan Lochte (2/2/1)

Rules to Follow Always have a header comment block with a Title, Author, Comment, and Deadline  See “Resources” page for Homework Submission Policy Take care of line wrap  Good rule of thumb is not to have a line exceeding characters  Can look at “Col” field at bottom of IDLE to see where you are at 7

Rules to Follow Put a comment on top of each chunk of code for the human  # Get the input for number of medals from user Use a consistent style  camelCase  c_style_naming Use constants  Every time you have a literal number (like 25000)  GOLD_PRIZE_AMOUNT=