GCSE COMPUTER SCIENCE Practical Programming using Python

Slides:



Advertisements
Similar presentations
Computing Science Software Design and Development SOFTWARE DESIGN AND DEVELOPMENT USING PYTHON.
Advertisements

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.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
An Introduction to Textual Programming
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Python From the book “Think Python”
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
Intro to Python Adriane Huber Debbie Bartlett Python Lab #1Python Lab #1 1.
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
PROGRAMMING In. Objectives  We’re learning to develop basic code with the use of the correct syntax and variables. Outcomes  Explain what syntax is.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
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.
NAME Python Programming Workbook Select a Lesson:
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
Programming. In your own words, explain what an algorithm is, and give an example of how people use algorithms every day.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Programming In Python. Starter Using the internet… Find what a programming language is.
Getting Started With Python Brendan Routledge
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
GCSE COMPUTER SCIENCE Practical Programming using Python Lesson 4 - Selection.
GCSE COMPUTER SCIENCE Practical Programming using Python
Computers and Programming
Fundamentals of Programming I Overview of Programming
Development Environment
GCSE COMPUTER SCIENCE Practical Programming using Python
what is computer programming?
Whatcha doin'? Aims: To start using Python. To understand loops.
A Python Tour: Just a Brief Introduction
Input and Output Upsorn Praphamontripong CS 1110
Lesson 1 - Sequencing.
GCSE COMPUTER SCIENCE Practical Programming using Python
Computing.
Lesson 4 - Challenges.
Lesson 1 An Introduction
Beginning C++ Programming
Transition to Code Upsorn Praphamontripong CS 1110
Algorithm and Ambiguity
Programming In Any Language With “Hello, World!” Examples
1 Python Lab #1 Intro to Python Adriane Huber Debbie Bartlett.
Learning to Program in Python
Introduction to Python
basic Python programs, defining functions
Escape sequences: Practice using the escape sequences on the code below to see what happens. Try this next code to help you understand the last two sequences.
Lesson Aims Vocabulary In this lesson you are going to:
Topics Introduction Hardware and Software How Computers Store Data
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Introduction to programming with Python
Section 1 Introduction To Programming
A look at Python Programming Language 2018.
Introduction to Programming with Python
Introduction In today’s lesson we will look at: why Python?
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
ICT Gaming Lesson 3.
CS 1111 Introduction to Programming Spring 2019
Beginning Python Programming
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
Programming In.
Input and Output Python3 Beginner #3.
Introduction to Python
Starter Which of these inventions is: Used most by people in Britain
Hardware is… Software is…
CSC 241: Introduction to Computer Science I
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

GCSE COMPUTER SCIENCE Practical Programming using Python Lesson 1 – An Introduction

What is a Programming Language? Programming Languages What is a Programming Language? A coded language used by programmers to write instructions that a computer can understand, to do what the programmer (or the computer user) wants. People who can computer program are highly sought after and it can lead to a very lucrative career in the Computing industry. Any program you have ever used on a PC, any games played on a PlayStation or Xbox and any applications (apps) that you have used on your phone have been coded by a programmer, or a team of programmers. Examples of programming languages include Python, Java, C#, Objective-C, C++ and Ruby. There are lots more..

Also referred to as an application, or apps for short. Programming Languages What is a Program? A program is a sequence of instructions that specifies how to perform a computation. Also referred to as an application, or apps for short. We can describe programming as the process of breaking a large, complex task into smaller subtasks.

Syntax The syntax is a set of rules a language must follow. It looks different in each computer language, but there are a few similarities between the many programming languages. Get data from a keyboard, a file or some other device. INPUT Display data on the screen, send data to a file or some other device. OUTPUT Perform mathematical operations like addition and subtraction. MATH Perform some actions repeatedly, usually with some variation. REPETITION Checks for certain conditions and executes a statement depending on if the statement is true or false (for example). CONDITIONS

Suggested book to help practice with Python programming. Programming Languages Python Python is a high-level programming language that is often used to develop web applications. The creator of Python, Guido van Rossum named the language after the 1970s BBC comedy series ‘Monty Python’. The Python programming language is what you will be completing your practical programming assignment in, after the winter break in the Spring term. Suggested book to help practice with Python programming. Amazon Bookstore Link

Python The Python IDLE Python uses an Integrated Development Environment, or IDLE. This can be found Start / Computer / ICT(I:) / Python / IDLE To create a new Python program you need to open a new window: File / New File Create a folder in your area called GCSE Computer Science Create a second folder called C3 Programming Save all your Python files in your C3 Programming Folder

Place a screenshot of your code here Activity 1 In a new file, try typing the following code, save it as name1 and press F5 to run the program print(“Hello world”) What happens? Now change the program so it writes your name (using one line) on screen. Place a screenshot of your code here Replace this image with your own and delete this text.

Place a screenshot of your code here Activity 2 Write a program that writes your name on screen, this time using multiple lines (first name then surname). Place a screenshot of your code here Save the program as name2.

What happens? Now write a program that prints your name six times. Activity 3 In a new file, type the following code, save it as name3 and press F5 to run the program print(“Hello ” * 10) What happens? Now write a program that prints your name six times. Place a screenshot of your code here

Activity 4 Escape sequences can be used to alter how the information is displayed on the screen. Copy the code and find out what these escape sequences do. Complete the table. Save the program as escape. print("\tQuestion what goes woof\t\tdogs\t\t\trabbits") print("\n\nwhat kind of snake is good at maths?\n\nAn adder\n\n") print("\n\nGoodbye\n\n") Escape Sequence Effect \t Explain what \t does here.. \n Explain what \n does here..

Activity 5 Print this text, using just one line of code. Help, I need somebody Help, not just anybody Help, you know, I need someone Place a screenshot of your code here Save the program as oneline.

Activity 6 Print this nursery rhyme, using just one line of code. Three blind mice. Three blind mice. See how they run. See how they run. They all ran after the farmer's wife, Who cut off their tails with a carving knife, Did you ever see such a sight in your life, As three blind mice? Place a screenshot of the console here Save the program as rhyme.

Place a screenshot of your code here Activity 7 Write a program using print commands to display your initials five characters high on the screen. X X X X XX X X X X X X XXXXXX X XX X X Place a screenshot of your code here Save the program as initials.

Mathematical Operator (A description of what it does) Activity 8 Type and run these lines of code. Complete the table to explain what the mathematical operators do. print(60/5) print(987+34) print(564*89) print(2**5) print(43-5) print(11//2) print(11%2) Mathematical Operator Operation (A description of what it does) / + * ** - // % Save the program as operators.

Type and run these lines of code. Activity 9 Type and run these lines of code. print(5 * 3 / 6 + 4) print((5 * 3) / (6 + 4) ) What effect do the brackets have? Save the program as brackets.

Type and run these lines of code. Activity 10 Type and run these lines of code. 15 / 2 * 3 + 2 Predict what you think will happen when the line of code above is executed (run). Save the program as maths. What actually happens?

How Can I Improve My Coding Skills? Codecademy Coding is something you need to practice often to get good at it. Codecademy is a website that allows you to practice the syntax of Python (..and other languages). www.codecademy.com Best of all, its free and fun! Sign up using a personal email address and start working through the Python course. ACTIVITY