Conditionals Exploring Computer Science Lesson 4-9.

Slides:



Advertisements
Similar presentations
Using the website (click the link above), add the needed information to this PowerPoint. Save your presentation to your files as “programs.ppt” You may.
Advertisements

Careers WORKSHOP #2 COMPUTER SKILLS BUILDING A PRESENTATION.
Execution Control with If/Else and Boolean Functions Example: Single Condition Alice.
Information Technology Fundamentals (ITF) Mr. Shultz.
Programming 3/16/15 3/16 Looping, Arrays, Objects 3/17 Object-Oriented Design and Becoming a better Programmer 3/18 Introduction of Conditionals 3/19 Introduction.
Execution Control with If/Else and Boolean Functions
CATCH SCRATCH! Programming from Scratch. Remember Scratch?
Execution Control with If/Else and Boolean Functions Sec 52 Web Design.
Execution Control with If/Else and Boolean Questions Part 1 Alice.
Exploring Computer Science 2/23/15 2/23 Develop a Scratch story project -Brainstorming 2/24 Develop a Scratch story project –Developing 2/25 Develop a.
Exploring Computer Science 2/16/15
My Scratch Story Exploring Computer Science Lesson 4-7.
Learning the skills for programming Advanced Visual Programming.
Setting up and getting going with…. MIT App Inventor.
Moving Sprites in Scratch Exploring Computer Science – Lesson 4-4.
Scratch Dialogues Exploring Computer Science – Lesson 4-3.
WHAT IS A COMPUTER? LESSON 1-1. OBJECTIVES The student will be able to: Explain and give examples of the concepts on computers and computing.
Using the website (click the link above), add the needed information to this PowerPoint. Save your presentation to your files as “programs.ppt” You may.
Adding attachments to s This power point is to help people to know what an attachment is and also I will show you how to do it with screen shots to.
CompSci 4 Chap 6 Sec 2 Sep 30, 2010 Prof. Susan Rodger “All your troubles are due to those ‘ifs’,” declared the Wizard. If you were not a Flutterbudget.
Madlib-Input, Strings, and Lists in Scratch Barb Ericson Georgia Tech.
Introduction to Programming with Scratch Exploring Computer Science – Lesson 4-1.
Randomness Exploring Computer Science Lesson 4-10 – Part 2.
Body System Here Enter group members names here. Save Your Work! This is a good time to start saving your work. Go to FILE, then Save As…, then change.
Event Driven Programs Exploring Computer Science – Lesson 4-5.
Click icons for links European Union On Thursday 23d June 2016 the UK will have a referendum asking voters to decide whether the UK.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Designing a System That Will Fit Your Life
Understand Problem Solving Tools to Design Programming Solutions
Computer Programming.
Madlib-Input, Strings, and Lists in Scratch
Scratch 7B IT1.
Exploring Computer Science Lesson 4-7
Spanish Mad libs with Scratch
Execution Control with If/Else and Boolean Functions
Exploring Computer Science – Lesson 4-5
Combining Like Terms Friday, October 26th, 2012.
Exploring Computer Science Lesson 4-14
Telling the Whole Story
Exploring Computer Science Lesson 4-10 – Part 1
Understand Problem Solving Tools to Design Programming Solutions
Catmose College Student Media Team
Rapid Research - Data Innovations
I Can Stay Safe Online! Read the title slide with the students or have the group read it aloud. Introduce the lesson by saying that we can use the computer.
Information about all the ULABs left
Exploring Computer Science Lesson 4-14
An Introduction to VEX IQ Programming with Modkit
And and or…and RANDOMNESS
Exploring Computer Science Lesson 4-11
Go to =>
Exploring Computer Science Lesson 4-13
Exploring Computer Science – Lesson 4-5
Exploring Computer Science – Lesson 4-3
Preparation of ULAB EVAL part C
Exploring Computer Science Lesson 4-7
PYTHON: BUILDING BLOCKS Inputs & Outputs
Exploring Computer Science Lesson 4-8
Game Over Module 4 Lesson 2.
Exploring Computer Science Lesson 4-12
Welcome to Science!!! Things to know!.
This is an optional module
Message game One person from each group( a messenger)
Exploring Computer Science Lesson 4-10 – Part 2
Exploring Computer Science Lesson 4-14
Exploring Computer Science Lesson 4-13
Exploring Computer Science Lesson 4-12
Decision Statements.
Exploring Computer Science Lesson 4-8
How to use Open study By blm1.
Exploring Computer Science Lesson 4-10 – Part 1
Presentation transcript:

Conditionals Exploring Computer Science Lesson 4-9

Objectives The students will be able to: Explain the concept of conditionals. Enhance a variable program with conditionals.

Write down the questions. Journal What comes to mind when you hear the word “if”? What are some ways we use the word “if” in English? Write down the questions. Answer with complete thoughts and sentences or you will not receive full credit on your journal

If Statements in Computing If you have started to think about building animations like simulations and video games then to build those more advanced programs, you will need to write code that involves decisions If (some condition) then do this

Examples When you exit Microsoft Word, it asks you if you want to save your file. If you click “Yes” the file is saved If you click “No” your changes are discarded In a car-race simulation, the driver steers the car around curves and past mile-markers. If the car stays on the road, the score increases. If the car goes off the road into the stands, the car crashes. If the driver gets the car over the finish-line, the time is posted and the driver wins!

Scratch “if” Block The Scratch “if” block looks like this: Note that only a hexagon shaped block will fit

Example What does this program do?

Expand the Program Currently, it only does the first condition. Your task is to finish the program so that the cat will tell you the rest: If you are older than 2 "you don't need diapers" If you are older than 15 "you can drive" If you are older than 16 "you can see an R rated movie" If you are older than 17 "you can vote" If you are older than 20 "you can gamble" If you are older than 24 "you can rent a car" If you are older than 49 "you can retire“ Finally add: If the age is less than 3 "Sorry, you are not old enough for anything yet"

Remember Our Nutrition Program?? Add a nutrition guru to the program… The guru should give a positive message about being nutritious if the number of points becomes greater than 9. The guru should give a message about eating healthier food if the number of points becomes less than 4. Use broadcast to tell the guru what to say!