1 Python Lab #1 Intro to Python Adriane Huber Debbie Bartlett.

Slides:



Advertisements
Similar presentations
Introduction to JavaScript
Advertisements

Ruby The Gem of new programming languages. An interpreted scripting language.
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
Python Brandon Jeffcoat Dashaun West “Why settle for snake oil when you can have the whole snake?” -- From Usenet posting by Mark Jackson, June 1998.
Python Jordan Miller and Lauren Winkleman CS 311 Fall 2011.
Intro to Python Paul Martin. History Designed by Guido van Rossum Goal: “Combine remarkable power with very clear syntax” Very popular in science labs.
Scripting Languages. Originally, a script was a file containing a sequence of commands that needed to be executed Control structures were added to make.
March 9, 2011CS 1921 JavaScript Debbie Bartlett March 9, 2011.
Programming 101 with Python: an open-source, cross-platform, and fun language By J. Burton Browning, Ed.D. Copyright © J. Burton Browning All rights reserved.
Introduction to PythonIntroduction to Python SPARCS `08 서우석 (pipoket) `09 Summer SP ARCS Seminar`09 Summer SP ARCS Seminar.
The Python Programming Language Jeff Myers Programming Language Concepts, 01/14/2002
A very basic overview of Server-Side Scripting Or what is PHP, Perl, Python, Ruby and what can they do for me?
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Python. By Jawad. What Is Python? Python is an open-source object-orientated scripting language. Python is good for embedding snippets to run a program.
Python – May 11 Briefing Course overview Introduction to the language Lab.
Intro to Python Adriane Huber Debbie Bartlett Python Lab #1Python Lab #1 1.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
Scripting Languages James Brucker Computer Engineering Dept Kasetsart University.
Unit 1 Basic Python programs, functions Special thanks to Roy McElmurry, John Kurkowski, Scott Shawcroft, Ryan Tucker, Paul Beck for their work. Except.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
Perl Lab #11 Intro to Perl Debbie Bartlett. Perl Lab #1 2 Perl Practical Extraction and Report Language –or- Pathologically Eclectic Rubbish Lister Created.
 Prepared by: Eng. Maryam Adel Abdel-Hady
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
PYTHON PROGRAMMING LANGUAGE.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
Python Basics.
Development Environment
CST 1101 Problem Solving Using Computers
CMIT100 Chapter 14 - Programming.
Whatcha doin'? Aims: To start using Python. To understand loops.
More on Functions (Part 2)
NOCTI Study Guide #2.
Python: Experiencing IDLE, writing simple programs
Scope History of Ruby. Where can you use Ruby? General Features.
GCSE COMPUTER SCIENCE Practical Programming using Python
Lesson 1 - Sequencing.
GCSE COMPUTER SCIENCE Practical Programming using Python
Introduction to Python
Introduction Python is an interpreted, object-oriented and high-level programming language, which is different from a compiled one like C/C++/Java. Its.
Pamela Moore & Zenia Bahorski
Lesson 1 An Introduction
Intro to Python Programming – Part II
Training on Real-time project With 100 % assistance support Training by IT professionals Trainers have 5+ years experience
Do you know this browser?...
CS190/295 Programming in Python for Life Sciences: Lecture 1
What to do today: Brief history of Ruby General qualities/info
Introduction to Algorithm Design
Programming In Lesson 3.
An Introduction to Python
Java Intro.
Introduction to programming with Python
More on Functions (Part 2)
Python programming exercise
CSCI N207 Data Analysis Using Spreadsheet
Java Programming with BlueJ Objectives
Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg
12th Computer Science – Unit 5
Chapter 1: Programming Basics, Python History and Program Components
Running a Java Program using Blue Jay.
Input and Output Python3 Beginner #3.
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 03
The Python interpreter
The Python interpreter
Starter Which of these inventions is: Used most by people in Britain
Intro to Programming (in JavaScript)
Introduction to Computer Science
PYTHON - VARIABLES AND OPERATORS
Introduction to Python
Presentation transcript:

1 Python Lab #1 Intro to Python Adriane Huber Debbie Bartlett

2 Python Lab #1 Python Named derived from TV series, Monty Python’s Flying Circus, not the snake Important goal of developers was to make it fun Common practice was to make Monty Python references in example code Created by Guido Van Rossum in 1991 Python is often compared to Tcl, Perl, Ruby, Scheme or Java Why use Python? General-purpose, interpreted high-level programming language Design philosophy emphasizes code readability Supports multiple programming paradigms object-oriented and to a lesser extent functional Can be used in a scripting or non-scripting context

Sample Python Script def greet (): print (“Hello, World!”) 3 Python Lab #1 Sample Python Script def greet (): print (“Hello, World!”) name = input (“Enter your name:”) if name == “Debbie”: print (“Hello, Debbie! I am glad that you are in CS192 today!”) else: print (“Hello”, name) greet()

Python Scripts Creating a Python Script 4 Python Lab #1 Python Scripts Creating a Python Script Use a text editor such as gedit Name the file greet.py Write your script in greet.py Save greet.py To run python program in terminal window, type: python3.3 greet.py

Python Lab1 Assignment Type your own version of the python script 5 Python Lab #1 Python Lab1 Assignment Type your own version of the python script What happens if you don’t use quotes around the first print statement? Take them off, try it, then put them back delete the tab in front of the first print statement? Try it, put it back remove the colon at the end of the first statement that begins with def? Ask another question in your script Google a “while loop” Add a while loop to your Python Script Show your script to a lab instructor or helper