IST256 : Applications Programming for Information Systems

Slides:



Advertisements
Similar presentations
ATM 315 Environmental Statistics Course Goto Follow the link and then choose the desktop application.
Advertisements

Builtins, namespaces, functions. There are objects that are predefined in Python Python built-ins When you use something without defining it, it means.
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
By Ryan Smith The Standard Library In Python. Python’s “Batteries Included” Philosophy Python’s standard library was designed to be able to handle as.
Obtaining Information From the Geologic Block Model
Intro Python: Variables, Indexing, Numbers, Strings.
Xin Liu Feb 4, * Use midterm questions for previous 231/217 midterms for practices * ams
Welcome to CCGPS Accelerated Coordinate Algebra Honors Curriculum Night 2012.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
ADVANCED GEOMETRY Mrs. Sanchez
Midterm Exam Topics (Prof. Chang's section) CMSC 201.
Chapter 15. Modules Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2012.
Tips. Iteration On a list: o group = ["Paul","Duncan","Jessica"] for person in group: print(group) On a dictionary: o stock = {'eggs':15, 'milk':3, 'sugar':28}
Outline of Script Import Modules Setup Workspace Environment and Assign Data Path Variables Summary of Script Title and Author Info.
Windows 7 Ultimate To Load Click Simulation PPSX
GCSE COMPUTER SCIENCE Practical Programming using Python
Lesson 06: Functions Class Participation: Class Chat:
Lesson 12: Data Analysis Class Participation: Class Chat:
IST256 : Applications Programming for Information Systems
A-level Computing Programming challenge 1: Fizzbuzz
Fundamentals of Python: First Programs
Exam #1 You will have exactly 30 Mins to complete the exam.
Lesson 08: Files Class Participation: Class Chat: Attendance Code 
Python Programming Challenge
Chapter 5- Assembling , Linking, and Executing Programs
Lesson 10: Dictionaries Topic: Introduction to Programming, Zybook Ch 9, P4E Ch 9. Slides on website.
Lesson 13: Visualizations
Week of 12/12/16 Test Review.
(optional - but then again, all of these are optional)
IST256 : Applications Programming for Information Systems
IST256 : Applications Programming for Information Systems
Lesson 05: Iterations Class Chat: Attendance: Participation
Welcome to Mrs. McGovern’s 7th Grade Level 1 Mathematics Class.
IST256 : Applications Programming for Information Systems
IST256 : Applications Programming for Information Systems
Lesson 12: Data Analysis Topic: Data Analysis, Readings on website.
IST256 : Applications Programming for Information Systems
and Executing Programs
Lesson 13: Visualizations
IST256 : Applications Programming for Information Systems
Learning to Program in Python
Lesson 05: Iterations Topic: Introduction to Programming, Zybook Ch 4, P4E Ch 5. Slides on website.
James Ryder Randall ES 5th Grade Classroom Supply List SY
Tetris – Extra Credit Project
Lesson 08: Files Topic: Introduction to Programming, Zybook Ch 7, P4E Ch 7. Slides on website.
1. Open Visual Studio 2008.
Lab 9 & 10: Drill 2 and Homework 4
Iteration: Beyond the Basic PERFORM
G7 programing language Teacher / Shamsa Hassan Alhassouni.
IST256 : Applications Programming for Information Systems
Lesson 06: Functions Class Chat: Attendance: Participation
IST256 : Applications Programming for Information Systems
Lesson 08: Files Class Chat: Attendance: Participation
Lesson 10: Dictionaries Class Chat: Attendance: Participation
Python Lesson’S 1 & 2 Mr. Kalmes.
Python Crash Course CSC 576: Data Science.
Introduction to Programming with Python
Announcements Quiz 5: grades and solution posted
Python Modules.
6th grade course selection
Unit 3: Variables in Java
Lesson 12: Data Analysis Class Chat: Attendance: Participation
Lesson 02: Introduction to Python
IST256 : Applications Programming for Information Systems
Make Homework Count and Gain Back Minutes a Day!
IST256 : Applications Programming for Information Systems
CSE 231 Lab 15.
 A function is a named sequence of statement(s) that performs a computation. It contains  line of code(s) that are executed sequentially from top.
Python Modules.
IST256 : Applications Programming for Information Systems
Presentation transcript:

IST256 : Applications Programming for Information Systems Modules

Agenda Connection Activity Teaching: Practice Activity Quiz #5, Homework Check Teaching: Dictionaries Practice Activity Word Counts

Connect Activity Quiz # 5 Then Homework Check: Word Count Histogram

Modules Python modules are separate files of Python code. When you import a module, Python executes the and all the variables and functions (i.e. names) in the module become available to your program. The dir() function will display the names defined by the module.

Watch Me Code Import Modules: Import sys, math and random dir() Short and sweet demo

Avoiding Name Errors Since real programs import several modules, to avoid name errors we can elect to import specific items from the module. This improves performance buy avoiding the execution of unnecessary code. We can also choose to alias a module and give it another name.

Watch Me Code Modules Import math Import math with alias Import specific names from math Short and sweet demo

90 Second Challenge from a import b,c import d as e What is a ? What is b ? What is c ? What is d ? What is e ?

Help me Code Print the current date and time. Like this: Use the datetime module dir() and Python 3 docs to help you https://github.com/mafudge/datasets/blob/master/customers/customers.csv Similar to this: file = '/pub/datasets/grades/fall2015.tsv' grades = list() with open(file) as inp: for line in inp: values = line.split() vald = { 'course': values[2], 'credits': values[3], 'grade' : values[4] } grades.append(vald)

Now You Code Print Names of Notebook Files Write a program to print out the .ipynb notebook files in your current folder. Suggested Approach Import the os module. Figure out which function to use. Figure out what the data type of the output of the function is. Filter the directory output to just display those files which end in “.ipynb”