Task 1 Computer Programming LEVEL 6 PROGRAMMING:

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

Alford Academy Business Education and Computing1 Advanced Higher Computing Based on Heriot-Watt University Scholar Materials File Handling.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
Introduction to Computational Linguistics Programming I.
Python From the book “Think Python”
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 for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
Make a dice challenge! This is a starter activity and should take 5 minutes [ slide 1 ] 1.Log in to your computer 2.Open IDLE 3.Copy the code below in.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 4: Writing programs.
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.
ALAN….ALAN… ALAN. WHO IS ALAN TURING?
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start End Display “Computer” Display “Science”
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.
How to Execute TSR Program. Install Borland C++ Download Borland C++ from LMS – oads/BORLANDC.rarhttp://vulms.vu.edu.pk/Courses/CS609/Downl.
Practical Kinetics Exercise 0: Getting Started Objectives: 1.Install Python and IPython Notebook 2.print “Hello World!”
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
what is computer programming?
Computer Programming.
Whatcha doin'? Aims: To start using Python. To understand loops.
A Playful Introduction to Programming by Jason R. Briggs
Lesson 1 - Sequencing.
Week 4 Computer Programming Gray , Calibri 24
Introduction to Python
Advanced Coding Session 5
Lesson 1 An Introduction
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Basic operations in Matlab
Let's Learn Python and Pygame
Fill the screen challenge!
Today’s lesson – Python next steps
Week 5 Computer Programming Gray , Calibri 24
Week 1 Computer Programming Year 9 – Unit 9.04
How to Run a Java Program
Learning Outcomes –Lesson 4
Week 2 Computer Programming Learning Objective:
Week 5 Computer Programming Year 9 – Unit 9.04
Python Lessons 13 & 14 Mr. Kalmes.
Teaching London Computing
Lesson Aims Vocabulary In this lesson you are going to:
BSc in Digital Media, PSUIC
Introduction to TouchDevelop
Week 4 Computer Programming Year 9 – Unit 9.04
A look at Small basic The Text Window 2017.
Functions Christopher Harrison | Content Developer
Introduction In today’s lesson we will look at: why Python?
Introduction to Programming
How to Execute TSR Program
Windows Installation Tutorial
Beginning Python Programming
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
How to Execute TSR Program
Programming In.
Input and Output Python3 Beginner #3.
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 03
Chapter 1 Introducing Small Basic
Starter Which of these inventions is: Used most by people in Britain
Interactive Programming vs. Stored Programs
Programming for Business Computing Introduction
Presentation transcript:

Task 1 Computer Programming LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions with parameters in your programs. Task 1 Gray 80 69 69 69, Calibri 24 Dark Red RGB 153 0 0, Calibri 54

Python is a freely available programming language. You can write Python code in notepad, or any other simple text editors - but it is easier if you use a program like IDLE (named after Eric Idle (Monty Python!))

Python is more than a Calculator You can type simple commands at the prompt (>>>). Try typing: 2+2 17-9 16/4 3*7 Check that the answers are correct! Quick note: you are going to be making lots of Python programs. Create a Python folder somewhere so that you can save your files here! Python is more than a Calculator This is where we use the function “print” to make something appear on the screen. Magic pixies inside the computer? - Nope just code!

Hello World in INTERACTIVE MODE We can put simple instructions into the IDLE window, but we can’t write and save complex programs. Open IDLE and look for the chevrons >>> Simply type the following (exactly): print(“Hello, World”) Now press Enter! The main IDLE window should show you your output: Well done! You’ve written your first program!

>>> print"Hello World" >>> print("Hello World"); Save your program as MyFirstProgram in your PYTHON folder. (Simply go to File menu….Save As….) TO Open the PYTHON program, find the file in your PYTHON folder. Right-click the file From the pop-up menu, select EDIT with IDLE Make sure you are comfortable with opening and saving a Python program. >>> print"Hello World" >>> print("Hello World"); >>> Print("Hello World") >>> print("Hel World") >>> prin(Hello World) Which one of these will output the following ? >>>Hello World By the way… you can use “speech marks” or ‘apostrophes’ for words (strings) Both will work!

Hello World in SCRIPT MODE Another way we can write code in PYTHON is by using SCRIPT mode. This is useful when you are working with many lines of code. Open IDLE and click the FILE menu option. Select NEW WINDOW - this will give you a new window that you can use to write and save your programs! In this new window, type the following (exactly): print(“Hello, World”) Save this file in your Python folder (call it “hello world again.py”) and then press F5 to run it. The main IDLE window (>>>) should show you your output: Congratulations! You have written a Python program!

If you can, do all these programs in SCRIPT mode (i.e. go to FILE, NEW WINDOW…then press F5 to run) Task 1: Create a program in python that outputs the following… KEEP CALM AND LEARN PYTHON Save as ‘KeepCalm.py’ Task 2: Create a program in python that outputs the following… I love Python and right now I’m learning to program! Save File again! Task 3: Create a program in python that outputs the following… * ** *** **** ***** What does \n do?

Additional Tasks: Using the escape key \n can you make a Smiley Face? We will be making interactive programs next lesson. How does a Chat Bot work? Click Here Who is Alan Turing? Plenary activity from: http://hcc-c.weebly.com/91.html