A revision guide for programming with python. 1.A program is a set of instructions that tells a computer what to do. 2.The role of a programmer is to.

Slides:



Advertisements
Similar presentations
Noadswood Science,  To understand the flow procedure when writing programs Thursday, January 15, 2015.
Advertisements

CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
Week 5: Loops 1.  Repetition is the ability to do something over and over again  With repetition in the mix, we can solve practically any problem that.
PSEUDOCODE & FLOW CHART
CS0004: Introduction to Programming Repetition – Do Loops.
Μαθαίνοντας Python [Κ4] ‘Guess the Number’
Week 5 - Friday.  What did we talk about last time?  Repetition  while loops.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
CS001 Introduction to Programming Day 3 Sujana Jyothi
Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
Introduction to Sensors
Computing Theory: BBC Basic Coding Year 11. Lesson Objective You will: Be able to define what BBC basic is Be able to annotate BBC basic code Be able.
Chapter 4: Looping CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Python quick start guide
The University of Texas – Pan American
Noadswood Science,  To know the basics of Python coding and decoding Monday, September 07, 2015.
An Introduction to Textual Programming
* What kind of loop would I use to complete the following: A. Output all of the prime numbers that are less than 100,000 B. Output the Fibonacci sequence.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Random numbers in Alice 3. Create world, add character (“Red” in this example) Dragged walk tile to right onto Run method. Click on “??? “ part of Tile.
By the end of this session you should be able to...
Application of Data Programming Blocks. Objectives  Understand the use of data programming blocks and their applications  Understand the basic logic.
CPS120 Introduction to Computer Programming The Programming Process.
Lec 20 More Arrays--Algorithms. Agenda Array algorithms (section 7.5 in the book) – An algorithm is a well-defined specification for solving a problem.
Learning Objective The students should be able to: a. state the definition of software b. state the usage of software c. list different types of software.
Coding Design Tools Rachel Gauci. Task: Counting On Create a program that will print out a sequence of numbers from "1" to a "number entered”. Decision’s.
Lecture 4: Calculating by Iterating. The while Repetition Statement Repetition structure Programmer specifies an action to be repeated while some condition.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
CSC Intro. to Computing Lecture 12: PALGO. Announcements Homework #3 solutions available  Download from Blackboard/web Quiz #3 will be in class.
Georgia Institute of Technology More on Creating Classes part 2 Barb Ericson Georgia Institute of Technology Oct 2005.
CS 121 – Quiz Feb 17 th. Question 2 We want to count how many days there were such that the temperature is at least degrees lower than the.
Chapter 7 Problem Solving with Loops
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.
Today's Ninja Challenge: Write Your First Computer Game!
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Introduction to Programming Python Lab 7: if Statement 19 February PythonLab7 lecture slides.ppt Ping Brennan
Loops Tonga Institute of Higher Education. Introduction Programs need to be able to execute tasks repeatedly. Use loops to repeat actions  For Loop 
Introduction to Programming Python Lab 8: Loops 26 February PythonLab8 lecture slides.ppt Ping Brennan
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.
Input, Output and Variables GCSE Computer Science – Python.
Adding animations. To add an animations to text or picture you have to click on the text or animation and on the top navigation bar click on animation.
Introduction to Programming
Introduction to Programming
While Loops in Python.
Iterations Programming Condition Controlled Loops (WHILE Loop)
Microsoft Visual Basic 2005 BASICS
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Python I/O.
File Handling Programming Guides.
Introduction to pseudocode
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Loops CIS 40 – Introduction to Programming in Python
Introduction to TouchDevelop
Introduction to Programming
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Loop Statements & Vectorizing Code
Topics Introduction to Value-returning Functions: Generating Random Numbers Writing Your Own Value-Returning Functions The math Module Storing Functions.
Functions continued.
CSCI N207 Data Analysis Using Spreadsheet
Loop Statements & Vectorizing Code
Introduction to Python
Introduction to Programming
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
What you need to do… Drag the pieces of code into the correct order like you can see in the EXAMPLE below. print ( “ int input ) = + Hello world chr ord.
Lec 21 More Fun with Arrays: For Loops
Iteration – While Loops
COMPUTING.
Presentation transcript:

A revision guide for programming with python

1.A program is a set of instructions that tells a computer what to do. 2.The role of a programmer is to create and supervise a program. 3.ALL computers are programs. 4.Microsoft word, Microsoft PowerPoint and Windows 8 are all designed to make the computer work, make presentations and typing. 5.The print function in python allows you to enter your instructions onto the screen. INTRODUCTION TO PROGRAMMING

1.A variable is a memory location where you can store data inside it. 2.Some examples of variables are; Numbers, Text, Date and Time. 3.You can change a variable by replacing the data in it with another e.g. Name 1 = ‘Bob’ Print (name 1) Name 1 = ‘Hannah’ Print (name 1) In this code you are replacing the variable Bob in name 1 with Hannah so Bob’s data is thrown away. VARIABLES IN PROGRAMMING

1.Functions are helpful in programming because it saves you time as it does one specific task. 2.The max function picks out the biggest (largest) number in a list. E.g. print(max(10,32,42,562,24) in this list it will pick out 562 as it is the largest number. 3.The ‘randint’ function is for when you have the maximum and minimum value for the random number you want. 4.The ‘if’ function checks to see if a condition you specify is true or false. BUILT IN FUNCTIONS

1.Selection is a way of making decisions. 2.Import allows you to make the loop randint. 3.For loops create their own counter. E.g. for x in range (3,37,3): print (x) 4.The while loop only prints when the code is true. 5.Iteration is a posh way of saying ‘LOOP’ ITERATION

Say if you are making a quiz, you will need to create that quiz with a program For example; Score = 0 Print (“What is 4+4?”) Ans1 = input () Ans1 = int (ans1) Is ans1 == 8: Print (“well done”) Score = score + 1 Afterwards you would need to add different subjects into the quiz, you would need to increase the difficulty of the questions and make even more questions. PLANNING YOUR PROGRAM