UNIT 1. Variables Binary Math

Size: px
Start display at page:

Download "UNIT 1. Variables Binary Math"

Transcription

1 UNIT 1 Variables Binary Math

2 DAY 1 History of Computers Variables and Assignment

3 I can.. Identify important inventions and people in the history of computers. Explain the purpose of a variable in computer programming. Assign a variable in Python. Use variables in print statements

4 The History of Computers Main Periods in History Early Information Processors First Generation Computers Second Generation Computers Third Generation Computers Fourth Generation Computers Fifth Generation Computers Sixth Generation Computers

5 Early Information Processors Most of the early information processing machines were used to do arithmetic

6 Abacus Used in ancient times for addition Used as early as 5000 BC Doesn t actually count helps human calculate by remembering what has already been counted.

7 Printing Press Invented by Johann Gutenberg Invented in 1458 Wooden/metal pressable letters with ink when pressure applied to paper or cloth the machine would print

8 Napier s Bones Invented in 1617 Numbered rods which can be used to perform multiplication on any number 2-9

9 Slide Rule Invented in 1632 Invented by William Oughtred Primarily used for multiplication and division

10 Blaise Pascal ( ) Developed a calculator called the Pascaline in 1641 Operated by turning dials It could only perform addition

11 Wilhelm von Leibniz ( ) Developed a calculator in 1673 called the Leibniz Wheel Operated by turning a crank Could perform all four standard operations (+, -, x, )

12 Jacquard Loom Invented in 1801 Processes information by using punched cards to control a pattern woven into clothing materials Predecessor of the player piano

13 Charles Babbage ( ) Known as the Father of the computer

14 Difference Engine (By Babbage) Invented in 1823 Designed to produce math tables Mechanical device powered by steam Abandoned the project because of difficulty making the machine's small parts

15 Analytic Engine (again Babbage) In 1833 Babbage had a better idea Could do ANY mathematical calculation Controlled using punched cards Also powered by steam He never finished it again limitations with machine parts However his design was the basis for modern computers hence the title Father of Computers

16 Lady Ada Lovelace (Ada Augusta Byron) Designed a sample program for Babbage s second machine on punched cards Though the program was never run she is known as the world s First Computer Programmer

17 George Bool ( ) Used 1 to describe the value of TRUE and 0 for FALSE As a result boolean logic and boolean symbols are named after him

18 Herman Hollerith ( ) Developed a punched card tabulating system for the 1890 US census Later left the census to create his own tabulating machine company which became known the Internation Business Machines (IBM) Company

19 Mark I Developed in 1944 (during WWI Manhattan Project) Based on Babbage s idea Mechanical device powered by electricity Controlled by punch cards

20 Mark 1 (Pictures)

21 Now Back to Python!

22 Data Types Data = another word for information Data Type: A particular type of piece of information. Different types of data have a different Data Type Python behaves differently depending on the type of information (data) it is working with.

23 Data Types Integers Floats Strings Hello This is a string 7+2 **There are more we will see in the future but we ll start with these three **

24 Why do we need data types? Data types tell the computer how much memory to use to store the value in memory - be efficient with memory use! Data types tell the computer the types of functions it can perform on the data - perform math operations on numbers (not strings)!

25 Data Types and Memory name James

26 Variables Variables are how we STORE information The name of a LOCATION in the computer s RAM Like a Mail Box: Has an address (location) and holds information for us!

27 Variables Can hold ONE value at a time When a new value is introduced the old value is ERASED What type of data a variable holds depends on the first data type it holds Declare a variable has a specific type

28 Variable Naming Rules Names of variables are also called Identifiers Every name MUST start with a letter or underscore ( _ ) Can only use a combination of letters, numbers, and underscores throughout the name CANNOT contain spaces ARE case sensitive (upper and lowercase letters are treated as different) length and Length are DIFFERENT variable names Should be DESCRIPTIVE (ex: sum representing a variable that will store the result of addition)

29 Valid or Invalid names? For each decide if the variable name is VALID or INVALID if it is INVALID, explain what rule the name is breaking A $Fred X-Y AZ sum student grade Dice_1 7G _Wisconsin U_W_Madison Muk-town A1

30 Valid or Invalid names? For each decide if the variable name is VALID or INVALID if it is INVALID, explain what rule the name is breaking A $Fred X-Y AZ sum student grade Dice_1 7G _Wisconsin U_W_Madison Muk-town A1

31 Variables reserved words Some words are called reserved words or keywords and CANNOT be used as variable names. Python Key Words: False class finally is return None continue for lambda try True def from nonlocal while and del global not with as elif if or yield assert else import pass break except in raise

32 Assignment Statements Assignment statements are used to assign a value to the variable This is how the mailbox saves a piece of information in its location

33 Variables and Assignment in Python ALL variables in Python MUST be Assigned a value BEFORE it is used in your program. Assignment Statements use the = to assign values to a variable.

34 Assignment Statements General Format: <variable name> = <expression> Single Variable Name (the variable in which the result is stored; a.k.a. the receiving variable) Assignment Operator Expression can be: a number another variable any algebraic expression a string or string expression

35 Assignment VS. Equivalency In Math an = means: Both sides of the equation will have an equivalent value = In Python an = means: the expression value on the RIGHT side is being assigned to the value of the LEFT age = 17 The age variable has saved the value 17 in memory

36 Assigning Variable Values You MUST have the variable name you want to store the value in on the LEFT The value in the variable on the LEFT (receiving variable) is replaced by the new value on the RIGHT The value previously held is now gone. The values of any variables on the RIGHT side of the equals sign DO NOT CHANGE. The receiving variable should be the SAME DATA TYPE as the expression on the right.

37 Examples of Assignment Code age = 17 # int variable time1 = # float variable First_Name = Sarah # string variable **NOTE: When String values are assigned their expression must be contained in quotes!** (just like in the print statement)

38 You Try: For each situation, decide on a variable name and write an assignment statement for the variable. 1) You are writing a program to calculate the area of a triangle and need a variable to save the length of the rectangle. 2) Your program intends to organize student data for MHS and you need a variable to save a student where a student lives. 3) Your program finds the average score on a test and needs a variable to save the number of test scores entered.

