1-1 The Python IDE.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Advertisements

Programming Fundamentals (750113) Ch1. Problem Solving
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
1 Chapter-01 Introduction to Computers and C++ Programming.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Computer Programming I Hour 1-Getting Started. Word of Day —Chinese proverb A journey of a thousand miles is started by taking the first step. —Aristophanes.
Systems Software & Operating systems
Topics Introduction Hardware and Software How Computers Store Data
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
CS 127 Introduction to Computer Science. What is a computer?  “A machine that stores and manipulates information under the control of a changeable program”
Agenda Computer Languages How to Write a Simple C Program
Compilers and Interpreters. HARDWARE Machine LanguageAssembly Language High Level Language C++ Visual Basic JAVA Humans.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
Introducing Java Chapter 3 Review. Why Program in Java? Java, is an object-oriented programming language. OOP languages evolved out of the need to better.
Compilers and Interpreters
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Machine Language Computer languages cannot be directly interpreted by the computer – they are not in binary. All commands need to be translated into binary.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Algorithms and Flowcharts
Evolution and History of Programming Languages
Computer Basics.
Software Development Environment
Java Programming: From the Ground Up
Why don’t programmers have to program in machine code?
Component 1.6.
Topic: Programming Languages and their Evolution + Intro to Scratch
Programming Languages
Introduction to programming
Topics Introduction Hardware and Software How Computers Store Data
CSCI-235 Micro-Computer Applications
Key Ideas from day 1 slides
A451 Theory – 7 Programming 7A, B - Algorithms.
Entry Ticket: High and Low Level Languages
Application Development Theory
Teaching Computing to GCSE
TRANSLATORS AND IDEs Key Revision Points.
Teaching Computing to GCSE
Translators & Facilities of Languages
CS190/295 Programming in Python for Life Sciences: Lecture 1
Introduction to Computer Programming
The Study of Computer Science
Compilation VS Interpretation
Programming Fundamentals (750113) Ch1. Problem Solving
Programming Fundamentals (750113) Ch1. Problem Solving
Topics Introduction Hardware and Software How Computers Store Data
Programming.
Global Challenge Walking for Water Lesson 2.
Programming Fundamentals (750113) Ch1. Problem Solving
Global Challenge Walking for Water Lesson 2.
Global Challenge Walking for Water Lesson 2.
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
15-110: Principles of Computing
ICT Programming Lesson 1:
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Tonga Institute of Higher Education IT 141: Information Systems
An Introduction to Programming with C++ Fifth Edition
Programming Fundamentals (750113) Ch1. Problem Solving
Global Challenge Walking for Water Lesson 2.
Tonga Institute of Higher Education IT 141: Information Systems
Global Challenge Walking for Water Lesson 2.
What is Programming Language
1.3.7 High- and low-level languages and their translators
The Study of Computer Science Chapter 0
Programming Logic and Design Eighth Edition
Introduction to Computer Science
Presentation transcript:

1-1 The Python IDE

What is Python? Python is a high level programming language. A programming language is a way of giving instructions to a computer. A computer can only do one thing at a time. Because of this we need to write our instruction in a sequence. With each instruction being carried out on a new line. All of these instruction together form an algorithm. Python is an interpreted language. Python can operate in two modes, namely interactive mode and script mode. We typically use the interactive mode to test and debug small amounts of code, and the script mode for running larger projects.

A sequence of instructions A computer can only perform one instruction at a time. Therefore we must write code in a sequence. The order in which we write the instructions is very important.

Algorithm An algorithm is simply a sequence of instructions to solve a specific problem. Have a go…. On your whiteboards write an algorithm that solves the following problem…. + Make a cup of tea

Low level languages When electronic computers where first used all programs has to be written in machine code (low level). To produce code programmers had to write code out using binary instructions. These binary instructions tell the CPU what to do (1000100101) This takes ages and is very prone to errors. Large teams of people had to be both write the algorithm as well as program the computer but changing the states of many switches. Mathematicians where the only people who could write computer code

Colossus (Bletchley park) Manchester Baby Imagine how complex it would be to program this computer using wires and connectors to tell the computer what to do in machine code (1001001010) [insert video] https://www.youtube.com/watch?v=i5P5faf7478 https://www.youtube.com/watch?v=cozcXiSSkwE

High level languages If we had to write all computer programs in machine code (low level) we would not use computers in the same way that we do today. If it where code would only be written by high level mathematicians at research institutions. High level languages where invented to allow us to code using human based language. As computers cannot understand anything but binary translators are used to convert high level languages into low level language that the computer will understand.

Comparison – High to low 10001011010111010110101101001000110 11010010100101010010101001010101010 10101101001101010010100101011010101 10100010000001011111010110010100101

Compilers and Translators [insert video] https://www.youtube.com/watch?v=_C5AHaS1mOA

Translator A translator will convert only one line of code at a time. After it converts each line it sends it straight to the CPU (the “brain” of the computer) – NOTE- the CPU is nothing like a brain and you should refer to it as a brain but it helps make this point - Translators run slow as the interpreter is constantly working between your code and the CPU + Translators generally working on multiply platforms (MAC/Windows/Android/IOS) as the translator will translate for the CPU that is present + Translators let us debug the code as we can watch the code run line by line and see where an error might occur

Stepping Stepping is simply the process where computer code is run line by line. Between each line the program stops and the programmer can study the output. Have a go Write the code below in Python visualizer that will display the following on the screen sName = “Mr Gildroy” iAge = 30 Print(“Your name is – “ + sName) Print(“your age is – “ + iAge)

Compiler A compiler converts all off the high level code into machine code before it is run. The CPU can run the machine (or binary) code directly and does not need any interaction with a translator. + Compiled code is much much quicker - Compiled code is specific to a platform. It generally does not work across different

Debugging Vs Programming To add