Python Programming Language

Slides:



Advertisements
Similar presentations
Types and Arithmetic Operators
Advertisements

How Create a C++ Program. #include using namespace std; void main() { cout
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to Python Programming Outline 2.1 Introduction 2.2 First Program in Python: Printing.
String Escape Sequences
Identifiers and Assignment Statements. Data structures In any programming language you need to refer to data The simplest way is with the actual data.
Lecture Note 3: ASP Syntax.  ASP Syntax  ASP Syntax ASP Code is Browser-Independent. You cannot view the ASP source code by selecting "View source"
Introduction to Python
Programming in Python Part I Dr. Fatma Cemile Serçe Atılım University
PYTHON: PART 2 Catherine and Annie. VARIABLES  That last program was a little simple. You probably want something a little more challenging.  Let’s.
Sep 12, 2007Sprenkle - CS1111 Objectives Review  Linux  Why programming languages? Compiled vs. Interpreted Languages Programming in Python  Data types.
Arithmetic Operations. Review function statement input/output comment #include data type variable identifier constant declaration.
Variables and Expressions CMSC 201 Chang (rev )
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
Programming Fundamental Slides1 Data Types, Identifiers, and Expressions Topics to cover here: Data types Variables and Identifiers Arithmetic and Logical.
Code Grammar. Syntax A set of rules that defines the combination of symbols and expressions.
Python Programming Language. What have we learnt so far? Variables. What are they used for? Data types. What three data types are there? White space.
Variables, Expressions and Statements
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
VARIABLES, CONSTANTS, OPERATORS ANS EXPRESSION
Chapter 51 Logical Operators Used with Boolean expressions Not – makes a False expression True and vice versa And – will yield a True if and only if both.
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Chapter 2: Introduction to C++. Outline Basic “Hello World!!” Variables Data Types Illustration.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP Basics.
Python Basics  Values, Types, Variables, Expressions  Assignments  I/O  Control Structures.
 Most C programs perform calculations using the C arithmetic operators (Fig. 2.9).  Note the use of various special symbols not used in algebra.  The.
1 2. Program Construction in Java. 01 Java basics.
Java Programming: Guided Learning with Early Objects Chapter 1 Basic Elements of Java.
Math operations 9/19/16.
Agenda Introduction Computer Programs Python Variables Assignment
Chapter 2 Variables.
Introduction to Python
Visual Basic Variables
Pamela Moore & Zenia Bahorski
Data Types, Identifiers, and Expressions
Expressions An expression is a portion of a C++ statement that performs an evaluation of some kind Generally requires that a computation or data manipulation.
Revision Lecture
Variables, Expressions, and IO
Introduction to C++ October 2, 2017.
ITM 352 Expressions, Precedence, Working with Strings Class #5
CMSC201 Computer Science I for Majors Lecture 03 – Operators
Winter 2018 CISC101 11/9/2018 CISC101 Reminders
TRANSLATORS AND IDEs Key Revision Points.
Chapter 6 Variables What is VBScript?
Python Programming Language
2.1 Parts of a C++ Program.
Winter 2018 CISC101 11/22/2018 CISC101 Reminders
Bools and simple if statements
Introduction to C++ Programming
Beginning C Lecture 2 Lecturer: Dr. Zhao Qinpei
Numbers.
Chapter 2 Variables.
Introduction to Programming Using Python PART 1
Core Objects, Variables, Input, and Output
Introduction to Programming with Python
Class 2.
Python Programming Language
Chapter 2: Introduction to C++.
Data Types and Expressions
Introduction to Primitives
Introduction to Primitives
Primitive Types and Expressions
Winter 2019 CISC101 4/28/2019 CISC101 Reminders
Unit 3: Variables in Java
Chapter 2 Variables.
Python Programming Language
Data Types and Expressions
Data Types and Expressions
Introduction to Python
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

Python Programming Language

www.codeacademy.com You must use the following Browser… Google Chrome

What have we learnt so far? Variables. What are they used for? Data types. What three data types are there? White space. Why is this important? Statements. How do we write a statement? Comments. How do we write a comment? Arithmetic What are they? operatorsxx There is 6 in total.

Variables Using variables is a way to store values for later

Data Types Interger “int”, Float “float”, Booleans “bool”

White Space Python will interpret white space in certain ways. You need to use whitespace following the correct rules. You will need to press the spacebar four times to indent code. If Python doesn’t understand you could end up with… The peasant said, "The witch turned me into a newt!" "The peasant," said the witch, "turned me into a newt!"

Statements Statements are written to help us remember bits of code we have written. You write a comment starting with a #.

Comments Comments are written to help us remember bits of code we have written. You write a comment starting and finishing with “““ “““.

Arithmetic Operators What are they? There is 6 in total. Addition Subtraction Multiplication Division Exponentiation Modulus

Case Sensitivity You must be careful when you are typing and use the appropriate letter case for the different syntax you are using. Variables are all in lowercase. spam = 6 Booleans are title case. bool = True