39 Re-Assignment Variables can (AND WILL) be reassigned multiple times throughout a program. Variable values are changed as the computer works with the program! Reusing a variable, when appropriate, makes our program more efficient

40 Re-Assignment You can reassign the value of the variable at ANY time REWRITES what is saved at that location Original value is ERASED and replace with the new value Ex: score = 10 # int score variable created score = 50 # score rewritten to 50 score = 20 # score rewritten to 20 **score will not remember that it was originally set to 10 or was set to 50 at some point it will only remember that it is currently set to 20**

41 Valid or Invalid For each statement. Decide whether the code is VALID or INVALID. If it is INVALID please state what the error is 1. num2 = 5 4. Sarah = name 2. _hello = 20* *2 = answer 3. 7score =

42 Print Statements with Variable Names Print statements can use variable names instead of quotations to output to the screen var1 = Hello var2 = Goodbye var3 = Aloha print(var1, var2, var3) Output:

43 Print Statements: + sign Can also use + signs to concatenate statements together NOTE: + sign does NOT add spaces like the, var1 = Hello var2 = Goodbye var3 = Aloha print(var1 + var2 + var3) Output:

44 Use the Variable Names Below to Write down what EXACTLY will output to the screen A = Apple B = Banana C = Carrot 1. print(a + B) 2. print(a + C, B + C) 3. print(c, B) 4. print(b + C + B)

45 Use the Variable Names Below to Write down what EXACTLY will output to the screen A = Apple B = Banana C = Carrot 1. print(a + B) AppleBanana 2. print(a + C, B + C) AppleCarrot BananaCarrot 3. print(c, B) Carrot Banana 4. print(b + C + B) BananaCarrotBanana

46 Your Task Use Quizlet Start a set of Flashcards for Computer History Things you should know: 1. All of these terms are Early Information Processing 2. All inventions know their basic purpose 3. All people know their invention as well as any special names they are known by

47

48 DAY 2 History & Binary

49 I can.. Identify important inventions and people in the history of computers. Understand binary numbers. Convert binary numbers to decimal numbers. Convert decimal numbers to binary numbers.

50 First Generation Computers ( ) First generation computers were purely electronic devices Characterized by the use of vacuum tubes in circuitry to perform calculations and process information Vacuum tubes (like a light bulb) heat up a cathode, the cathode shoots electrons used like on/off switches

51 ENIAC Made in 1946 First electronic computer using vacuum tubes for computing memory

52 ENIAC fun facts Primarily used to calculate artillery firing tables What would take humans 20 hours took ENIAC 30 seconds By the end of its operation in 1956 it contained 20,000 vacuum tubes

53 John von Neumann ( ) Created concept of the stored-program computer Program was read from punched cards in computer s memory! These programs were represented using machine language (binary) Also designed serial processor executes commands one at a time sequentially This computer design is known as the von Neumann architecture

54 EDVAC Develop in 1949 First American-made computer to make use of binary to represent information in a computer First US computer to use von Neumann s stored-program concept

55 UNIVAC I First used in 1951 First commercially produced computer Used continuously by the census bureau until 1963

56 Second Generation Computers ( ) Characterized by the use of transistors Transistors allowed for the miniaturization necessary for the space program Computer s internal memory was made of magnetic core materials Allowed for a distinction between main (internal) and auxiliary (external) memory

57 Grace Hopper ( ) Navy officer first assigned to programming the Mark I She created the first compiler to translate a program into machine language!

58 Other Important Developments Assembly Languages were developed used symbolic codes to represent binary notation of machine language The first common High Level Languages were develop to run on many different types of computers COBOL and FORTRAN Computers were smaller, faster, and more powerful AND required less energy to operate

59 Let s Talk about Numbering Systems!

60 Numbering Systems TPS Brainstorm everything you know about the following numbers systems Decimal Binary Octal Hexadecimal

61 Decimal Numbers Our Number System 17093

62 Decimal Numbers Our Number System s 1000s 100s 10s 1s Decimal Numbers Our Number System Each number is a digit 0-9 (10 Possibilities)

63 Binary Number s 2 4 8s 2 3 4s 2 2 Binary Number System Same Idea, just Base 2 Only Need TWO numbers 0 and 1 2s 2 1 1s 2 0

64 Converting Binary into decimal Remember binary is base 2! Add together each power of 2 that is used to create the binary number! = is the same as 205 in our decimal number system

65 Let s Convert the following into decimal

66 Convert the following from Binary into Decimal. 1) ) ) ) ) ) ) )

67 Check Your Answers! 1) ) ) ) ) ) ) )

68 Converting Decimal into Binary! 93

69 Convert the following from Decimal into Binary. 1) ) ) ) ) ) ) ) 9 10

70 Check your Answer 1) ) ) ) ) ) ) )

71 Your Task Use Quizlet Continue your set of Flashcards for Computer History Things you should know: 1. All of these terms are First Generation or Second Generation computers 2. Know the difference between first generation and second generation computers 3. All inventions know their basic purpose 4. All people know their invention as well as any special names they are known by

72

73 DAY 3 History and Binary, Octal, Hexadecimal

74 I can.. Identify important inventions and people in the history of computers. Understand binary numbers. Understand octal numbers. Understand hexadecimal numbers. Add binary numbers.

75 Third Generation Computers ( ) Characterized by the use of Integrated Circuits Integrated circuits = hundreds of transistors on a single block or chip of silicon

76 The First Three Generations of Circuitry Vacuum Tubes Transistors Integrated Circuits

77 Other Important Developments New or improved auxiliary memory device and I/O devices were introduced ASCII Code was developed using 7 or 8 bits to represent a keyboard characters (8 bits = 1 byte) The BASIC language developed as an interpreter language (translated and run one line at a time)

78 Fourth Generation Computers ( ) Characterized by the use of Large-Scale Integrated Circuits also known as microchips Microchips= tens of thousands (or more) transistors on a single chip Computers were becoming faster and more powerful!

79 Other Important Developments Apple dominated the microcomputer market Many new, powerful programming languages developed: Pascal, C, and Forth

