Hossain Shahriar shahriar@cs.queensu.ca CISC 101: Fall 2011 Hossain Shahriar shahriar@cs.queensu.ca.

Slides:



Advertisements
Similar presentations
CS 1 with Robots Variables, Data Types & Math Institute for Personal Robots in Education (IPRE)‏
Advertisements

INTRODUCTION TO PYTHON PART 2 INPUT AND OUTPUT CSC482 Introduction to Text Analytics Thomas Tiahrt, MA, PhD.
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.
Recitation 1 Programming for Engineers in Python.
Computer Science 101 Introduction to Programming.
Chapter 2: Variables, Operations, and Strings CSCI-UA 0002 – Introduction to Computer Programming Mr. Joel Kemp.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 9, 2015)
Introduction to Computational Linguistics Programming I.
 We are going to learn about programming in general…How to think logically and problem solve. The programming language we will use is Python. This is.
How computers work The CPU & Memory. The parts of a computer.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
Variables, Expressions and Statements
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 4: Writing programs.
1 Installing Cantera 1.7, Python 2.5, and Python SDToolbox for Windows J. Ziegler, S. Browne, and J. E. Shepherd Caltech Revised August, 2007.
Data Types and Conversions, Input from the Keyboard CS303E: Elements of Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
PROGRAMMING IN R Introduction to R. In this session I will: Introduce you to the R program and windows Show how to install R Write basic programs in R.
Data Types and Conversions, Input from the Keyboard If you can't write it down in English, you can't code it. -- Peter Halpern If you lie to the computer,
Introduction to Programming Python Lab 5: Strings and Output 05 February PythonLab5 lecture slides.ppt Ping Brennan
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.
PYTHON PROGRAMMING LANGUAGE.
CMSC201 Computer Science I for Majors Lecture 05 – Comparison Operators and Boolean (Logical) Operators Prof. Katherine Gibson Prof. Jeremy.
Pseudocode FORTRAN (original) INPUT number
7 - Programming 7J, K, L, M, N, O – Handling Data.
Introduction to Programming
Introducing Python Introduction to Python.
CMSC201 Computer Science I for Majors Lecture 03 – Operators
CST 1101 Problem Solving Using Computers
Agenda Introduction Computer Programs Python Variables Assignment
Whatcha doin'? Aims: To start using Python. To understand loops.
IGCSE 1 Cambridge Algorithms and flowcharts Unit 7 Computer Science
Introduction to Python
Data Types and Conversions, Input from the Keyboard
Introduction to Python
Lesson 1 An Introduction
Design & Technology Grade 7 Python
Variables, Expressions, and IO
CMSC201 Computer Science I for Majors Lecture 03 – Operators
Lesson 1 Learning Objectives
1 Step Equation Practice + - x ÷
Algebraic Equations Solving One Step Equations with Whole Numbers
Winter 2018 CISC101 11/22/2018 CISC101 Reminders
Number and String Operations
Review # 2 Math 8.
Introduction to Algorithms
Learning Outcomes –Lesson 4
EXPRESSIONS We have studied the following in the previous term. 11 = (1 x 10) + 1, 12 = (1 x 10) = (2 x 10) In the above numerical expressions.
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Inputs and Variables Programming Guides.
Variables, Data Types & Math
Introduction to Programming with Python
Operations Python code.
CISC101 Reminders All assignments are now posted.
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
Python Basics with Jupyter Notebook
Functions and Tables.
Winter 2019 CISC101 4/28/2019 CISC101 Reminders
Understanding Code Workshop 2.
Programming In.
Introduction to Python
Starter Which of these inventions is: Used most by people in Britain
Hossain Shahriar CISC 101: Fall 2011 Hossain Shahriar
Programming for Business Computing Introduction
Presentation transcript:

Hossain Shahriar shahriar@cs.queensu.ca CISC 101: Fall 2011 Hossain Shahriar shahriar@cs.queensu.ca

Installing python Goto http://www.python.org/download/ Choose Python 2.7.2 Windows Installer

Installing python

Python shell (IDLE)

Python shell: Let us play with it! What are these lines doing? Adding two numbers, subtracting two numbers, … Numeric operators applicable for constant numbers More operators: multiplication (*), division (/), mod (%) Try by yourselves and see if the results are expected (3*4) Question: How do I know it all by myself? http://docs.python.org/

Python shell: where to look for information? Question: The document is too formal to follow. Tips: Look at a tutorial at http://docs.python.org/tutorial/index.html

Python shell: Input and Output We are printing in the GUI console (Output) Let us make this example more interesting by taking an input! Wait! Input needs to be stored somewhere so that we can use it later

Python shell: Input and output We are storing hello in a variable named s print s displays the value stored in s The location is exclusively handled by python interpreter Allows us to focus on the necessary computation and logic We still have not seen any input taken from us?