Hardware is… Software is…

Slides:



Advertisements
Similar presentations
Grade 6 Hopewell Elementary You will read each slide, then try to think of the answer. When you think you know the answer, click ONCE on the mouse.
Advertisements

Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Introduction to Python
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
What is a computer? Computer is a device for processing information.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CHAPTER 1 INTRODUCTION 2 nd Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
CSC 1010 Programming for All Lecture 3 Useful Python Elements for Designing Programs Some material based on material from Marty Stepp, Instructor, University.
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.
COMPUTER PROGRAMMING Year 9 – Unit 9.04 Week 3. Open the Python INTERPRETER Can you use the interpreter to solve these maths problems? 156 add
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
Introduction to Computer Programming using Fortran 77.
Introduction to Programming Python Lab 8: Loops 26 February PythonLab8 lecture slides.ppt Ping Brennan
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Chapter 1: Introduction to Computers and Programming
Chapter 1 Introduction 2nd Semester H
Introduction to Programming
Whatcha doin'? Aims: To start using Python. To understand loops.
Lesson 1 - Sequencing.
UNDERSTANDING YOUR COMPUTER
Topics Introduction Hardware and Software How Computers Store Data
Python Let’s get started!.
Lesson 1 An Introduction
Programming Mehdi Bukhari.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Introduction to Programming
Introduction to Programming
Introduction to Programming
Variables, Expressions, and IO
Introduction to Programming
Introduction to Programming
Lesson 1 Learning Objectives
Chapter 1: Introduction to Computers and Programming
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Week 3 Computer Programming Learning Objective:
Selection CIS 40 – Introduction to Programming in Python
Introduction to Python
Introduction to Programming
Chapter 2 - Introduction to C Programming
Chapter 2 - Introduction to C Programming
Learning Outcomes –Lesson 4
Escape sequences: Practice using the escape sequences on the code below to see what happens. Try this next code to help you understand the last two sequences.
Topics Introduction Hardware and Software How Computers Store Data
Introduction to TouchDevelop
Introduction to Programming
Introduction to Computers
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 2 - Introduction to C Programming
Introduction to Programming
Introduction to Programming
A look at Python Programming Language 2018.
King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1 Done By: Asmal Alosaimi Edited By: Fatimah Alakeel.
Chapter 2 - Introduction to C Programming
Introduction to Programming
Unit 3: Variables in Java
Introduction to Programming
Introduction to C Programming
COMPUTING.
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Hardware is… Software is… How would you define: A Computer Hardware Software A Computer is… …a machine which responds to instructions to complete a task. Hardware is… The collection of physical elements of a computer – can be touched Software is… The collection of computer programs providing instructions to a computer It cannot be touched

Place a H for Hardware or an S for Software in the box on each image Hardware Or Software? Monitor Microsoft Word CD ROM USB Pen Drive Microsoft PowerPoint Keyboard Printer Speakers 10 (12) Windows 10 Mouse Microsoft Excel Web Cam

Storage Devices Storage devices are hardware that stores information for a computer to use. For example Hard drive Memory Cards DVDs

Achieve more than you ever thought possible today! Introduction to Computing Starter 1 – Input, Output and Storage Devices Drag and drop the images into the correct category. Input Devices: Storage and Media Devices: Achieve more than you ever thought possible today! Output Devices: Use the website to help you. https://www.bbc.com/bitesize/guides/zxb72hv/revision/1

3. Computer Network Know what these hardware devices do as part of a network: a server a router a network cable printer Know: What is a computer network? WAN Types of networks LAN The difference between a LAN and a WAN Benefits and issues with computer networks https://www.bbc.com/bitesize/guides/zc6rcdm/revision/1 https://www.bbc.com/bitesize/guides/zh4whyc/revision/1

Converting Binary to Denary Without a Table Binary isn’t often set out in a neat table and you may see it in the following format: You can convert the number in the same way but will have to add the column headings yourself: 10101 16 8 4 2 1 16 + 4 + 1 = 21 1 0 1 0 1

Convert Binary to Denary Without a Table 16 8 4 2 1 1 0 0 1 0 16 + 2 = 18 32 16 8 4 2 1 32 + 16 + 8 + 2 + 1 = 1 1 1 0 1 1 59 32 16 8 4 2 1 32 + 16 + 8 + 4 + 2 = 1 1 1 1 1 0 62

Converting Denary into Binary Write down the column headings for the binary number: Take each column from left to right. If the denary number to be converted is greater than or equal to the column heading, place a 1 in the column and subtract the value of the column from the denary value. If the denary value is smaller than the column heading, place a 0 in the column. 64 32 16 8 4 2 1

Converting Denary to Binary For example to convert the number 29 write the column headings: 32 16 8 4 2 1 29 is less than 32 so put a 32 in the first column.

Converting Denary to Binary For example to convert the number 29 write the column headings: 32 16 8 4 2 1 1 29 is more than 16 so put a 1 in the 16 column and find out the remainder. 29 – 16 = 13

Converting Denary to Binary For example to convert the number 29 write the column headings: 32 16 8 4 2 1 1 1 13 is more than 8 so put a 1 in the 8 column and find out the remainder. 13 – 8 = 5

