GCSE Computing Mini Assignment.

Slides:



Advertisements
Similar presentations
CS 1400 Chapter 2 sections 1, 2, 4 – 6, 8,
Advertisements

CS150 Introduction to Computer Science 1
Chapter 2: Input, Processing, and Output
Computer Science 1620 Programming & Problem Solving.
Business Math Assignment Press F5 to begin to playing this slide show.
Lecture 15 Practice & exploration Subfunctions: Functions within functions “Guessing Game”: A hands-on exercise in evolutionary design © 2007 Daniel Valentine.
1 Lab Session-III CSIT-120 Fall 2000 Revising Previous session Data input and output While loop Exercise Limits and Bounds Session III-B (starts on slide.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
Agenda  Commenting  Inputting Data from Keyboard (scanf)  Arithmetic Operators  ( ) * / + - %  Order of Operations  Mixing Different Numeric Data.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Input, Output, and Processing
Writing Program Code in BASIC Write a program to prompt for and accept values into TWO variables, numx and numy. The program should square the value stored.
30/10/ Iteration Loops Do While (condition is true) … Loop.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
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.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
1 Programming 2 Overview of Programming 1. Write the equations in C++ notation : a) R =   a + b  24  2 a  b) W = a 12 + b 2 – 2abcos(y) 2a.
JavaScript 101 Lesson 3: Variables and Arithmetic.
Debugging, Escape Command, More Math. It’s your birthday!  Write a program that asks the user for their name and their age.  Figure out what their birth.
Using variable Variables are used to store values.
CS Jan 2007 Chapter 2 sections 1, 2, 4 – 6, 8,
REVIEW No curveballs this time …. PROBLEM TYPE #1: EVALUATIONS.
Data Types and Conversions, Input from the Keyboard If you can't write it down in English, you can't code it. -- Peter Halpern If you lie to the computer,
29 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Exercise 1 #include int main() { printf(“Hello C Programming!\n”); return 0; } 1.Run your Visual Studio 2008 or Create a new “project” and add.
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
Test Review. General Info. All tests will be comprehensive. You will be tested more on your understanding of code as opposed to your ability to write.
GCSE Computing: Programming GCSE Programming Remembering Python.
1 Project 4: Computing Distance. 222 Computing Distance Write a program to compute the distance between two points. Recall that the distance between the.
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
Input, Output and Variables GCSE Computer Science – Python.
2.3 Output Formatting. Outputting Format Specify the number of spaces, “c”, used to print an integer value with specifier %cd, e.g., %3d, %4d. E.g. printf.
Chapter 3 Using Variables, Constants, Formatting Mrs. UlshaferSept
GCSE COMPUTER SCIENCE Practical Programming using Python
Business Math Assignment
3.1 Fundamentals of algorithms
Topics Designing a Program Input, Processing, and Output
IGCSE 1 Cambridge Algorithms and flowcharts Unit 7 Computer Science
Exercise : Write a program that print the final price of purchase at a store where everything costs exactly one dollar. Ask for the number of items purchased.
Introduction to Programming
Introduction to Algorithms
Topic: Python’s building blocks -> Statements
Data Types and Conversions, Input from the Keyboard
Chapter 2: Input, Processing, and Output
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Formatting Output.
Introduction to Programming
Do it now activity Green pen activity in books.
IPC144 Introduction to Programming Using C Week 2 – Lesson 1
Do While (condition is true) … Loop
Introduction to Programming
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Introduction to Value-Returning Functions: Generating Random Numbers
Topics Designing a Program Input, Processing, and Output
Topics Designing a Program Input, Processing, and Output
Business Math Assignment
Chapter 2: Input, Processing, and Output
Unit 3: Variables in Java
Hint idea 2 Split into shorter tasks like this.
Introduction to Programming
Business Math Assignment
Input, Variables, and Mathematical Expressions
What you need to do… Drag the pieces of code into the correct order like you can see in the EXAMPLE below. print ( “ int input ) = + Hello world chr ord.
Python SAT 1 Feedback.
CHAPTER 6 Testing and Debugging.
GCSE Computing.
Introduction to Programming
Python Creating a calculator.
Presentation transcript:

GCSE Computing Mini Assignment

Mini Assignment Having completed a variety of mini tasks we have now established an understanding of the following programming tools: Print Input Variables Int() #for numbers with decimal places use float() Calculations Random Numbers While loop (Conditional controlled) For Loops (Count controlled) You are now required to apply all of these to help solve the problem on the following slides. Once complete it will be uploaded for marking where the quality of coding, output presentation and use of comments will be assessed.

One new skill to help… In the task you will be required to round up a value. For example you cannot buy 2.3 tins of paint so it should be 3. Test this code before proceeding to the actual task: import math number = float(input("Enter a value :")) print(number) print(round(number)) #this will round up or down print(math.ceil(number)) #this will round up (uses the ceiling statement)

Mini Assignment 1 – Main Task Having gained employment as a computer programmer for B & Q you have been asked to create a “Paint cost calculator” program that could be used by customers in their stores. It will need to perform the following: Output a Header for Title Ask the user to input the height and width of the wall to be painted #use float() rather than int()* Calculate the area of the wall Calculate and output the number of tins required (1 tin covers 5m2) #can you round up to an integer value? Calculate and output the cost (1 tin costs £12)

Mini Assignment 1 – Extension 1 There is a sale at the store where the price of each tin is reduced by a random number between 1 and 4. Add code so that a reduced price is used (Note: import random will be required)

Mini Assignment 1 – Extension 2 Add a While Loop that will allow the user to have multiple attempts or close the program.

Mini Assignment 1 – Extension 3 Add a For Loop to your code to have a countdown from 10 to 1 before providing the user with the final price.

Mini Assignment 1 – Extension 4 There is a circular window in the wall that does not require paint. Ask the user to enter the radius of the circle, calculate and output the area using πr2. Subtract this area from the total area of the wall before calculating the number of tins required and cost.

Roundup import math tins = math.ceil(area/5)

import time for i in range(10,0,-1): print (i) time.sleep(1)

Mini Assignment 1 – Assessment Criteria [100 Marks] Skill Mark Header created using print, \n and a dividing line of stars 10 Data input and stored in suitable variables Accurate calculations for area, number of tins and price Data output is well presented and clear Round up code works effectively Ext 1: Correct use of random numbers Ext 2: Correct use of while loop Ext 3: Correct use of for loop Ext 4: Correct use formula to subtract circle area Effective use of comments