Xin Liu. * Use python 3.0 or later version * Major differences from earlier versions * Interactive mode * For quick experiments * “python3” to enter *

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Advertisements

Noadswood Science,  To understand the flow procedure when writing programs Thursday, January 15, 2015.
CS 100: Roadmap to Computing Fall 2014 Lecture 02: Fun With Turtles.
Go to the 7029 webforms page using the link that is above. If you do not have a password, click on “Obtain Password”. Get a password and then sign on.
Introduction to JavaScript
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Introduction to the gedit editor. gedit: the Gnome editor Gnome: Gnome is a freely available (i.e., no cost) desktop environment for the UNIX system The.
Xiao Liu, Dinghao Wu {xvl5190, SSS (Software  Systems  Security) Lab The Pennsylvania State University September 2014 IEEE/ACM International.
Editing with vi Or more fun than you thought you’d have without a mouse Prof. Chris GauthierDickey.
Precedence Parentheses Arithemetic ^ * / + - (exception logical not ~ ) Relational > =
Matlab Software To Do Analyses as in Marron’s Talks Matlab Available from UNC Site License Download Software: Google “Marron Software”
Yr 9 a computer science Nice to meet you variable challenge! 1.Variable assessment Looping in python 2.Looping assessment Drawing in python using turtle.
StarLogoTNG Treasure Hunt Game Unit Lesson 1: Basic Movement.
Python Programming Fundamentals
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 14 Recursion.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Control Structures FOR Statement Looping.
Programming Training kiddo Main Points: - Python Statements - Problems with selections.
Essential Shell Programming by Prof. Shylaja S S Head of the Dept. Dept. of Information Science & Engineering, P.E.S Institute of Technology, Bangalore
Main Points: - Python Turtle - Fractals
Class 2 Introduction to turtle graphics
A new human-computer interface?
Agent P, I have been hearing some rumours about a Python Turtle.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 18 What are programs for? Classes and Objects.
CSC 110 Using Python [Reading: chapter 1] CSC 110 B 1.
Dolch Pre-Primer Word List Press Enter to begin Slide Show Note: Words appear in alphabetical order.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 4 Conditionals Turtles.
Build-It-Yourself.com BLENDER 3D LESSON 3 BLENDER 3D LESSON 3.
1 2 Left Click 3 Left Click 4 Left Click NOTE: Your screen may look different; however, find the Start button (lower left corner); then All Programs; ending.
REFERENCE: CHAPTER 1 High-level languages + Python.
ITEC 109 Lecture 18 Looping. Review Questions? Conditionals –if / elif / else –and / or / not.
Perfecto Mobile Automation
Today… The for loop. Introducing the Turtle! Loops and Drawing. Winter 2016CISC101 - Prof. McLeod1.
Control Structures WHILE Statement Looping. S E Q C E N U E REPITITION …a step or sequence of steps that are repeated until some condition is satisfied.
PYTHON WHILE LOOPS. What you know While something is true, repeat your action(s) Example: While you are not facing a wall, walk forward While you are.
Multithreaded Programming ( ). Components of a Process Figure 3.1.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
More about Iteration Victor Norman CS104. Reading Quiz.
Python Turtle Graphics
Graphics CIS 40 – Introduction to Programming in Python
Week of 12/12/16 Test Review.
General Form for a Conditional
Programming in Python For newbz.
Agent P, I have been hearing some rumours about a Python Turtle.
Quicken 2018 Support Team More info :
Adapted from slides by Marty Stepp and Stuart Reges
CS 100: Roadmap to Computing
Introduction to JavaScript
تعارف. تعارف قواعد العمل ا الموبيل المشروبات الاحاديث الجانبية الاسئلة نفكر.
graphics by Prettygrafik design
Week 1 Computer Programming Year 9 – Unit 9.04
Learn… Create… Program
البرمجة مع لغة PYTHON TURTLE
Introduction to JavaScript
Week 2 Computer Programming Learning Objective:
Test Automation For Web-Based Applications
CS 100: Roadmap to Computing
Task 1 Computer Programming LEVEL 6 PROGRAMMING:
Introduction to TouchDevelop
Chap. 3 Functions Start Python IDLE (Shell) and open a new file.
A look at Python Programming Language 2018.
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
Using Script Files and Managing Data
Linux Operations and Administration
Learn… Create… Program
Python While Loops.
Input and Output Python3 Beginner #3.
Introduction to JavaScript
Presentation transcript:

Xin Liu

* Use python 3.0 or later version * Major differences from earlier versions * Interactive mode * For quick experiments * “python3” to enter * print(’python programming is fun!’) * “Ctl+D” to quit * Script mode * For regular programs, that can be executed repeatedly * Edit a program (with gedit) * python3 myprogram.py

* In gedit, create the first.py containing the following program * In terminal, run the program by typing print(‘hello world!’) print(‘this is my first python program’) Print(‘it’s funny’) Python3 first.py

* (0, 0) (100, 100) Cartesian plane

* import turtle * clear() * title(‘window name’) * goto(x, y) * forward(distance) * back(distance) * left(angle) * right(angle) * circle(radius) * begin_fill() * end_fill() * pencolor(r, g, b), 0 <= r, g, b <= 1 * fillcolor(r, g, b) * write(‘a string’)

* Just to get a feeling of programming from turtle import * color('red', 'yellow') begin_fill() while True: forward(200) left(170) if abs(pos()) < 1: break end_fill() done()