80 Let s Talk about Numbering Systems! (again)

81 Numbering Systems Yesterday we discussed the Decimal and Binary Numbering Systems Today we will discuss the other two Decimal Binary Octal Hexadecimal

82 Decimal Numbers Our Number System s 1000s 100s 10s 1s Decimal Numbers Our Number System Each number is a digit 0-9 (10 Possibilities)

83 Binary Number s 2 4 8s 2 3 4s 2 2 Binary Number System Same Idea, just Base 2 Only Need TWO numbers 0 and 1 2s 2 1 1s 2 0

84 Octal Number System BASE s 512s 64s 8s 1s Octal Numbers Each number is a digit 0-7 (8 possibilities)

85 Convert the following octal number into our decimal number system

86 Convert the following from octal into decimal 1) ) ) )

87 Check your answers! 1) ) ) )

88 Hexadecimal Number System BASE s 4096s 256s 16s 1s Hexademical Numbers Each number is a digit 0-9 or letter A-F

89 Convert the following octal number into our decimal number system e9a Each number is a digit 0-9 or letter A-F

90 Convert the following from hexademical into decimal 1) B7 16 2) 1F3 16 3) ) 6ABC2 16

91 Convert the following from hexademical into decimal 1) B ) 1F ) ) 6ABC

92 Adding in Binary 2 Main Approaches 1. Use Binary Addition techniques 2. Change into decimal add change back into binary

93 Let s try it both ways

94 Trying the Following: Perform the following 1) ) ) )

95 Trying the Following: Perform the following 1) ) ) )

96 Your Task Use Quizlet Continue your set of Flashcards for Computer History Things you should know: 1. Know the difference between third generation and fourth generation computers 2. Key important inventions during each period Worksheet 2A

97

98 DAY 4 History and Math in Python!

99 I can.. Identify important inventions and people in the history of computers. Predict the result of mathematical calculations in Python.

100 Fifth Generation Computers ( ) Characterized by the use of Very Large Scale Integrated Circuits Very Large Scale Integrated circuits = hundreds of thousands of transistors on a single silicon chip Processing speeds reached over a MILLION instructions per second

101 Sixth Generation Computers (1990-?) Characterized by the use of Very, Very Large Scale Integrated Circuits Very, Very Large Scale Integrated circuits = millions of transistors on a single silicon chip Processing speeds reached and exceed a TRILLION of operations per second

102 Basic Mathematics Integer: Double: +: = 9 -: 9 11 = -2 *: 2*3 = 6 +: = 5.5 -: = 2.5 *: 4*3.3 = 13.2 Some math behaves exactly as you expect!

103 Basic Mathematics Integers: Floats: //: 14//4 = 3 % 14%4 = 2 (% = called modulus) /: 14/4 = 3.5 Some math does not behave as expected!!

104 Integer Math // = integer division - Performed only on integers - Produces an integer solution - How many times the second integer fits into the first integer % = modulus - Finds the remainder after integer division has taken place - Ex: 16 // 5 = 3 20 // 12 = 1 - Ex: 16 % 5 = 1 20 % 12 = 8

105 Let s try an Example Together 42 // 8 = 42 % 8 = 42 / 8 =

106 Try the following on your own 1) 12.5/6 = 2) 16//4 = 3) 27//5 = 4) 27%5 = 5) 25//9 = 6) 25%9 = 7) 10%4 = 8) 16.0/6 = 9) 20%7 = 10) 62//8 =

107 Examples: Pay close attention to int vs Double 1) 12.5/6 = ) 16//4 = 4 3) 27//5 = 5 4) 27%5 = 2 5) 25//9 = 2 6) 25%9 = 7 7) 10%4 = 2 8) 16.0/6 = ) 20%7 = 6 10) 62//8 = 7

108 Order of Operations Matters! P E M/D/% A/S

109 Try a few on your own 1) 4*(3 6)/ ) 0.5*10*(18%4)// ) 16//4*5//8*6%7 4) 5*4 17% /5*10 2*8 5) 48/(-8)* %5*2

110 Try a few on your own 1) 4*(3 6)/ ) 0.5*10*(18%4)// ) 16//4*5//8*6%7 4) 5*4 17% /5*10 2*8 5) 48/(-8)* %5*

111 Math Function (Math Library) Similar to importing graphics we can import a variety of math functions into our Python Programs to use You must have the following at the beginning of your code: import math

112 Math Functions (import math) Math Code math.pow(2,3) What does it do?? math.sqrt(64) math.pi math.ceil(5.2) math.floor(5.7) int(3.7)

113 Math Functions (import math) Math Code math.pow(2,3) math.sqrt(64) math.pi math.ceil(5.2) math.floor(5.7) int(3.7) What does it do?? Exponent: 2 3 Square root: 64 π Round up (ceiling) 6 Round down (floor) 5 Turns into Integer 3

