Python Lesson 12 Mr. Kalmes.

Slides:



Advertisements
Similar presentations
Activity One Use the Windows Explorer program to create a new folder. Name the folder by your first name. Click on the windows explorer icon then highlight.
Advertisements

Windows Command Line Operating Systems Labs 3, 4, 5.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
Functions General Example (+1return values, +1 parameters) 1. The client's wish 2. Creating the function 1. Function's name, Parameter list, Return-info,
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
Shell Scripting Introduction. Agenda What is Shell Scripting? Why use Shell Scripting? Writing and Running a Shell Script Basic Commands -ECHO - REM.
Batch File Basics Automate repetitive computer processes Friday, March 12, 2014 Presented by Thomas Redd, STS, Granite School District.
How to Tag a Corpus Using Stanford Tagger. Accuracy All tokens: 97.32% Unknown words: 90.79%
Booting Ubuntu Linux Live CSCI 130 – Fall 2008 Action Lab Dr. W. Jones.
Linux Operations and Administration
Intro Python: Variables, Indexing, Numbers, Strings.
Running Modflow with Batch Files. Dos basics cd = change directory (dOs Is NoT cAsE sEnSiTiVe) dir = shows you what is in the directory (It gives you.
All sections to appear here Welcome to my pptPlex Slide Show, this can be executed in either two ways: 1.As a normal PowerPoint slide show: Example hit.
POWERSHELL BASICS. BACKGROUND  Powershell is a task automation and scripting language based off the.NET framework  It provides the user full access.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Exploring Spyder: An IDE for scientific computing
Object Orientated Programming in Perl Simulated Models of Termites.
we are going to write our Assembly language program as sample ex01.asm. So that we can attempt our assigment.
INTERNET APPLICATIONS CPIT405 Install a web server and analyze packets.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
JavaScript/ App Lab Programming:
Development Environment
Python’s Modules Noah Black.
Games Programming in Scratch
Python Lesson 12 Mr. Kalmes.
PowerShell Introduction Copyright © 2016 – Curt Hill.
Python 14 Mr. Husch.
Deploying and Configuring SSIS Packages
Perl A simple test.
How to Fix the Automatic Repair Loop in Windows 8.1
Introduction to Computers
Learning to program with Logo
TRANSLATORS AND IDEs Key Revision Points.
Python 18 Mr. Husch.
Python Mr. Husch.
Today’s lesson – Python next steps
Learning to Program in Python
Python Lessons 13 & 14 Mr. Kalmes.
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
Run Java file with Window cmd
Python Lesson 21 Mr. Kalmes.
Python 19 Mr. Husch.
Just Basic Lesson 17 Part 1 Mr. Kalmes.
Just Basic Lessons 14 Mr. Kalmes.
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Game Over Module 4 Lesson 2.
Python Lesson’S 1 & 2 Mr. Kalmes.
Scripts In Matlab.
Lab 4: Introduction to Scripting
Data Structures & Algorithms
Just Basic Lesson 15 Mr. Kalmes.
Basic Lessons 5 & 6 Mr. Kalmes.
Just Basic Lessons 9 Mr. Kalmes.
Just Basic Lesson 19 Mr. Kalmes.
Python Lessons 7 & 8 Mr. Kalmes.
Chapter 1 Introducing Small Basic
Python Lessons 13 & 14 Mr. Husch.
Java Lessons Mr. Kalmes.
Python 19 Mr. Husch.
Python 10 Mr. Husch.
Just Basic Lesson 13 Mr. Kalmes.
Python 18 Mr. Husch.
Python 12 Mr. Husch.
Unity Application Generator
Python 13 Mr. Husch.
Just Basic Lessons 8 Mr. Kalmes.
Executive Reports, Instructions and Documentation
Presentation transcript:

Python Lesson 12 Mr. Kalmes

Aims You will be able to open a python file using the CMD prompt

Recreate the following Save as Python12.py in your python folder

Explanation On line 1 we have what's called an "import". This is how you add features to your script from the Python feature set. Rather than give you all the features at once, Python asks you to say what you plan to use. This keeps your programs small, but it also acts as documentation for other programmers who read your code later.

explanation The argv is the "argument variable", a very standard name in programming, that you will find used in many other languages. This variable holds the arguments you pass to your Python script when you run it. In the exercises you will get to play with this more and see what happens.

explanation Line 3 "unpacks" argv so that, rather than holding all the arguments, it gets assigned to four variables you can work with: script, first, second, and third. This may look strange, but "unpack" is probably the best word to describe what it does. It just says, "Take whatever is in argv, unpack it, and assign it to all of these variables on the left in order."

CMD Prompt What is the CMD Prompt? Command Prompt is a command line interpreter application available in most Windows operating systems. Command Prompt is used to execute entered commands. Most of those commands are used to automate tasks via scripts and batch files, perform advanced administrative functions, and troubleshoot and solve certain kinds of Windows issues.

CMD Prompt What is the CMD Prompt? Step 1: Hold down windows key and R Step 2: Type in CMD and hit enter

CMD Prompt How to Use CMD Prompt DIR: This will allow you to see what is available CD + Filename: This allows you to access file from directory CD/: This takes you back to your C: Drive CD .. : This takes you back one step

Access your Python File Step 1: access the command prompt Step 2: Type in CD Desktop If you want to see all of your options type in dir Step 3: Type in CD Python Step 4: Type in python Python12.py apples oranges bananas

Lesson 12 Assignment Your assignment for today is to add to the code and have a total of 6 variables. Once you are done test it and turn it in to the drop box. Once it is turned in please answer the exit slip questions and work on any make up work you may have.

Exit Slip Questions What are the steps to access the CMD Prompt What does import do? What does Argv do?