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

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Microsoft® Small Basic
Introduction to Programming using Matlab Session 2 P DuffourJan 2008.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
With Microsoft Excel 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2010.
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.
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.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
JavaScript Lesson 1 TBE 540. Prerequisites  Before beginning this lesson, the learner must be able to… Create a basic web page using a text editor and/or.
How to install the Zelle graphics package
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.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
Using the Multiple Choice Template Copy this presentation to your hard drive. Open up slide sorter, copy slides #3, 4, and 5 each time you are going to.
HTML.
1 Workshop 4 (B): Visual Basic Test Project Mahidol University June 13, 2008 Paul Evenson University of Delaware Bartol Research Institute.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
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.
Ch 101 Chapter 10 Introduction to Batch Files. Ch 102 Overview A batch file is a text file that contains an ordered series of commands.
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
Python From the book “Think Python”
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.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
IDLE An IDE for Python bundled with the program release Click on IDLE (Python GUI) in the Start menu under the Python program group  Get the IDLE Python.
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.
You Need an Interpreter!. Closing the GAP Thus far, we’ve been struggling to speak to computers in “their” language, maybe its time we spoke to them in.
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!”
Files in Python The Basics. Why use Files? Very small amounts of data – just hardcode them into the program A few pieces of data – ask the user to input.
1 Introduction to SQL *Plus Oracle SQL Interface MIS309 Database Systems.
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
Introduction to HTML Hypertext Mark-up Language. HTML HTML = Hypertext Mark-up Language Is just plain simple text marked up by “tags” You can create a.
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.
Development Environment
Whatcha doin'? Aims: To start using Python. To understand loops.
Lesson 1 - Sequencing.
Lesson 1 An Introduction
Basic operations in Matlab
Fill the screen challenge!
Today’s lesson – Python next steps
Week 1 Computer Programming Year 9 – Unit 9.04
How to Run a Java Program
Week 2 Computer Programming Learning Objective:
Teaching London Computing
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Introduction In today’s lesson we will look at: why Python?
Introduction to Programming
How to Execute TSR Program
Scripts In Matlab.
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
How to Execute TSR Program
Input and Output Python3 Beginner #3.
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 03
Starter Which of these inventions is: Used most by people in Britain
Presentation transcript:

COMPUTER PROGRAMMING Task 1 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. 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.

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!))

You can type simple commands at the prompt (>>>). Try typing: /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!

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!

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!

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