114 Give the Output for Each Statement math.pow(2, 4) - 18% *( 14 // 5 ) ) 3. int(25/2) 25 // math.sqrt(9) 15 // % 6 5. math.floor(9.5) + math.ceil(6.27)

115 Give the Output for Each Statement math.pow(2, 4) - 18% *( 14 // 5 ) 3. int(25/2) 25 // math.sqrt(9) 15 // % 6 5. math.floor(9.5) + math.ceil(6.27)

116 Your Task Worksheet 2B

117

118 DAY 4 Gathering Input in Python

119 I can.. Gather input from the user of a program in Python.

120 Inputting Information Python Syntax: <variable name> = input( <prompt> ) Python will save the user s response as a STRING in the variable location

121 Examples Name = input( Enter your name: ) input( Hit any key to quit ) length = input( Enter the length of the rectangle: ) **What do we do when we want numerical input?**

122 Casting Casting converts one variable type into another! We can cast a string variable received from input by using int, float, or eval

123 Examples time = float(input( Enter time: )) **will turn the time into a float and save it as a float** age = int(input( How old are you?: )) **will turn the time into a float and save it as a float** weight = eval(input( Enter your weight )) **will convert to whatever data type the user inputs during the execution of the program**

124 Demo Program We want to create a program that will convert pounds to kilograms ALGORITHM: The steps, in order to solve a program Example algorithm: Introduce Program Input information (weight) Calculate weight in kilograms (lbs/2.2) Output answer (weight in kilograms)

125 Demo Program # First I/O Calculation Program # Converts pounds to kilograms print( This program converts your weight in pounds to kilograms\n\n ) # program description lbs = eval(input( Enter your weight in lbs: )) # takes in user lbs, converts to number and saves in lbs variable kgs = lbs/2.2 # converts lbs to kgs and saves in variable kgs

126 Demo Program (part 2) print( \n\nyour weight in kgs is:, kgs) # concatenates string displays kgs to the screen print( \n\n\n ) # adds extra spaces input( Hit any key to quit ) # allows user to end program

127 In Class Task Write a program that will do the following: Take is 5 test scores from the user Calculate the average test score Output the average test score to the user **When you are done, show Ms. Wardecke and she will give you Worksheet 2C to work on for homework**

Computers in Engineering COMP 208. A Brief History. Mechanical Calculators. A Historic Perspective Michael A. Hawker

Computers in Engineering COMP 208. A Brief History. Mechanical Calculators. A Historic Perspective Michael A. Hawker Computers in Engineering COMP 208 A Historic Perspective Michael A. Hawker Sept 4th, 2007 Computers in Engineering 1 A Brief History Abacus considered first mechanical computing device Used beads and rods

More information

Computers in Engineering COMP 208

Computers in Engineering COMP 208 Computers in Engineering COMP 208 A Historic Perspective Michael A. Hawker Sept 4th, 2007 Computers in Engineering 1 A Brief History Abacus considered first mechanical computing device Used beads and rods

More information

Overview of a computer

Overview of a computer Overview of a computer One marks 1. What is von Neumann concept also called as? Stored memory or stored program concept. 2. Who is the father of computer Charles Babbage 3. What is a computer? It is an

More information

Welcome to COSC Introduction to Computer Science

Welcome to COSC Introduction to Computer Science Welcome to COSC 1302 Introduction to Computer Science (Syllabus) Chapter 1 The Big Picture 1.1 Computing Systems Hardware The physical elements of a computing system (printer, circuit boards, wires, keyboard

More information

Chapter 1. The Big Picture

Chapter 1. The Big Picture Chapter 1 The Big Picture 1.1 Computing Systems Hardware The physical elements of a computing system (printer, circuit boards, wires, keyboard ) Software The programs that provide the instructions for

More information

1: History, Generation & Classification. Shobhanjana Kalita, Dept. of CSE, Tezpur University

1: History, Generation & Classification. Shobhanjana Kalita, Dept. of CSE, Tezpur University 1: History, Generation & Classification Shobhanjana Kalita, Dept. of CSE, Tezpur University History Computer originally (17 th century) meant someone who computes Only in the 20 th century it was associated

More information

A Brief History of Computer Science

A Brief History of Computer Science A Brief History of Computer Science 4700 Hundred years ago Sumerians invented the abacus Sand, lines, pebbles Sexagesimal Base 60 still used today Time, distance How do you count like that? Side trip Factors

More information

You Will Need Floppy Disks for your labs!

You Will Need Floppy Disks for your labs! CIS121 Instructor: Lynne Mayer VoiceMail: (847) 697-1000 x 2328 Lmayer@elgin.edu Office Hours: ICT 122 Mon.: 9:15-10:15 AM, 5:15-6:00 PM Wed.: 9:15-10:15 AM Fri.: 2:30-3:30 PM Website: faculty.elgin.edu/lmayer

More information

Algorithm: Program: Programming: Software: Hardware:

Algorithm: Program: Programming: Software: Hardware: 0-1 0-2 Terminology Algorithm: A set of steps that defines how a task is performed Program: A representation of an algorithm Programming: The process of developing a program Software: Programs and algorithms

More information

EVOLUTION OF COMPUTERS. In the early years, before the computer was invented, there are several inventions of counting machines.

EVOLUTION OF COMPUTERS. In the early years, before the computer was invented, there are several inventions of counting machines. EVOLUTION OF COMPUTERS In the early years, before the computer was invented, there are several inventions of counting machines. 200 BC 500 BC CHINESE ABACUS EGYPTIAN ABACUS 1620 JOHN NAPIER NAPIER'S BONES

More information

Computer Basics. Computer Technology

Computer Basics. Computer Technology Computer Basics Computer Technology What is a Computer Information Processor Input Output Processing Storage Are physical parts like monitor, mouse, keyboard essential? Computer History Abacus 3,000 B.C.

More information

(History of Computers) Lecture # 03 By: M.Nadeem Akhtar. Lecturer. URL:

(History of Computers) Lecture # 03 By: M.Nadeem Akhtar. Lecturer. URL: INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGIES. (History of Computers) Lecture # 03 By: M.. Lecturer. Department of CS & IT. URL: https://sites.google.com/site/nadeemcsuoliict/home/lectures 1

More information

Welcome to COS151! 1.1

Welcome to COS151! 1.1 Welcome to COS151! Title: Introduction to Computer Science Course website: https://cs.up.ac.za/admin/courses/cos151 Find the study guide there Announcements Assignments (download & upload) Brief overview

More information

Computer History CSCE 101

Computer History CSCE 101 Computer History CSCE 101 Computer History In 40 years computers went from being giant expensive machines that only corporations could own to the personal computer we see today. Early Calculating Devices

More information

Babbage s computer 1830s Boolean logic 1850s. Hollerith s electric tabulator Analog computer 1927 EDVAC 1946 ENIAC

Babbage s computer 1830s Boolean logic 1850s. Hollerith s electric tabulator Analog computer 1927 EDVAC 1946 ENIAC Abacus 1100 BC Slide rule - 1617 Mechanical calculator - 1642 Automatic loom (punched cards) - 1804 Babbage s computer 1830s Boolean logic 1850s Hollerith s electric tabulator - 1880 Analog computer 1927

More information

A Brief History of Computer Science. David Greenstein Monta Vista High School, Cupertino, CA

A Brief History of Computer Science. David Greenstein Monta Vista High School, Cupertino, CA A Brief History of Computer Science David Greenstein Monta Vista High School, Cupertino, CA History of Computing Machines Definition of Computer A programmable machine A machine that manipulates data according

More information

Expressions and Variables

Expressions and Variables Expressions and Variables Expressions print(expression) An expression is evaluated to give a value. For example: 2 + 9-6 Evaluates to: 5 Data Types Integers 1, 2, 3, 42, 100, -5 Floating points 2.5, 7.0,

More information

Chapter 2 HISTORICAL DEVELOPMENT OF COMPUTERS

Chapter 2 HISTORICAL DEVELOPMENT OF COMPUTERS Chapter 2 HISTORICAL DEVELOPMENT OF COMPUTERS History of Computers Outline Generations of Computers Types of Computers 2 History of Computers A computer is a machine that works with data and information

More information

Part (01) Introduction to Computer

Part (01) Introduction to Computer Part (01) Introduction to Computer Dr. Ahmed M. ElShafee 1 Dr. Ahmed ElShafee, ACU : Summer 2014, Introduction to CS 1 TURING MODEL The idea of a universal computational device was first described by Alan

More information

History of Computing. Slides from NYU and Georgia Tech

History of Computing. Slides from NYU and Georgia Tech History of Computing Slides from NYU and Georgia Tech Early Computational Devices (Chinese) Abacus 2700 2300 BC Used for performing arithmetic operations Early Computational Devices Napier s Bones, 1617

More information

Great Inventions written by Bob Barton

Great Inventions written by Bob Barton COMPUTER Great Inventions written by Bob Barton Computers Computers help society function in many vital ways, often without our being aware of them. Computers control traffic lights and factory operations.

More information

Chapter 1 History & Hardware

Chapter 1 History & Hardware Chapter 1 History & Hardware 1-1 Mechanical Machines History & Generations of Computing The first computers (some in the 17th century) were mechanical devices not electronic devices. While the technology

More information

Chapter 1: An Introduction to Computer Science. Invitation to Computer Science, C++ Version, 6-th Edition

Chapter 1: An Introduction to Computer Science. Invitation to Computer Science, C++ Version, 6-th Edition Chapter 1: An Introduction to Computer Science Invitation to Computer Science, C++ Version, 6-th Edition Objectives In this chapter, you will learn about The definition of computer science Algorithms A

More information

Describe the layers of a computer system

Describe the layers of a computer system Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe the history of computer hardware and software

More information

In this chapter, you will learn about: The definition of computer science. Algorithms. Invitation to Computer Science, C++ Version, Third Edition

In this chapter, you will learn about: The definition of computer science. Algorithms. Invitation to Computer Science, C++ Version, Third Edition Objectives Chapter 1: An Introduction to Com puter S cience Invitation to Computer Science, C++ Version, Third Edition In this chapter, you will learn about: The definition of computer science Algorithms

More information

Computer Systems. Hardware, Software and Layers of Abstraction

Computer Systems. Hardware, Software and Layers of Abstraction Computer Systems Hardware, Software and Layers of Abstraction 1 Automation & Computers Fundamental question of computer science: What can be automated? Computers automate processing of information Computer

More information

Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall

Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall 1 Technology in Action Technology in Focus: The History of the PC 2 The first personal computer Sold as a kit Switches for input Lights for output Altair 8800 Bill Gates and Paul Allen created a compiler

More information

HISTORY OF COMPUTING

HISTORY OF COMPUTING NAME: DATE: PERIOD: 01) Definition of computers: HISTORICAL DEVICES 02) How is the term Analog used when representing data? 03) Answer the questions for the two devices used prior to the invention of the

