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.

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Advertisements

Coding and Debugging. Requirements and Specification Recall the four steps of problem solving: Orient, Plan, Execute, Test Before you start the implementation.
Getting Started on VAPPS It’s a little like playing Russian roulette
Creating a Program In today’s lesson we will look at: what programming is different types of programs how we create a program installing an IDE to get.
Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials File Handling.
How do we make our Welcome.java program do something? The java in our Welcome.java file won’t do anything by itself. We need to tell the computer to execute.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Introduction to a Programming Environment
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX.
By Alfredo Alvarez. Agenda: Find out who the instructor is. Talk about goals and why you want to learn python. Discuss the materials and the methodology.
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.
Chapter 1: Python Basics CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Agenda What is Computer Programming? The Programming Process
Introduction to Python Dr. Bernard Chen Ph.D. University of Central Arkansas July 9 th 2012
Created by NW 2012 – please note all copyright on images used is property of copyright holder. Note: some of the more complicated descriptions are taken.
Noadswood Science,  To know the basics of Python coding and decoding Monday, September 07, 2015.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Introduction to Programming Peggy Batchelor.
 We are going to learn about programming in general…How to think logically and problem solve. The programming language we will use is Python. This is.
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.
Booting Ubuntu Linux Live CSCI 130 – Fall 2008 Action Lab Dr. W. Jones.
Python From the book “Think Python”
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Class 1: What this course is about. Assignment Read: Chapter 1 Read: Chapter 1 Do: Chapter 1 ‘workbook’ pages not finished in class Do: Chapter 1 ‘workbook’
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
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.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 17, 2015)
I Power Higher Computing Software Development Development Languages and Environments.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
C++ LANGUAGE TUTORIAL LESSON 1 –WRITING YOUR FIRST PROGRAM.
You will need Dev C++ to help you with this project. If you do not already have this programming tool on your device you can visit
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
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.
1. Starting 1 Let’s Learn Saenthong School, January – February 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
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.
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
Introducing Python Introduction to Python.
Development Environment
CST 1101 Problem Solving Using Computers
Whatcha doin'? Aims: To start using Python. To understand loops.
A Playful Introduction to Programming by Jason R. Briggs
Introduction to Eclipse
GCSE COMPUTER SCIENCE Practical Programming using Python
GCSE COMPUTER SCIENCE Practical Programming using Python
Introduction to Programming
Introduction to Python
Lesson 1 An Introduction
Week 1 Gates Introduction to Information Technology cosc 010 Week 1 Gates
Let's Learn Python and Pygame
Today’s lesson – Python next steps
Week 1 Computer Programming Year 9 – Unit 9.04
BSc in Digital Media, PSUIC
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Section 1 Introduction To Programming
Introduction In today’s lesson we will look at: why Python?
Python Lesson’S 1 & 2 Mr. Kalmes.
Beginning Python Programming
Chapter 1: Programming Basics, Python History and Program Components
Input and Output Python3 Beginner #3.
Introduction to Python
Starter Which of these inventions is: Used most by people in Britain
Presentation transcript:

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 to login to ‘their’ PC 3.Be introduced to Python and Programming 4.Use IDLE to write a program 5.Save a program in IDLE 6.Run a program in IDLE 7.Print a message to the screen 8.Fix basic errors

Things you should know about PC’s : They are DUMB MACHINES that do simple MECHANICAL things REALLY quickly BE Careful! They will do exactly what you ‘signal’ (words ->numbers->electrical/mechanical ) Programming is how we tell them what to do Every button you press causes a program to run. This causes mechanical things to happen

Things you should know about PC’s : Even when you are not pressing buttons programs are running and things are happening ALL the time When you are using a program then you can do ONLY the things that the programmer allows you to do When you write a program then YOU have control and YOU can decide what a user can do (as long as you know the code)

What is ? Python is a programming language Used to create programs that follow a step-by- step set of instructions to solve a problem It looks a lot like English (high level language) Designed for use by everyone

More on Python Used to create lots of programs including web applications and games Used by Google, Yahoo! And Youtube Named after Monty Python!

Problem-Solving One of the most important skills for a computer scientist is problem solving. An algorithm in programming is the step by step set of instructions for solving a problem Writing algorithms improves your MATHEMATICAL ability

To Do: Create a folder called Python on your desktop Within this folder create 3 folders called Powerpoints, Programs, Exercises Within the Programs folder creat a folder called Exercise1 Logon to My website: Download the Python Exercise book to the Exercise folder

IDLE What is IDLE? – IDLE is a text editor that allows you to create and run Python programs – It is called an Integrated Development Enviroment (IDE)

Example – Let’s create a sample program in IDLE that prints a message to the screen – Let’s create a program to print “Welcome to Python”

Sample code print (“Welcome to Python”)

Steps for creating programs Go to IDLE Click on ‘File’, choose ‘New Window’ Type your program in the new window Click on ‘File’, choose ‘Save As’ Enter filename (must end with.py) To run the program: choose ‘Run’, then ‘Run Module’

What happened there Show compilation process An interpreter processes the code you’ve written a little at at time, alternating between reading each line and performing computations

Hello World Watch as I write another program – Show opening an editor and saving file as.py You’ll need to follow what I do to write one shortly Let’s write a program to print “Hello World” to the screen

Sample code print (“Hello World”)

Printing Important steps! – print() is a Python function to display information on a screen – the brackets () after the print command must be used to contain what you want to print – The quotation marks " " are needed if you want to print text e.g. “My name is John”

What if I make a mistake Let’s add an error to our Hello World program! You will get useful error messages Program won’t run Fix the error message and try to compile again

Which of these lines of code are correct? 1.Print (“Hello World!”) 2.print(“Hello world!”) 3.print(Hello world!) 4.print “Hello world!”

Let’s do Exercise 1.1 together

Over to you … Try to complete ALL of the Lesson 1 exercises before the next lesson (grades will be allocated based on work done) Help is great but only if things are EXPLAINED to you – if I ask you to explain how your program works you must know you can work on the PC’s during lunch breaks if supervised you can bring in a memory stick and save your school work as you can download python at home and practice there feel free to shoot ahead and be able to tell me how to do stuff ( google search ‘codecademy’ )