Converting Denary to Binary For example to convert the number 29 write the column headings: 32 16 8 4 2 1 1 1 1 5 is more than 4 so put a 1 in the 4 column and find out the remainder. 5 – 4 = 1

Converting Denary to Binary For example to convert the number 29 write the column headings: 32 16 8 4 2 1 1 1 1 1 is less than 2 so put a 0 in the 2 column.

Converting Denary to Binary For example to convert the number 29 write the column headings: 32 16 8 4 2 1 1 1 1 1 1 is equal to the 1 column so put a 1 in the 1 column. Add up the columns to check you have the correct answer. 16 + 8 + 4 + 1 = 29

Convert the Denary Numbers into Binary 32 16 8 4 2 1 54 – 32 = 22 54 = 1 1 1 1 22 – 16 = 6 6 – 4 = 2 2 – 2 = 0 32 + 16 + 4 + 2 = 54 32 16 8 4 2 1 25 = 1 1 1 25 – 16 = 9 9 – 8 = 1 16 + 8 + 1 = 25

Addition Rules for Binary When adding with binary you need to remember certain rules: 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 10 (write down 0 and carry 1) 1 + 1 + 1 = 11 (write down 1 and carry 1)

Adding with Binary 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 10 1 + 1 + 1 = 11 1 1 0 1 + 0 1 0 0 1 1 1 + 0 = 1 1 1 + 1 = 10 (carry the 1) 0 + 0 = 0 1 + 1 = 10 (carry the 1)

Adding with Binary 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 10 1 + 1 + 1 = 11 1 1 0 0 + 1 1 1 0 1 1 1 0 + 0 = 0 1 1 + 1+ 1 = 11 (carry the 1) 0 + 1 = 1 1 + 1 = 10 (carry the 1)

1 1 1 0 1 0 1 1 0 + Adding with Binary 1 1 1 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 10 1 + 1 + 1 = 11 1+1+1+1=100 1 1 0 1 0 + 1 1 0 1 1 1 1

Checking your Calculations You can check your binary calculations are correct by converting all the numbers to denary and then performing the sum in denary. Complete the sum below as usual and then check the answer by converting it to denary. 1 1 0 1 1 + 4 + 8 = 13 + 1 1 0 13 + 6 = 19 2 + 4 = 6 1 1 1 1 + 2 + 16 = 19 1

Adding binary numbers + 1 + 1 + 1 + 1

IDLE When you start Python's built-in IDLE, you'll get an interpreter window first. This is for trying code out immediately. You'll see this prompt: >>> As long as the version you are using starts with 3, everything should work fine. To write a program, choose: File > New Window. Then you'll see this type of window (no prompt).

Mathematical Operators Asterisk means “times”. Forward slash means “divide”. Double forward slash means “integer divide”. Double asterisk means “to the power of”. The percent sign gives you the remainder from doing the division. Walk through examples to see what happens and write operators in book.

Some more operators We use “==” to check if two things are the same. When we ask Python if 2 equals 3, it replies “False”. We use “!=” to check if they are not equal. Less than & less than or equal to. Greater than and greater than or equal to. Get students to copy operators into their exercise books

Know the basic data types String “hello” Integer 13 Float 14.6 Boolean True / False OR AND NOT

Program error correction print(“Hello everybody.”) name =int(input(“What is your name?”)) age = int(input(“What is your age?”)) print(“Your name is ”,name, “and your age is”, age, “.)

Our calculator program The program explained #red writing is useful comments numb1 and num2 variables which will be located memory The variable ans is assigned the sum Gray 80% ans = 14 + 8 ans will be printed as 22 22

Computer Programming Running our Python program The stars are telling us we have not saved the program Save it as adding.py. Push F5 on the keyboard to run Gray 80%

Concatenate a string Strings can be joined to other variables using a (, ) comma Now try exercise two OR use a FUNCTION to convert the variable to a string Function should only be shown to higher ability ( )

IF statements Computer programmers can make programs that are so intelligent they can make decisions which can have a direct bearing on our lives; Critical systems such as computers on planes must react to conditions; OR simple programs like a login for a computer. By having a program structure that uses the comparative operator IF and Else This can give us a choice like a decision in a flowchart.

IF statement syntax What is syntax? Syntax is the formal structure of program statements, like grammar. This is how a program would be written in PSEUDO code Pseudo code is the program written in a form close to English but it is not programming code. IF a > b Do something ELSE a < b Do something else

A simple IF program Pseudocode IF a > b Do something ELSE a < b If a is greater than b (>) else a is less than b (<) elif

A simple IF program This is the output to the program

The syntax explained What are a and b examples of? What is the output (print statements) an example of? What are the key words in purple examples of? What does the writing in red do? What do you think the purpose of the colon is? The syntax explained Input the two variables Note the colon Print if a is the biggest Print if a is the smallest

Spot the errors

Program error correction Correct this program so it will run without syntax errors. Remember that: capital letters or lower case letters are important. They must be right. Think about if the data types are correct. Make sure that the number of brackets are even, two or four. Print(“Hello everybody.”) name = int(input(“What is your name?”)) age = int(input(“What is your age?”) print(“Your name is ”,name, “and your age is”, age, “.