More information

Python Programming Exercises 1

Python Programming Exercises 1 Python Programming Exercises 1 Notes: throughout these exercises >>> preceeds code that should be typed directly into the Python interpreter. To get the most out of these exercises, don t just follow them

More information

CS 1 Notes 1 - Early Computing and 2 - Electronic Computing

CS 1 Notes 1 - Early Computing and 2 - Electronic Computing CS 1 Notes 1 - Early Computing and 2 - Electronic Computing Computer Science: The discipline that seeks to build a scientific foundation for such topics as: computer design computer programming information

More information

Evolution of the Computer

Evolution of the Computer Evolution of the Computer Janaka Harambearachchi (Engineer/Systems Development) Zeroth Generation- Mechanical 1. Blaise Pascal -1642 Mechanical calculator only perform + - 2. Von Leibiniz -1672 Mechanical

More information

Computer Architecture. Prologue. Topics Computer Architecture. Computer Organization. Organization vs. Architecture. History of Computers

Computer Architecture. Prologue. Topics Computer Architecture. Computer Organization. Organization vs. Architecture. History of Computers Computer Architecture Prologue 1 Topics Computer Architecture Computer Organization Organization vs. Architecture History of Computers Generations of Computers Moore s Law 2 Computer Architecture (1) Definition?

More information

The Generations of Computers

The Generations of Computers The Generations of Computers The development of computers started with mechanical and electromechanical devices (17 th through 19 th century) and has progressed through four generations of computers. Mechanical

More information

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine Quiz Questions 1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine 5/1/2006 Computer Programming TA 103 BE I year 2

More information

CS101 Lecture 29: Brief History of Computing

CS101 Lecture 29: Brief History of Computing CS101 Lecture 29: Brief History of Computing "There is no reason anyone would want a computer in their home." -- Ken Olson, founder and CEO of Digital Equipment Corp., 1977 John Magee 1 August 2013 Some

More information

Programming with Python

Programming with Python Programming with Python Dr Ben Dudson Department of Physics, University of York 21st January 2011 http://www-users.york.ac.uk/ bd512/teaching.shtml Dr Ben Dudson Introduction to Programming - Lecture 2

More information

Introduction to Computer Systems

Introduction to Computer Systems Introduction to Computer Systems By Farhan Ahmad farhanahmad@uet.edu.pk Department of Chemical Engineering, University of Engineering & Technology Lahore Introducing Computer Systems Exploring computers

More information

Getting Started. Office Hours. CSE 231, Rich Enbody. After class By appointment send an . Michigan State University CSE 231, Fall 2013

