Big problem  small steps

Slides:



Advertisements
Similar presentations
Writing Pseudocode And Making a Flow Chart A Number Guessing Game
Advertisements

Statistics and Probability
MATLAB Examples. CS 1112 MATLAB Examples Find the number of positive numbers in a vector x = input( 'Enter a vector: ' ); count = 0; for ii = 1:length(x),
Building Java Programs
Chapter 2: Understanding Structure
101.  Computers DO NOT think for themselves. For them to do anything they need to be told what to do.  Simply put computer programming is when you tell.
I’m bored! I've got an idea! Let's play a game of Rock Paper Scissors!
Use logic to teach the computer how to play a game
CompSci Recursion & Minimax Playing Against the Computer Recursion & the Minimax Algorithm Key to Acing Computer Science If you understand everything,
July 13 th.  If/ Else if / Else  Variable Scope  Nested if/else's  Switch statements  Conditional Operator.
COMP 14 Introduction to Programming Mr. Joshua Stough February 16, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218.
CSCI 105 – Computer Fluency, Spring 2015
Main task -write me a program
COMP 110 Introduction to Programming Mr. Joshua Stough September 24, 2007.
Computer Programming Basics. Computer programs are a detailed set of instructions given to the computer They tell the computer: 1. What actions you want.
LESSON 8 Booklet Sections: 12 & 13 Systems Analysis.
Flow Charting. Goals Create Algorithms using Flow Charting procedures. Distinguish between Flow Charting and Pseudocode. Top-Down Design Bottom-up Design.
ECS 10 10/8. Outline Announcements Homework 2 questions Boolean expressions If/else statements State variables and avoiding sys.exit(…) Example: Coin.
Z. Z Scissors Paper Stone  Scissors beats paper (cuts it)  Paper beats rock (wraps it)  Rock beats scissors (blunts it)  Showing the same is a draw.
Class Usability Experience User slides are in BLUE.
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
Making Decisions uCode: October Review What are the differences between: o BlueJ o Java Computer objects represent some thing or idea in the real.
Station 1: Scientific Method Steps Open up the Symbaloo site and watch the Scientific Method video. There are two, but one has the lyrics and the other.
Rock, Paper, Scissors A Probability Experiment.
Top Down Design Brent M. Dingle Texas A&M University Chapter 4 – Section 1 (and some from Mastering Turbo Pascal 5.5, 3 rd Edition by Tom Swan)
Stations September 26th – September 30 th. Project Overview Students will be introduced to their 3 rd project of the year this week from our CSA 5 th.
THINKING PROCEDURALLY OR CONCURRENT (SIMULTANEOUSLY OR SIDE BY SIDE OR IN LOGICAL ORDER A- IDENTIFY THE COMPONENTS OF A PROBLEM B-IDENTIFY THE COMPONENTS.
HANGMAN- Software/ Hardware Integration Project Idea was to design a working C++ program to play a Hangman word guessing game Idea was to design a working.
LO: We’re learning to outline a program using Pseudo Code.
Tell me your fortune! We are going to be making origami fortune tellers and play an icebreaker game with them.
Microsoft® Small Basic Conditions and Loops Estimated time to complete this lesson: 2 hours.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
Conditionals.
I’m fine.I’m great!I’m very good. I’m not good. I’m tired.I’m hungry!
Design of Rock-Paper-Scissors end Print instructions Play game Ask user If (s)he wants to play again Play again? Y Print stats: wins, losses and ties start.
MAKE SURE TO WATCH THE MOVIE FIRST Let’s Multiply!
GCSE COMPUTER SCIENCE Practical Programming using Python
CREATING A MARVELOUS MIND MAP!.
Section 5.1 and 5.2 Probability
Technology acts a direct substitute, with no functional improvement
The ELA Games! A.k.a. “Berchick, are we done yet?” “No, we have to review for the final.”
Introduction to Programmng in Python
CMSC201 Computer Science I for Majors Lecture 11 – Program Design
Looping and Random Numbers
Writing Functions( ) (Part 5)
Introduction to Computer Programming
exa.im/stempy16.files - Session 12 Python Camp
Pick a number, any number …
VISUAL BASIC FINAL PROGRAMMING PROJECT
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Looping and Random Numbers
flow charts and system diagrams
Computational Thinking for KS3
Exploring Computer Science Lesson 4-11
Fractions.
Console.WriteLine(“Good luck!”);
The first number is posted telling what random number was selected, I did this for testing purposes, in the real thing it would not be there. Since the.
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg
Computational Thinking
Selections and Loops By Sarah, Melody, Teresa.
Hint idea 2 Split into shorter tasks like this.
Make a Tail Game “꼬리 만들기” 놀이.
Comparatives Game.
Pseudo-Code Conditional Branches
CMSC201 Computer Science I for Majors Lecture 12 – Program Design
Randomization Tests - Beyond One/Two Sample Means & Proportions
The Great Greek Monster Battle
Presentation transcript:

Big problem  small steps Top Down Design Big problem  small steps

We have a problem! Making a video game or making a small program Mr. Hastings has asked you to make, every program solves some problem Starting with a big picture idea (“This is what I want to make”). What do you want to happen? Take that big problem and break it into smaller steps Take those smaller steps  break into manageable steps.

Outline = A Plan Now that we know what specific tasks we need to accomplish before solving our problem we have a plan of action. Just like building a house, some steps are necessary to complete first before doing anything else (drawing blueprint for house, getting permits, hiring contractors, etc…) Just like building a house, some steps are independent of others (painting once walls are up, independent of landscaping outside)

Rock Paper Scissors game Let’s use our RPS game program as an example: Top down design begins with a BIG PROBLEM (I want to make a game) Breaks that down into sections (I will need to keep score… I will want to know who wins a match… I want some sort of dialogue in the game) Let’s look at what we did as a class with our game design:

Tasks: We need to use the random function. We want the computer to be both unpredictable and unbiased [it won’t cheat] Create a list of possible choices [rock, paper, or scissors] Human chooses a R,P, or S Computer chooses randomly between R,P, or S

Tasks Define a function recognizing user’s input We don’t want to have to repeat typing code  create a game function (asks What your choice is, chooses, then evaluates and repeats)

Tasks There needs to be an order / timing (control flow) for gameplay Human chooses first Computer chooses second Choices are compared / evaluated If human chooses ‘R’ and comp chooses ‘P’: comp wins… If human chooses ‘P’ and comp chooses ‘S’: comp wins… If human chooses ‘S’ and comp chooses ‘R’: comp wins… Else: HUMAN WINS!!!  Winner declared Win recorded / counted

Tasks Rules! What beats what? R > S P > R S > P

Tasks Win is recorded Keeping Score! How will we know who wins User win or computer win After x wins, computer or human wins match (best of x matches)