Programming In.

Slides:



Advertisements
Similar presentations
PROGRAMMING In. STARTER Using the internet…Find … what does case sensitive mean what a programming language is.. 3 benefits of Python.
Advertisements

Python Basics: Statements Expressions Loops Strings Functions.
Programming in python Lesson 2.
PROGRAMMING In. STARTER Using the internet…Find …  what does “case sensitive” mean  what a programming language is..  3 benefits of Python.
Python. What is Python? A programming language we can use to communicate with the computer and solve problems We give the computer instructions that it.
An Introduction to Textual Programming
Introduction to Python
Munster Programming Training
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 9, 2015)
Python Programming Introduction to programming using python.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
Do it now activity Last term we learnt about how data is represented in a computer and about how to identify different volumes of data. How many bits in.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also.
PROGRAMMING In Lesson 2. STARTER ACTIVITY Complete the starter activity in your python folder – lesson 2 Now we will see how you got on and update your.
PROGRAMMING In. Objectives  We’re learning to develop basic code with the use of the correct syntax and variables. Outcomes  Explain what syntax is.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
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.
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.
Introduction to Programming Python Lab 3: Arithmetic 22 January PythonLab3 lecture slides.ppt Ping Brennan
First Program  Open a file  In Shell  Type into the file: 3  You did it!!! You wrote your first instruction, or code, in python!
Programming In Python. Starter Using the internet… Find what a programming language is.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Getting Started With Python Brendan Routledge
Introducing Python 3 Introduction to Python. Introduction to Python L1 Introducing Python 3 Learning Objectives Know what Python is and some of the applications.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Introducing Python Introduction to Python.
Development Environment
More about comments Review Single Line Comments The # sign is for comments. A comment is a line of text that Python won’t try to run as code. Its just.
Introduction to Computing Science and Programming I
what is computer programming?
Whatcha doin'? Aims: To start using Python. To understand loops.
A Playful Introduction to Programming by Jason R. Briggs
Python: Experiencing IDLE, writing simple programs
Chapter 2 Introduction to C++ Programming
GCSE COMPUTER SCIENCE Practical Programming using Python
Input and Output Upsorn Praphamontripong CS 1110
Lesson 1 - Sequencing.
Introduction to Python
Introduction to Python
Lesson 1 An Introduction
Beginning C++ Programming
Variables, Expressions, and IO
Mathcad Basics The Mathcad does not require any programming language to perform simple operations. The Mathcad follow the precedence of operation such.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Learning to Program in Python
Today’s lesson – Python next steps
Week 1 Computer Programming Year 9 – Unit 9.04
Introduction to Programming
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Programming In Lesson 3.
Learning Outcomes –Lesson 4
Teaching London Computing
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Introduction to Programming
Section 1 Introduction To Programming
PYTHON: BUILDING BLOCKS Sequencing & Selection
ICT Programming Lesson 1:
Python Lesson’S 1 & 2 Mr. Kalmes.
Programming In Lesson 4.
Introduction to Programming
Beginning Python Programming
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
Introduction to Python
Chapter 1 Introducing Small Basic
Starter Which of these inventions is: Used most by people in Britain
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

Programming In

Using the internet…Find … what does “case sensitive” mean Starter Using the internet…Find … what does “case sensitive” mean what a programming language is.. 3 benefits of Python

Objectives Outcomes Learn about python as a programming language Learn about expressions & variables and their use Create several successful programs Outcomes All-Level 4- State what a programming language is and what a program is. Get half marks on the test (7/15) Most-Level 5- Have used variables and with help get 75% on the test (12/15) Some-Level 6- Written their own programs and independently got maximum marks on the test.

Housekeeping Open the ICT levels spread sheet and find python tab Read each Yellow box and answer in the white box.

copy the Unit resources Copy the folder: Unit 6 Python From Common K  ICT  Year 8 To My Documents  ICT  Year 8

Targets. Open the self evaluation workbook and fill in the boxes in green ellipse (squashed circle) This workbook will be used throughout the python unit – DO NOT LOSE IT. It will be used at the end by the teacher to assess your ICT Level.

Python Python is a programming language A set of words and rules for instructing a computer to perform specific tasks. The term programming language usually refers to high-level languages, such as BASIC, C, C++, Python etc Each Programming language has a set of keywords and a special syntax for writing program instructions.

Learning to program is going to be fun – so lets keep it simple. Why Python org 100h main proc mov ah,9 ; mov dx,offset hello_message int 21h : retn hello_message db 'Hello, world!$' main endp end main Assembler python print ("Hello, World!“) #include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; } C++ Learning to program is going to be fun – so lets keep it simple.

What is a program Programming is not telling the computer what you want to do….it is telling it EXACTLY HOW to do it. (get student to walk round v robot) A program is a sequence of instructions that specifies how to perform a computation. The computation might be something mathematical, such as solving a system of equations It can also be a symbolic computation, such as searching and replacing text in a document or moving a graphic icon (sprite) on a game.

TRadition print (“Hello, World”) It is tradition that the first program everyone creates is to say Hello world”. From the start menu – all programs / python 3.3 / idle Open Idle(python GUI) MAKE SURE YOU ARE IN THE PYTHON SHELL Enter the following and press enter print (“Hello, World”) If you see this window on top – look for the python shell window. This one

Expressions Try typing some of these expression in idle, pressing return after each one print (2+2+2+2+2) print (8*6) print (10-5+6) print ( 2  +       2)

Expressions You have been using expressions 2 values and an operator Even the 2+2+2+2 follows this rule Operators, you already know. Perhaps the multiplication is written differently as a * (on the number pad) At the moment python is acting like a calculator. 2+2 addition 2-2 subtraction 2*2 multiplication 2/2 division

Syntax In computer science, the syntax of a programming language is the set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language. Aka syntax means that special key words and characters combine to result in a program.

Syntax print hello print (hello) PRINT(“hello”) print (a + b) The syntax of a programming language is the set of rules that control if a program is correct. You tried print (“Hello, World”) and it worked – a correct program. Try these print hello print (hello) PRINT(“hello”) print (a + b) print (5 + 6 / 7 +) Syntax is CRITICAL in programming. A computer cannot take an educated guess at your instructions. Computers just follow exactly what you tell them to do.

Variables spam = 15 print (spam) A variable is just a box with a number in it. When we use variable in our code the computer uses the value in the variable. To store the value 15 in the variable and display it spam = 15 print (spam) Try it. Now try these spam = spam + 12 print (spam) spam = spam + spam spam = spam * spam

Variables In python eggs is not the same as EGGS. This time we have 2 variables eggs and fizz You can assign them by eggs = 15 fizz = 10 What be the output of the following, go on try it. print( eggs ) print( eggs + fizz ) spam = eggs + fizz print( spam ) eggs = fizz print( EGGS ) In python eggs is not the same as EGGS. Python is case sensitive which means YOU MUST BE CAREFUL 15 25 >>>nothing 10 Traceback (most recent call last): File "<pyshell#37>", line 1, in <module> EGGS NameError: name 'EGGS' is not defined

Complete Self Assessment quiz Complete Self Assessment quiz from lesson 1 folder you copied at the start of the lesson.

Plenary Mark the self assessment And update your self-evaluation for this lesson.

Fun time Try the space ship challenge tdemo_spaceship in common K/ temp_store.