Getting Started. Office Hours. CSE 231, Rich Enbody. After class By appointment send an  . Michigan State University CSE 231, Fall 2013 CSE 231, Rich Enbody Office Hours After class By appointment send an email 2 1 Project 1 Python arithmetic Do with pencil, paper and calculator first Idle Handin Help room 3 What is a Computer Program?

More information

Fundamentals of Python: First Programs. Chapter 1: Introduction Modifications by Mr. Dave Clausen

Fundamentals of Python: First Programs. Chapter 1: Introduction Modifications by Mr. Dave Clausen Fundamentals of Python: First Programs Chapter 1: Introduction Modifications by Mr. Dave Clausen Objectives After completing this chapter, you will be able to: Describe the basic features of an algorithm

More information

HISTORY OF COMPUTERS HISTORY OF COMPUTERS. Mesleki İngilizce - Technical English. Punch Card. Digital Data. II Prof. Dr. Nizamettin AYDIN.

HISTORY OF COMPUTERS HISTORY OF COMPUTERS. Mesleki İngilizce - Technical English. Punch Card. Digital Data. II Prof. Dr. Nizamettin AYDIN. Mesleki İngilizce - Technical English II Prof. Dr. Nizamettin AYDIN naydin@yildiz.edu.tr Notes: In the slides, texts enclosed by curly parenthesis, { }, are examples. texts enclosed by square parenthesis,

More information

Monday, January 27, 2014

Monday, January 27, 2014 Monday, January 27, 2014 Topics for today History of Computing (brief) Encoding data in binary Unsigned integers Signed integers Arithmetic operations and status bits Number conversion: binary to/from

More information

Fundamental concepts of Information Technology

Fundamental concepts of Information Technology Fundamental concepts of Information Technology A brief history, the Neumann architecture, the language of computers Csernyi Gábor Department of English Linguistics University of Debrecen Csernyi Gábor

More information

ENG 101 Lesson -6. History of Computers

ENG 101 Lesson -6. History of Computers Today's lesson will follow the pattern established by us in the earlier lessons.we will read a text to help us in comprehension then we will do exercises based on this text. ENG 101 Lesson -6 When you

More information

Introduction to Computer Science. What is Computer Science?

Introduction to Computer Science. What is Computer Science? Introduction to Computer Science CS A101 What is Computer Science? First, some misconceptions. Misconception 1: I can put together my own PC, am good with Windows, and can surf the net with ease, so I

More information

CHAPTER 2: Introduction to Python COMPUTER PROGRAMMING SKILLS

CHAPTER 2: Introduction to Python COMPUTER PROGRAMMING SKILLS CHAPTER 2: Introduction to Python COMPUTER PROGRAMMING SKILLS 1439-1440 1 Outline 1. Introduction 2. Why Python? 3. Compiler and Interpreter 4. The first program 5. Comments and Docstrings 6. Python Indentations

More information

Computers History How to make one from marbles Moore s s Law Sohaib Ahmad Khan Early History: Abacus In use since 3 B.C. addition, subtraction, multiplication, division, square roots, cube roots Not really

More information

4. History of computers and applications

4. History of computers and applications In this lesson you will learn: 4. History of computers and applications Savani and Ali have brought things like abacus, some pictures of old computers, a slide rule that was made by hand, a cloth with

More information

An Introduction to Computer Science CS 8: Introduction to Computer Science Lecture #2

An Introduction to Computer Science CS 8: Introduction to Computer Science Lecture #2 An Introduction to Computer Science CS 8: Introduction to Computer Science Lecture #2 Ziad Matni Dept. of Computer Science, UCSB A Word About Registration for CS8 FOR THOSE OF YOU NOT YET REGISTERED: This

More information

CMSC 201 Computer Science I for Majors

CMSC 201 Computer Science I for Majors CMSC 201 Computer Science I for Majors Lecture 02 Intro to Python Syllabus Last Class We Covered Grading scheme Academic Integrity Policy (Collaboration Policy) Getting Help Office hours Programming Mindset

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

Computer Evolution. Budditha Hettige. Department of Computer Science

Computer Evolution. Budditha Hettige. Department of Computer Science Computer Evolution Budditha Hettige Department of Computer Science Computer Generation 1. Zeroth generation- Mechanical Computers (1642-1940) 2. First generation - Vacuum Tubes (1940-1955) 3. Second Generation

More information

CHAPTER 1 Introduction

CHAPTER 1 Introduction CHAPTER 1 Introduction 1.1 Overview 1 1.2 The Main Components of a Computer 3 1.3 An Example System: Wading through the Jargon 4 1.4 Standards Organizations 13 1.5 Historical Development 14 1.5.1 Generation

More information

COMP 102: Computers and Computing Lecture 1: Introduction!

COMP 102: Computers and Computing Lecture 1: Introduction! COMP 102: Computers and Computing Lecture 1: Introduction! Instructor: Kaleem Siddiqi (siddiqi@cim.mcgill.ca) Class web page: www.cim.mcgill.ca/~siddiqi/102.html Outline for today What are computers? What

More information

1. What is the minimum number of bits needed to store a single piece of data representing: a. An integer between 0 and 100?

1. What is the minimum number of bits needed to store a single piece of data representing: a. An integer between 0 and 100? 1 CS 105 Review Questions Most of these questions appeared on past exams. 1. What is the minimum number of bits needed to store a single piece of data representing: a. An integer between 0 and 100? b.

More information

Computer Evolution. Computer Generation. The Zero Generation (3) Charles Babbage. First Generation- Time Line

Computer Evolution. Computer Generation. The Zero Generation (3) Charles Babbage. First Generation- Time Line Computer Generation Computer Evolution Budditha Hettige Department of Computer Science 1. Zeroth generation- Mechanical Computers (1642-1940) 2. First generation - Vacuum Tubes (1940-1955) 3. Second Generation

More information

Machine Architecture and Number Systems

Machine Architecture and Number Systems Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Binary to Decimal Converting from Decimal

More information

Variable and Data Type I

Variable and Data Type I The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Intro. To Computers (LNGG 1003) Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad February 18, 2017 Variable is reserved

