Python Programming Introduction to programming using python.

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Introduction to Programming using Matlab Session 2 P DuffourJan 2008.
Programming in python Lesson 2.
Running Records.
Sequencing Miss Regan. Blood Hound  Does anyone know what the Bloodhound project is?  Video 1 Video 1  Video 2 Video 2  Link to website Link to website.
PROGRAMMING In. STARTER Using the internet…Find …  what does “case sensitive” mean  what a programming language is..  3 benefits of Python.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
The Scratch Calculator You are all going to be real computer programmers!!!
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
An Introduction to Textual Programming
WHAT IS THIS? OBJECTIVE AND OUTCOMES Candidates should be able to: Describe and explain the CPU as fetching, decoding and executing of instructions and.
Introduction to Python
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.
General Programming Introduction to Computing Science and Programming I.
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
Programs, programs, everywhere! This is a starter activity and should take 5 minutes 1.Open up a text editor such as Notepad. 2.Write a list of all the.
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.
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.
Python Programming Using Variables and input. Objectives We’re learning to use basic knowledge of variables combined with user input. Outcomes Continue.
What am I?. Translators Translators – Module Knowledge Areas Types of translators and their use Lexical analysis Syntax analysis Code generation and.
Maths in Python [ slide 5 ] 1.Copy the table 2.Race a friend with a calculator to see whether Python is faster than a calculator: a) 5 * 6.5 = b)7 / 3.
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.
A First Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Credits: a significant part of.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake An Introduction to Programming.
Programming Seminar 2009 Night 0. Why we’re holding this seminar You’re probably not a computer science major – Or even anything remotely close (e.g.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Introduction to Text Based Coding. We’re learning to explore how text based programming works You will display and enter text into a window You will use.
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.
Cloning and creating! Introduction to cloning and creating objects.
 Write the Learning objective onto your Self Assessment Sheet LO: Learn how to add different types of paths to a world and control an enemy within a.
Programming In Python. Starter Using the internet… Find what a programming language is.
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.
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.
C++ Programming Basics C++ Lecture 1 Stacy MacAllister.
Learning to use a ‘For Loop’ and a ‘Variable’. Learning Objective To use a ‘For’ loop to build shapes within your program Use a variable to detect input.
PYTHON PROGRAMMING Year 9. Objective and Outcome Teaching Objective Today we will look at conditional statements in order to understand how programs can.
Introduction to Python
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:
Lesson 1 An Introduction
Variables, Expressions, and IO
Explain what touch develop is to your students:
Completing the tasks for A452 with….
Do it now – PAGE 8 You will find your do it now task in your workbook – look for the start button! Tuesday, 20 November 2018.
Explain what touch develop is to your students:
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Programming In Lesson 3.
Log onto a computer first then ….
Learning Outcomes –Lesson 4
Hello World! Syntax.
Year 7 Number - Calculations
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Explain what touch develop is to your students:
ICT Programming Lesson 1:
Explain what touch develop is to your students:
Programming In Lesson 4.
Beginning Python Programming
Programming In.
Introduction to Python
Introduction to Python programming for KS3
Python 3 Mr. Husch.
How to organise your code
Starter Which of these inventions is: Used most by people in Britain
Python Creating a calculator.
Presentation transcript:

Python Programming Introduction to programming using python

Objectives We’re learning to develop basic code with the use of the correct syntax and variables. Outcomes Explain what syntax is and why it’s required. Explain the use of variables.

What is a program? An organized list of instructions that, when executed, causes the computer to behave in a predetermined manner. Without programs, computers are useless. – Source – Webopedia – 2013instructionsexecutedcomputer You can think of a program like a recipe. –It contains a list of ingredients called “Variables”. –You can store many different types of information in a variable such as: Data Text Images –A variable on it’s own is like a bucket…. –You can get constant variables though…

What is a program? Open up python IDE and type in the following: Print (“hello world”) What happens, when you press enter?

What is a program? Open up python IDE and type in the following: Print (“hello world”) What happens, when you press enter?

What is a program? Open up python IDE and type in the following: What happens, when you press enter?

What is a program? Open up python IDE and type in the following: What happens, when you press enter?

Syntax Errors Within python, there are a number of operators and functions which are built into the language. You’ve just seen how it can handle number, do any other operators work? How do we subtract, divide or multiply. You give it a try! Try printing other phrases, do they work? Extension: - Now type out: print (hello world) What happens?

Syntax Errors Extension: - Now type out: print (hello world) What happens? SYNTAX ERROR Like with English, programming languages have their own check similar to a grammar check. When you run code it checks to see whether it is in the form for the computer to compute. If you do not do this the computer throws out an error like above.

Using Variables Variables are like a bucket, they’re used to store a number, data, text or image. You can empty it or refill it as many times as you like. For example, to create a variable in python we might do the following: Studentname = (“James”) This now means that the word James is stored in student name. You can even print it to the screen by doing. Print (Studentname).

Using Variables You can do the same with numbers, for example: Number1 = 10 Number2 = 20 Number3 = Print (Number3)

Combine variables You can do the same with numbers, for example: Using number3 you can combine your sentence with the text you stored in your variable. You could do the same with names or other values. Notice the Comma separating it.

Using Variables / Syntax Independent Task Using what you have learnt see if you can print screen and evidence the following for your teacher. You should evidence this by taking screen shots. –Show a syntax error and annotate it to explain it. –Show how to print text or numbers. –Show how to carry out calculations with numbers. –Show use of variables through either calculation or text. –See if you can make a sentence with the use of two variables. Extension Leading into next weeks lesson, you will have to know about different types of variables and data types. See if you can research the types available and examples of their use. You could really extend yourself by trying some of the code…

Plenary Self Assessment: Your teacher has issued you with a self assessment sheet. You will have today’s objects and outcomes on it. Task Comment on the lesson. Talk about the positive experience you have had and talk about things you need a little more help on. If you managed to get onto the extension tasks, what have you found out? Paper Toss Game – Delete this if you have an alternative task… Get your students to write down one thing they have learnt in the lesson on scrap paper. Screw it up and throw it across the room. Once a piece of paper has made it up to their side, they should unravel the paper and write something different on it. Discuss what people have written down.