Programming Simple Programming If and Nested Statements.

Slides:



Advertisements
Similar presentations
MS-Excel XP Lesson 5. Exponentiation 1.A1  2 A2  3 A3  =A1^A2 B1  =2^4 2.^ for exponentiation.
Advertisements

CS&E 1111 ExIFs IFs and Nested IFs in Excel Objectives: Using the If function in spreadsheets Nesting If functions.
SECTION 2 WORK The reward for work GCSE ECONOMICS: UNIT 11 Part One.
Lesson 5 - Decision Structure By: Dan Lunney
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
1 Selection in C. 2 If / else if statement:  The else part of an if statement can be another if statement. if (condition) … else if (condition) … else.
1 Selection Structures. 2 Making Decisions Sample assignment statements to figure worker pay with possible overtime PayAmount = Hours * Rate PayAmount.
Programming with MATLAB. Relational Operators The arithmetic operators has precedence over relational operators.
Selection in C.
Being a teacher By Hayley Sime.  In 2 nd grade my teacher inspired me  I love teaching kids  It’s the only job I really thought about.
Intro to Animation Lesson 1 & 2 Unit 14 – Animation
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Scratch – Simple Programming
1-8 An Introduction to Equations
Databases – Part 1 Databases– Part 1 Lesson 7 & 8.
Unit 15 – Web Authoring Web Authoring – Qatar Tourism Lesson 1 & 2.
Unit 2 – Spreadsheets Spreadsheets Vlookups.
Selection Structure If... Then.. Else Case. Selection Structure Use to make a decision or comparison and then, based on the result of that decision or.
1 2.2 Selection Logical Operators. 2 Learning Objectives Explain how the logical operator AND Boolean statements works.
Problem Solving with Decisions
B065: PROGRAMMING OPERATORS AND SELECTION 2. Starter  What do each of the following mean? Write an example of how each could be used. Symbol = <
2.8 – Graph Linear Inequalities in Two Variables A linear inequality in two variables can be written in one of these forms: Ax + By < C Ax + By > C An.
Unit 10 – Web Authoring Web Authoring – Qatar Tourism Lesson 5 & 6.
Unit 10 – Web Authoring Web Authoring – Qatar Tourism Lesson 3 & 4.
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
Study Smart 10/22/12  Achieve 3000  Complete all parts  Send the  All questions  At least 5 sentences on the thought question!  You guys are.
Databases – Part 1 Databases– Part 1 Lesson 5 & 6.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 4 Decision.
Decisions  Relational operators  Operate on two numbers or two Strings  ==, !=, >, >=,
Payroll Accounting Making Accounting Relevant Businesses issue payroll checks to their employees to compensate them for work performed. Making Accounting.
Lesson 9: Salary Consumer Math: p Some people are paid a fixed amount of money regularly, no matter how many hours they need to complete their.
Holt Algebra Graphing and Writing Inequalities Warm Up Compare. Write, or =. 1. − < > > = Tell whether the inequality x
Multimedia Product Multimedia Product Lesson 3 & 4.
Business A2 Unit 9 Section D. First Thing! (Objectives) Look at Unit 9s assessment guide ’Always the same...’
Multimedia Product Multimedia Product Lesson 1 & 2.
Unit 2 – Spreadsheets Spreadsheets - Project Computer Shop.
Databases – Part 2 Databases– Part 2 Lesson 5 & 6.
TYPES OF INFORMATION SYSTEMS 2 ND. AUGUST 2005 TUESDAY LOWER SIXTH COMPUTING LESSON Prepared by: T.Fina Next.
Scratch – Simple Programming
LESSON 2: CONTROL STRUCTURES JAVASCRIPT. CONTROL STRUCTURES – ALLOWS US TO CHANGE THE ORDERING OF HOW THE STATEMENTS IN OUR PROGRAMS ARE EXECUTED.
Friday August 29, 2014 Mr. Goblirsch – Economics OBJECTIVE – Students Will Be Able To – SWBAT: - Analyze the Dow to determine if stock values increased.
Unit 9 – Google Sketch up Google Sketch up – Intro Lesson 1 & 2.
Unit 2 – Spreadsheets Spreadsheets If Statements.
Java Project 3 In Class Practice. IF Statements Create a simple program that allows the user to enter a test score as an integer. If the test score is.
Databases – Part 1 Databases– Part 1 Lesson 3 & 4.
K-6 Critical Areas of Focus K-6 Key Fluencies Kindergarten – Critical Areas of Focus.
Unit 9 – Google Sketch up Google Sketch up – School Design Lesson 3 & 4.
Programming Simple Programming Variables.
Year 11 - Chapter 14 Assessment Overview – What you need to know: Overview Formatting Simple Formulas Named ranges/cells Functions (Max, Min, Average and.
Scratch 7B IT1.
Do it now activity Last lesson we used Flowol to create a solution to a problem a computer could solve. Identify what each symbol does:
Scratch – Simple Programming
Scratch – Simple Programming
A computer program is a sequence of computer commands.
Scratch – Simple Programming
Computers & Programming Languages
Computers & Programming Languages
Fantastic Places What parts of this unit have you enjoyed?
Grade one First term Second term Learning unit Learning unit
Creating a Poster.
Visual Basic – Decision Statements
Help Wanted Ad.
Spreadsheets If Statements.
Spreadsheets Vlookups.
How can we change the current in a circuit?
Independent / Dependent Variables
Scratch – Game Testing My Game Creation.
An Instructional Routine to Read Like a Mathematician
Exploring Computer Science Lesson 4-10 – Part 1
Scratch – Simple Programming
Presentation transcript:

Programming Simple Programming If and Nested Statements

Programming Unit Overview Objectives Understand why computer programming scripts are used. Understand the use of Variables as place holders for information. Understand the use of if and nested if statements in Python Programming. OutcomesTime Task 1 Job Type Task 2 Stock Level Task 3 Sales Target Task 4 Employee Pay Task 5 Grades Task 6 Extension

Programming IF/Nested Overview IF Statement: False IF Statement: True Logical Test 1.Simple script to work whether employees are part time or fulltime. 2.Logical Test: Worked Hours less than 15 3.True: “You are a part time employee” 4.False: “You are a full time employee” IF Statement: False 1. IF Statement: True Logical Test 2. IF Statement: True

Programming Task 1 – Job Type 1.Create a simple script to work whether employees are part time or fulltime. 2.Logical Test: Worked Hours less than 15 3.True: “You are a part time employee” 4.False: “You are a full time employee”

Programming Task 2 – Stock Level 1.Create a simple script to work the reorder amount for the Maze Runner Book. 2.Logical Test: Stock Level <1, True: “reorder 20” 3.Logical Test: Stock Level <5, True: “reorder 15” 4.Logical Test: Stock Level <10, True: “reorder 10” 5.False: “Fully Stocked”

Programming Task 3 – Sales Target 1.Create a simple script to work the sales target. 2.Logical Test: brand == Apple, True: Sales = 10 3.Logical Test: brand == Samsung, True: Sales = 15 4.Logical Test: brand == Nokia, True: Sales = 20 5.False: Sales = 25

Programming Task 4 – Employee Weekly Pay 1.Create a simple script to work employees weekly salary. 2.Job Type: Less than 15 hours (Part Time), 15 Hours or More (Full Time) 3.Rate of Pay: Part Time (£5), Full Time (£10) 4.Weekly Pay: Hours * Rate of Pay (FT or PT)

Programming Task 5 – Grades 1.Create a simple script to work out the pupils grade. 2.Create two variables to contain the pupils name and grade out of 100. Checking Grade Variable 1 st True Statement >90, A* Grade 2 nd True Statement >80, A Grade 3 rd True Statement >70, B Grade 4 th True Statement >60, C Grade 5 th True Statement >50, D Grade False: anything less than 50 - Fail

Programming Task 6 - Extension Can you make your own program containing variables and If/Nested Statements?

Programming Plenary – Refer to the Lesson Objectives Plenary Task (Q&A) Peer assess each other scripts. Discuss the levels pupils have achieved for this task. Question: What is the purpose of If and Nested Statements? Objectives Understand why computer programming scripts are used. Understand the use of Variables as place holders for information. Understand the use of if and nested if statements in Python Programming.