More information

Variable and Data Type I

Variable and Data Type I Islamic University Of Gaza Faculty of Engineering Computer Engineering Department Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad September 24, 2016 Variable is reserved a location in memory to store

More information

Fundamentals of Digital Computers The mechanical computer age began with the advent of the abacus in 500 B.C by Babylonians. The abacus, which was

Fundamentals of Digital Computers The mechanical computer age began with the advent of the abacus in 500 B.C by Babylonians. The abacus, which was 1 Fundamentals of Digital Computers The mechanical computer age began with the advent of the abacus in 500 B.C by Babylonians. The abacus, which was used extensively and is still in use today, was not

More information

MACHINE LEVEL REPRESENTATION OF DATA

MACHINE LEVEL REPRESENTATION OF DATA MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems

More information

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer? CMSC104 Lecture 2 Remember to report to the lab on Wednesday Topics Machine Architecture and Number Systems Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number

More information

A (BRIEF) HISTORY OF COMPUTING. By Dane Paschal

A (BRIEF) HISTORY OF COMPUTING. By Dane Paschal A (BRIEF) HISTORY OF COMPUTING By Dane Paschal BIASES Amero-Euro centric Computer science centric Google centric ANCIENT ORIGINS Counting is hard The Human Brain Abacus Numerals THE 1700 S AND 1800 S Computing

More information

Chapter 3 : Informatics Practices. Class XI ( As per CBSE Board) Python Fundamentals. Visit : python.mykvs.in for regular updates

Chapter 3 : Informatics Practices. Class XI ( As per CBSE Board) Python Fundamentals. Visit : python.mykvs.in for regular updates Chapter 3 : Informatics Practices Class XI ( As per CBSE Board) Python Fundamentals Introduction Python 3.0 was released in 2008. Although this version is supposed to be backward incompatibles, later on

More information

Jython. secondary. memory

Jython. secondary. memory 2 Jython secondary memory Jython processor Jython (main) memory 3 Jython secondary memory Jython processor foo: if Jython a

More information

History of Modern Computing Lesson 1

History of Modern Computing Lesson 1 History of Modern Computing Lesson 1 www.soe.ucsc.edu/classes/cmpe080h/fall05 David Pease Computer Engineering Department Jack Baskin School of Engineering Lesson Outline Definition of a computer Types

More information

COURSE OVERVIEW. Introduction to Computer Engineering 2015 Spring by Euiseong Seo

COURSE OVERVIEW. Introduction to Computer Engineering 2015 Spring by Euiseong Seo COURSE OVERVIEW Introduction to Computer Engineering 2015 Spring by Euiseong Seo Course Objectives Introduction to computer engineering For computer engineer-wannabe For students studying other fields

More information

MICROPROCESSOR SYSTEM DESIGN

MICROPROCESSOR SYSTEM DESIGN MICROPROCESSOR SYSTEM DESIGN COURSE INTRODUCTION 1 MICROPROCESSOR SYSTEM DESIGN ET011G History of Computer Micro-controllers Introduction Course Aims? Course contents? Invisible computing 2 History EARLY

More information

HIGHER SECONDARY FIRST YEAR 2 MARK & 5 MARK NOTES CHAPTER 1 1. INTRODUCTION TO COMPUTER

HIGHER SECONDARY FIRST YEAR 2 MARK & 5 MARK NOTES CHAPTER 1 1. INTRODUCTION TO COMPUTER 1. What is computer? CHAPTER 1 1. INTRODUCTION TO COMPUTER A computer is an electronic machine, capable of performing basic operations like addition, subtraction, multiplication, division, etc. The computer

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

CS 1301 Exam 1 Fall 2009

CS 1301 Exam 1 Fall 2009 Page 1/6 CS 1301 Fall 2009 Exam 1 Your Name: I commit to uphold the ideals of honor and integrity by refusing to betray the trust bestowed upon me as a member of the Georgia Tech community. CS 1301 Exam

More information

CHAPTER 1 Introduction

CHAPTER 1 Introduction CHAPTER 1 Introduction 1.1 Overview 1 1.2 The Main Components of a Computer 3 1.3 An Example System: Wading through the Jargon 4 1.4 Standards Organizations 15 1.5 Historical Development 16 1.5.1 Generation

More information

CS 1301 Exam 1 Answers Fall 2009

CS 1301 Exam 1 Answers Fall 2009 Page 1/6 CS 1301 Fall 2009 Exam 1 Your Name: I commit to uphold the ideals of honor and integrity by refusing to betray the trust bestowed upon me as a member of the Georgia Tech community. CS 1301 Exam

More information

SSRVM Content Creation Template

SSRVM Content Creation Template SSRVM Content Creation Template Title: Evolution of Computers Contributors: Sreeja. T Std: IV Submission Date: Reviewers: Approval Date: REF No: Brief Description: Goal: Brief History which reveals a clear

More information

The float type and more on variables FEB 6 TH 2012

The float type and more on variables FEB 6 TH 2012 The float type and more on variables FEB 6 TH 2012 The float type Numbers with decimal points are easily represented in binary: 0.56 (in decimal) = 5/10 + 6/100 0.1011 (in binary) = ½+0/4 + 1/8 +1/16 The

More information

EEM336 Microprocessors I. Introduction to the Microprocessor and Computer

EEM336 Microprocessors I. Introduction to the Microprocessor and Computer EEM336 Microprocessors I Introduction to the Microprocessor and Computer Introduction Overview of Intel microprocessors. Discussion of history of computers. Function of the microprocessor. Terms and jargon

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

Variables, expressions and statements

Variables, expressions and statements Variables, expressions and statements 2.1. Values and data types A value is one of the fundamental things like a letter or a number that a program manipulates. The values we have seen so far are 2 (the

More information

C++ Programming: From Problem Analysis to Program Design, Third Edition

C++ Programming: From Problem Analysis to Program Design, Third Edition C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 2: Basic Elements of C++ Objectives (continued) Become familiar with the use of increment and decrement operators Examine

More information

Angel International School - Manipay 1 st Term Examination November, 2015 ICT

Angel International School - Manipay 1 st Term Examination November, 2015 ICT Grade 07 Angel International School - Manipay 1 st Term Examination November, 2015 ICT I. Underline the correct answer. Duration: 2 Hours Index No:- 1) Components of a computer CPU are (a) ALU, CU (b)

More information

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING JAN BARTONÍČEK This paper's goal is to briefly explain the basic theory behind programming languages and their history

More information

7. History of computers and applications

7. History of computers and applications In this lesson you will learn: 7. History of computers and applications Jyoti and Tejas have brought things like abacus, some pictures of old computers, a slide rule that was made by hand, a cloth with

More information

The C++ Language. Arizona State University 1

The C++ Language. Arizona State University 1 The C++ Language CSE100 Principles of Programming with C++ (based off Chapter 2 slides by Pearson) Ryan Dougherty Arizona State University http://www.public.asu.edu/~redoughe/ Arizona State University

More information

An Introduction to Python for KS4!

An Introduction to Python for KS4! An Introduction to Python for KS4 Python is a modern, typed language - quick to create programs and easily scalable from small, simple programs to those as complex as GoogleApps. IDLE is the editor that

More information

Computer Organization CS 206T

Computer Organization CS 206T Computer Organization CS 206T Topics Introduction Historical Background Structure & Function System Interconnection 2 1. Introduction Why study computer organization and architecture? Design better programs,

More information

Chapter 2. The History and Development of Computers

Chapter 2. The History and Development of Computers Chapter 2 The History and Development of Computers Ancient Computing Devices Fingers Tally bones Sticks Stones cal Abacus- 5000 years ago John Napier 1617 Scotland Napier s Bones Square sticks with numbers

More information

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

CPS122 Lecture: From Python to Java last revised January 4, Objectives: Objectives: CPS122 Lecture: From Python to Java last revised January 4, 2017 1. To introduce the notion of a compiled language 2. To introduce the notions of data type and a statically typed language 3.

More information

CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output

CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output CSCE 110 Programming I Basics of Python: Variables, Expressions, Input/Output Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Spring 2011 Python Python was developed

More information

I1100 Introduction to Computer Science Semester: 1 Academic Year: 2018/2019 Credits: 3 (30 hours) Dr. Antoun Yaacoub

I1100 Introduction to Computer Science Semester: 1 Academic Year: 2018/2019 Credits: 3 (30 hours) Dr. Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree I1100 Introduction to Computer Science Semester: 1 Academic Year: 2018/2019 Credits: 3 (30 hours) Dr. Antoun Yaacoub 2 Faculty of Science

More information

The trusted, student-friendly online reference tool. Name: Date:

The trusted, student-friendly online reference tool. Name: Date: World Book Online: The trusted, student-friendly online reference tool. World Book Advanced Database* Name: Date: History of Computers Computers! Virtually no other form of technology has become so powerful

More information

Objectives. In this chapter, you will:

Objectives. In this chapter, you will: Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types Discover how a program evaluates arithmetic expressions Learn about

More information

Notes By: Shailesh Bdr. Pandey, TA, Computer Engineering Department, Nepal Engineering College

Notes By: Shailesh Bdr. Pandey, TA, Computer Engineering Department, Nepal Engineering College HISTORY AND GENERATIONS OF COMPUTING Modified by: Shailesh Bdr. Pandey, TA, Computer Engineering, Nepal Engineering College Copyright Remains with the Original Creators Original Source: http://www.tcf.ua.edu/az/ithistoryoutline.htm

More information

Chapter 1: Introduction to Computers

Chapter 1: Introduction to Computers Slide 1/17 Learning Objectives In this chapter you will learn about: Computer Data processing Characteristic features of computers Computers evolution to their present form Computer generations Characteristic

More information

An Introduction to Computer Science CS 8: Introduction to Computer Science, Winter 2018 Lecture #2

An Introduction to Computer Science CS 8: Introduction to Computer Science, Winter 2018 Lecture #2 An Introduction to Computer Science CS 8: Introduction to Computer Science, Winter 2018 Lecture #2 Ziad Matni Dept. of Computer Science, UCSB A Word About Registration for CS8 FOR THOSE OF YOU NOT YET

More information

Chapter 1: Introduction to Computers. In this chapter you will learn about:

Chapter 1: Introduction to Computers. In this chapter you will learn about: Ref Page Slide 1/17 Learning Objectives In this chapter you will learn about: Computer Data processing Characteristic features of computers Computers evolution to their present form Computer generations

More information

CS 102 Lab 3 Fall 2012

CS 102 Lab 3 Fall 2012 Name: The symbol marks programming exercises. Upon completion, always capture a screenshot and include it in your lab report. Email lab report to instructor at the end of the lab. Review of built-in functions

More information

Reserved Words and Identifiers

Reserved Words and Identifiers 1 Programming in C Reserved Words and Identifiers Reserved word Word that has a specific meaning in C Ex: int, return Identifier Word used to name and refer to a data element or object manipulated by the

More information

CS177 Python Programming. Recitation 2 - Computing with Numbers

CS177 Python Programming. Recitation 2 - Computing with Numbers CS177 Python Programming Recitation 2 - Computing with Numbers Outline Data types. Variables Math library. Range Function What is data (in the context of programming)? Values that are stored and manipulated

More information

Ex: If you use a program to record sales, you will want to remember data:

Ex: If you use a program to record sales, you will want to remember data: Data Variables Programs need to remember values. Ex: If you use a program to record sales, you will want to remember data: A loaf of bread was sold to Sione Latu on 14/02/19 for T$1.00. Customer Name:

More information

What did we talk about last time? Examples switch statements

What did we talk about last time? Examples switch statements Week 4 - Friday What did we talk about last time? Examples switch statements History of computers Hardware Software development Basic Java syntax Output with System.out.print() Mechanical Calculation

More information

Outline. Data and Operations. Data Types. Integral Types

Outline. Data and Operations. Data Types. Integral Types Outline Data and Operations Data Types Arithmetic Operations Strings Variables Declaration Statements Named Constant Assignment Statements Intrinsic (Built-in) Functions Data and Operations Data and Operations

More information