Due Sunday November 12th, 11:59pm. Project Basics document (part of assignment):

Size: px
Start display at page:

Download "Due Sunday November 12th, 11:59pm. Project Basics document (part of assignment):"

Transcription

1 CS 112 Project #5 Due Sunday November 12th, 11:59pm. Dictionaries and File I/O Background: The purpose of this assignment is to explore dictionaries and file reading and writing. We will be reading in some data about baby names, creating a dictionary to organize all the data, and then checking for name statistics in various ways. Project Basics document (part of assignment): Project Five tester file: Project Five data files: Grading Code passes shared tests: Well-commented/submitted: TOTAL: extra credit New rule: no use of global variables (sharing data between functions not via arguments). Up to 10% penalty. What can I use? You may only use the following things. We are quite unlikely to add to the list, but note there are some useful things that weren't available earlier in the semester. If you use something disallowed, it's not an honor code violation, you just won't get points for some or all of that function (still not fun!). Restrictions no modules may be imported. (this definitely includes the csv module do the work directly!) Allowed all basic expressions and statements file reading: open(), close(), read(), readline(), readlines(), with syntax dictionaries: len, get, clear, copy, keys, values, items, pop, popitem, update all sets and set operations; all exception handling blocks/raises. functions: len(), range(), min(), max(), enumerate(), int(), and any functions you write list methods: remove(), insert(), append(), extend(), pop(), index() string methods: split(), endswith(), startswith(), join(), insert(), index() more: sorted(), sort(), reversed(), reverse() calling other functions of the project (and your own defined helper functions). Please do this! J Hint In our solution, we only used range, len, int, open, close, readlines,.get(),.items(),.remove(),.append(),.split(),.sort(). 1

2 Scenario We've got some data (about registered baby names in various years) stored in a comma-separated-values file; only read_file needs to interact with files, and all others will use our required structure to describe the names, genders, and counts per year. Definitions CSV file: This is our name for a file containing ascii text where each line in the file represents one record of information; each piece of info is surrounded by double quotes, and each of these quoted things is separated by a single comma. That's the exact formatting; nothing extra, nothing less. The very first line is the "header" row, which names the columns but is not part of the data. Here is a very small sample file that can be used in our project. Note: a file's extension has no actual effect on its contents. These are ascii files, so you can/should edit them with your code editor just as easily as a.txt or.py file. We recommend not using Excel to open the files! It saves in a slightly different format, causing trouble. "YEAR","GENDER","NAME","COUNT" "2009","MALE","DANIEL","3423" "2009","MALE","ANTHONY","3106" "2009","MALE","ANGEL","3058" "2010","MALE","JACOB","3368" "2010","MALE","DANIEL","3175" "2010","MALE","ANTHONY","2882" Database: A database allows us to store multiple names from multiple years in an organized fashion. Our database is a dictionary whose keys are tuples of (name, gender), and whose values are lists of popularity length-3 tuples in the form of (year, count, rank). When there are multiple years data for a given (name, gender), the list should have multiple tuples sorted by years. An example dictionary corresponding to the CSV file above would be: sample_db = { ('DANIEL', 'MALE'): [(2009, 3423, 1), (2010, 3175, 2)], ('ANTHONY', 'MALE'): [(2009, 3106, 2), (2010, 2882, 3)], ('ANGEL', 'MALE'): [(2009, 3058, 3)], ('JACOB', 'MALE'): [(2010, 3368, 1)] } This indicates that in 2009, Daniel was used as a male name 3423 times, and was the most popular male name that year in our records; also, Daniel was used as a male name 3175 times in 2010, and was the second-most popular male name that year in our records (second to Jacob). Similarly so for the rest of the entries. Two kinds of Database: Ranked and Unranked We either call a database ranked, where all ranks have been correctly filled in, or unranked, where ranks are either None or no longer correct due to an addition. It is common to begin filling in a database with None as the rank value, creating an unranked database, and then we will go back and recalculate/fix all the rankings. When naming function arguments, we use db and rdb accordingly to remind us what we've got. We will use a few different csv files as our examples and in testing. They come from the shared files linked at the start of this document. 2

3 Functions dealing with unranked databases These functions do not rely on rankings. You can assume the incoming database could be either ranked or not ranked. find_all_years (db) : This function accepts an existing database db, finds all years included in it total_count_for_name (db, name, gender) : This function accepts an existing database db, a name and a gender, adds all counts for that name/gender from different years and returns the total. names_by_year(db, year): accepts a database db, and a year. It builds/returns a new database with only names (of either gender) with a count in the specified year and only information for that year. The original anywhere. Return the list of years sorted in ascending order. database must not be modified. largest_count_for_year(db, year): accepts a database db, and a year. It finds the name/gender pair(s) with the highest count in that year and returns as a list of tuples (name, gender, count). Since multiple name/gender pairs might tie with the highest count, sort the list alphabetically with.sort() or sorted(). add_name (db, name, gender, year, count, rank=none): This function accepts an existing database db, name, gender, year, count, and rank then it updates the database to include that information. Return None. The resulting database is considered unranked, as the addition means the rankings aren't up-to-date. It's acceptable that there are some None ranks and some numeric ranks, so some calls to add_name may intentionally use None as the rank argument. If there is already an entry for that name/gender/year, you must replace it. Hint: This function can be helpful to implement read_file(), as well as any functions that must create a new database dictionary. Function dealing with File Reading This is the only function that deals with file reading; you can attempt it separately from all the other functions, because the other functions accept database dictionaries, and not file names they don't rely upon this function's output at all. If this function is taking up significant time please use your time wisely and keep working through the other required functions to maximize your time spent and score earned. read_file(filename): This will accept the file name as a string, and assumes it is a CSV file as described above (with our name data in the same format as the example, but with any number of rows after the header row). It will open the file, read all the name entries, and correctly create the unranked database. Return the resulting unranked database. Set all rankings to None. You can assume that for any given name/gender, there will be at most one entry for each year. Sort all [(year,count,rank)] lists by year. Hints: o How can you break this task down into multiple phases, each one taking a pass over the data and making something slightly more useful towards getting the result? o what functions in this project can you call to make read_file much easier to implement? 3

4 Functions dealing with ranked databases These functions rely upon rankings. You can assume the incoming database is always correctly ranked. get_rank_for_name_year (rdb, name, gender, year): accepts a ranked database rdb, name, gender and year. It finds and returns the rank of that name/gender in the specified year. It returns None if there is no relevant record in the database. popularity_by_name(rdb, name, gender): accepts a ranked database rdb, name, and gender. It finds the ranks for all years included in rdb for name, assemble them in a list of pairs [(year,rank)], and return the list. If rdb has no records for name, return. Sort multiple years records (tuples) by year. popularity_by_year(rdb, gender, year, top=10): accepts a ranked database rdb, gender, year, and top. It finds for the specified year, the top popular names and returns them in a list of pairs [(rank,name)]. Sort the list of pairs. You can assume top is always a positive integer. If top is not provided, use default value and report the top 10 popular names. If top is larger than the number of stored names for that year, report all names in the right order. always_popular_names(rdb, gender, years=none, top=10): accepts a ranked database rdb, gender, a list of years and a top threshold. It searches in the database for (name, gender) records that for all indicated years are present and always ranked within (and including) top, and return them as a list of names, alphabetically sorted. Their rankings across the years are not part of the returned answer. If years is not provided, use all years present anywhere in the database. If top is not provided, default to 10. Hint: call previous functions! Functions creating/updating ranked databases These functions start from a database that either has incomplete rankings, or with incorrect rankings. They will need to create correct rankings for the rsulting database. rank_names_by_year_gender (db, year, gender) : This function accepts an existing (unranked) database db, a year and a gender. It calculates the ranking of names according to their counts and updates that information into the database. Rank male and female names separately. The most popular name for each gender (with the highest count) gets a rank value of 1. Assign all tied-count names with the same rank and make sure the next rank is adjusted accordingly. Given counts of A:10, B:5, C:5, D:5, E:1, they'd get rankings of A=1, B=2, C=2, D=2, E=5. This function updates the database in-place and returns None. rank_names (db) : This function accepts an existing database and ranks all names for all years of data present, making the database become ranked. This function should return None. Rank male and female names separately. Hint: use previous functions! Extra Credit merge_databases(db1, db2): accepts two databases. This function creates and returns a new database containing the entries from both sources. db1 and db2 can't be modified. When the same name-genderyear is encountered in both databases, we must add the counts of each together for the new database (pretend we are merging data from each state in the USA). The result must be re-ranked before returning it. 4

5 Examples Note: changes/new things in database highlighted in green. commands in red. = read_file("file2.csv") ('HIGHLANDER', 'MALE'): [(2013, 1, None)]} >>> add_name(d1,'jacob','male',2009,2978) ('HIGHLANDER', 'MALE'): [(2013, 1, None)], ('JACOB', 'MALE'): [(2009, 2978, None)]} >>> add_name(d1,'jacob','male',2010,3368) ('HIGHLANDER', 'MALE'): [(2013, 1, None)], ('JACOB', 'MALE'): [(2009, 2978, None), (2010, 3368, None)]} >>> find_all_years(d1) [2009, 2010, 2011, 2012, 2013] >>> total_count_for_name(d1,'bart','male') 700 >>> total_count_for_name(d1,'bart','female') 0 >>> names_by_year(d1,2011) {('DANIEL','MALE'): [(2011, 450, None)], ('BART', 'MALE'): [(2011, 300, None)], ('CHASE', 'MALE'): [(2011, 350, None)], ('ZUUL', 'MALE'): [(2011, 2, None)]} >>> names_by_year(d1,2013) {('HIGHLANDER', 'MALE'): [(2013, 1, None)]} >>> largest_count_for_year(d1,2011) [('DANIEL', 'MALE', 450)] >>> largest_count_for_year(d1,2049) >>> rank_names(d1) ('HIGHLANDER', 'MALE'): [(2013, 1, 1)], ('JACOB', 'MALE'): [(2009, 2978, 1), (2010, 3368, 1)]} >>> get_rank_for_name_year(d1,'daniel','male',2009) 2 >>> popularity_by_name(d1,'jacob','male') [(2009, 1), (2010, 1)] >>> popularity_by_name(d1,'daniel','male') [(2009, 2), (2010, 2), (2011, 1), (2012, 1)] >>> popularity_by_year(d1,'male',2011) [(1, 'DANIEL'), (2, 'CHASE'), (3, 'BART'), (4, 'ZUUL')] >>> popularity_by_year(d1,'male',2011,3) [(1, 'DANIEL'), (2, 'CHASE'), (3, 'BART')] >>> always_popular_names(d1,'male',[2009,2010]) ['DANIEL', 'JACOB'] >>> always_popular_names(d1,'male',[2009,2010,2011]) ['DANIEL'] >>> always_popular_names(d1,'male',[2009,2010,2011,2049]) >>> always_popular_names(d1,'male',[2009,2010,2011],top=1) = read_file("file8.csv") {('B', 'MALE'): [(2008, 90, None), (2009, 90, None), (2010, 90, None), (2011, 80, None)], ('C', 'MALE'): [(2009, 90, None), (2010, 90, None), (2011, 70, None)], ('A', 'MALE'): [(2010, 90, None), (2011, 90, None)], ('D', 'MALE'): [(2011, 60, None)], ('E', 'MALE'): [(2011, 60, None)], ('F', 'MALE'): [(2011, 1, None)]} >>> rank_names_by_year_gender(d8,2009,'male') {('B', 'MALE'): [(2008, 90, None), (2009, 90, 1), (2010, 90, None), (2011, 80, None)], ('C', 'MALE'): [(2009, 90, 1), (2010, 90, None), (2011, 70, None)], ('A', 'MALE'): [(2010, 90, None), (2011, 90, None)], ('D', 'MALE'): [(2011, 60, None)], ('E', 'MALE'): [(2011, 60, None)], ('F', 'MALE'): [(2011, 1, None)]} >>> rank_names_by_year_gender(d8,2011,'male') {('B', 'MALE'): [(2008, 90, None), (2009, 90, 1), (2010, 90, None), (2011, 80, 2)], ('C', 'MALE'): [(2009, 90, 1), (2010, 90, None), (2011, 70, 3)], ('A', 'MALE'): [(2010, 90, None), (2011, 90, 1)], ('D', 'MALE'): [(2011, 60, 4)], ('E', 'MALE'): [(2011, 60, 4)], ('F', 'MALE'): [(2011, 1, 6)]} >>> rank_names(d8) {('B', 'MALE'): [(2008, 90, 1), (2009, 90, 1), (2010, 90, 1), (2011, 80, 2)], ('C', 'MALE'): [(2009, 90, 1), (2010, 90, 1), (2011, 70, 3)], ('A', 'MALE'): [(2010, 90, 1), (2011, 90, 1)], ('D', 'MALE'): [(2011, 60, 4)], ('E', 'MALE'): [(2011, 60, 4)], ('F', 'MALE'): [(2011, 1, 6)]} >>> d2 = { ('HIGHLANDER', 'MALE'): [(2009,3, 2)], ('JACOB', 'MALE'): [(2009,1001, 1),(2010,780,2)], ('AMY','FEMALE'):[(2009,200,1)]} >>> merge_databases(d1,d2) ('HIGHLANDER', 'MALE'): [(2009, 3, 3), (2013, 1, 1)], ('JACOB', 'MALE'): [(2009, 3979, 1), (2010, 4148, 1)], ('AMY', 'FEMALE'): [(2009, 200, 1)]} #unchanged ('HIGHLANDER', 'MALE'): [(2013, 1, 1)], ('JACOB', 'MALE'): [(2009, 2978, 1), (2010, 3368, 1)]} >>> d2 #unchanged {('HIGHLANDER', 'MALE'): [(2009, 3, 2)], ('JACOB', 'MALE'): [(2009, 1001, 1), (2010, 780, 2)], ('AMY', 'FEMALE'): [(2009, 200, 1)]} 5

CS 1510: Intro to Computing - Fall 2017 Assignment 8: Tracking the Greats of the NBA

CS 1510: Intro to Computing - Fall 2017 Assignment 8: Tracking the Greats of the NBA CS 1510: Intro to Computing - Fall 2017 Assignment 8: Tracking the Greats of the NBA Code Due: Tuesday, November 7, 2017, by 11:59 p.m. The Assignment The purpose of this assignment is to give you more

More information

Types, lists & functions

Types, lists & functions Week 2 Types, lists & functions Data types If you want to write a program that allows the user to input something, you can use the command input: name = input (" What is your name? ") print (" Hello "+

More information

CS Homework 4 Lifeguard Employee Ranker. Due: Tuesday, June 3rd, before 11:55 PM Out of 100 points. Files to submit: 1. HW4.py.

CS Homework 4 Lifeguard Employee Ranker. Due: Tuesday, June 3rd, before 11:55 PM Out of 100 points. Files to submit: 1. HW4.py. CS 2316 Homework 4 Lifeguard Employee Ranker Due: Tuesday, June 3rd, before 11: PM Out of 100 points Files to submit: 1. HW4.py This is an PAIR assignment! This is a pair programming problem! You are expected

More information

1 of 5 5/11/2006 12:10 AM CS 61A Spring 2006 Midterm 2 solutions 1. Box and pointer. Note: Please draw actual boxes, as in the book and the lectures, not XX and X/ as in these ASCII-art solutions. Also,

More information

CS Homework 4 Employee Ranker. Due: Wednesday, February 8th, before 11:55 PM Out of 100 points. Files to submit: 1. HW4.py.

CS Homework 4 Employee Ranker. Due: Wednesday, February 8th, before 11:55 PM Out of 100 points. Files to submit: 1. HW4.py. CS 216 Homework 4 Employee Ranker Due: Wednesday, February 8th, before 11: PM Out of 0 points Files to submit: 1. HW4.py This is an INDIVIDUAL assignment! Collaboration at a reasonable level will not result

More information

CS3 Midterm 1 Fall 2006

CS3 Midterm 1 Fall 2006 Overall, you did good job on this exam. CS3 Midterm 1 Fall 2006 Standards and Solutions 20 10 0 8.0 30.0 28.0 26.0 24.0 22.0 20.0 18.0 16.0 14.0 12.0 10.0 Std. Dev = 5.34 Mean = 21.6 N = 133.00 MT1_SCL

More information

Assignment 2: Processing New York City Open Data

Assignment 2: Processing New York City Open Data Assignment 2: Processing New York City Open Data Due date: Sept. 28, 11:59PM EST. 1 Summary This assignment is designed to expose you to the use of open data. Wikipedia has a good description of open data:

More information

Lab - 8 Awk Programming

Lab - 8 Awk Programming Lab - 8 Awk Programming AWK is another interpreted programming language which has powerful text processing capabilities. It can solve complex text processing tasks with a few lines of code. Listed below

More information

CS 11 Project #6 Due THURSDAY, December 7 th, 11:59pm. Classes and Exceptions Background: Classes allow us to define new types for Python. We can first think of a class as defining a new container instead

More information

Black Problem 2: Huffman Compression [75 points] Next, the Millisoft back story! Starter files

Black Problem 2: Huffman Compression [75 points] Next, the Millisoft back story! Starter files Black Problem 2: Huffman Compression [75 points] Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/huff manblack on 3/15/2017 Due: 11:59 PM on November 14, 2016 Starter files First, here is a set

More information

Microsoft Windows Software Manual for FITstep Pro Version 3

Microsoft Windows Software Manual for FITstep Pro Version 3 Thank you for purchasing this product from Gopher. If you are not satisfied with any Gopher purchase for any reason at any time, contact us and we will replace the product, credit your account, or refund

More information

Use mail merge to create and print letters and other documents

Use mail merge to create and print letters and other documents Use mail merge to create and print letters and other documents Contents Use mail merge to create and print letters and other documents... 1 Set up the main document... 1 Connect the document to a data

More information

CS264: Homework #1. Due by midnight on Thursday, January 19, 2017

CS264: Homework #1. Due by midnight on Thursday, January 19, 2017 CS264: Homework #1 Due by midnight on Thursday, January 19, 2017 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. See the course site for submission

More information

Microsoft Windows Software Manual for FITstep Stream Version 3

Microsoft Windows Software Manual for FITstep Stream Version 3 Thank you for purchasing this product from Gopher. If you are not satisfied with any Gopher purchase for any reason at any time, contact us and we will replace the product, credit your account, or refund

More information

STIDistrict Query (Basic)

STIDistrict Query (Basic) STIDistrict Query (Basic) Creating a Basic Query To create a basic query in the Query Builder, open the STIDistrict workstation and click on Utilities Query Builder. When the program opens, database objects

More information

Fortunately, you only need to know 10% of what's in the main page to get 90% of the benefit. This page will show you that 10%.

Fortunately, you only need to know 10% of what's in the main page to get 90% of the benefit. This page will show you that 10%. NAME DESCRIPTION perlreftut - Mark's very short tutorial about references One of the most important new features in Perl 5 was the capability to manage complicated data structures like multidimensional

More information

Copyright 2018 Maxprograms

Copyright 2018 Maxprograms Copyright 2018 Maxprograms Table of Contents Introduction... 1 TMXEditor... 1 Features... 1 Getting Started... 2 Editing an existing file... 2 Create New TMX File... 3 Maintenance Tasks... 4 Sorting TM

More information

Microsoft Excel 2010

Microsoft Excel 2010 www.jadehorizon.com Microsoft Excel 2010 Sorting and Filtering Sorting and Filtering Microsoft Excel 2010 Table of Contents Table of Contents INTRODUCTION... 3 CONVENTIONS... 3 TABLE DESIGN RULES... 5

More information

https://www.eskimo.com/~scs/cclass/notes/sx8.html

https://www.eskimo.com/~scs/cclass/notes/sx8.html 1 de 6 20-10-2015 10:41 Chapter 8: Strings Strings in C are represented by arrays of characters. The end of the string is marked with a special character, the null character, which is simply the character

More information

CPSC 217 Assignment 4

CPSC 217 Assignment 4 CPSC 217 Assignment 4 Due: Friday December 8, 2017 at 11:55pm Weight: 7% Sample Solution Length: Approximately 130 lines (No comments and no code for the A+ part) Individual Work: All assignments in this

More information

CheckBook Pro 2 Help

CheckBook Pro 2 Help Get started with CheckBook Pro 9 Introduction 9 Create your Accounts document 10 Name your first Account 11 Your Starting Balance 12 Currency 13 We're not done yet! 14 AutoCompletion 15 Descriptions 16

More information

Deep Dive: Pronto Transformations Reference

Deep Dive: Pronto Transformations Reference Deep Dive: Pronto Transformations Reference Available Transformations and Their Icons Transform Description Menu Icon Add Column on page 2 Important: Not available in Trial. Upgrade to Pro Edition! Add

More information

Mac Software Manual for FITstep Pro Version 3

Mac Software Manual for FITstep Pro Version 3 Thank you for purchasing this product from Gopher. If you are not satisfied with any Gopher purchase for any reason at any time, contact us and we will replace the product, credit your account, or refund

More information

Introduction to Computer Science Midterm 3 Fall, Points

Introduction to Computer Science Midterm 3 Fall, Points Introduction to Computer Science Fall, 2001 100 Points Notes 1. Tear off this sheet and use it to keep your answers covered at all times. 2. Turn the exam over and write your name next to the staple. Do

More information

USER GUIDE MADCAP LINGO Termbases

USER GUIDE MADCAP LINGO Termbases USER GUIDE MADCAP LINGO 10.2 Termbases Copyright 2018 MadCap Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document is

More information

CS 455 Midterm 2 Fall 2017 [Bono] Nov. 7, 2017

CS 455 Midterm 2 Fall 2017 [Bono] Nov. 7, 2017 Name: USC NetID (e.g., ttrojan): CS 455 Midterm 2 Fall 2017 [Bono] Nov. 7, 2017 There are 6 problems on the exam, with 62 points total available. There are 10 pages to the exam (5 pages double-sided),

More information

15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 15-110: Principles of Computing, Spring 2018 Problem Set 5 (PS5) Due: Friday, February 23 by 2:30PM via Gradescope Hand-in HANDIN INSTRUCTIONS Download a copy of this PDF file. You have two ways to fill

More information

Halting Measures and Termination Arguments

Halting Measures and Termination Arguments Halting Measures and Termination Arguments CS 5010 Program Design Paradigms Bootcamp Lesson 8.2 Mitchell Wand, 2012-2015 This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International

More information

Access Intermediate

Access Intermediate Access 2010 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC116 AC117 Selecting Fields Pages AC118 AC119 AC122 Sorting Results Pages AC125 AC126 Specifying Criteria Pages AC132 AC134

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

by the evening of Tuesday, Feb 6

by the evening of Tuesday, Feb 6 Homework 1 Due 14 February Handout 6 CSCI 334: Spring 2018 Notes This homework has three types of problems: Self Check: You are strongly encouraged to think about and work through these questions, and

More information

CS314 Exam 1 - Fall Suggested Solution and Criteria 1

CS314 Exam 1 - Fall Suggested Solution and Criteria 1 CS314 Spring 2017 Exam 1 Solution and Grading Criteria. Grading acronyms: AIOBE - Array Index out of Bounds Exception may occur BOD - Benefit of the Doubt. Not certain code works, but, can't prove otherwise

More information

Functions. Nate Foster Spring 2018

Functions. Nate Foster Spring 2018 Functions Nate Foster Spring 2018 A0: Warmup Worth only 1% of final grade; other assignments will be 5% much easier coding problems intended to give you low-stakes experience with 3110 workflow Please

More information

REDCAP DATA DICTIONARY CLASS. November 9, 2017

REDCAP DATA DICTIONARY CLASS. November 9, 2017 REDCAP DATA DICTIONARY CLASS November 9, 2017 LEARNING OBJECTIVES Learn how to leverage the data dictionary Data dictionary basics Column descriptions Best practices Interplay with longitudinal features

More information

Homework Assignment #3

Homework Assignment #3 CS 540-2: Introduction to Artificial Intelligence Homework Assignment #3 Assigned: Monday, February 20 Due: Saturday, March 4 Hand-In Instructions This assignment includes written problems and programming

More information

Instructional Management Program and Academic Communication Tool. Quick Guide to SIM 8.4 Upgrade Features. 10/14/2014 Version 2.

Instructional Management Program and Academic Communication Tool. Quick Guide to SIM 8.4 Upgrade Features. 10/14/2014 Version 2. Instructional Management Program and Quick Guide to SIM 8.4 Upgrade Features 10/14/2014 Version 2.0 FINAL (Page Intentionally Left Blank) TABLE OF CONTENTS Introduction... 1 Basic Navigation Overview...

More information

The Big Python Guide

The Big Python Guide The Big Python Guide Big Python Guide - Page 1 Contents Input, Output and Variables........ 3 Selection (if...then)......... 4 Iteration (for loops)......... 5 Iteration (while loops)........ 6 String

More information

Econ Stata Tutorial I: Reading, Organizing and Describing Data. Sanjaya DeSilva

Econ Stata Tutorial I: Reading, Organizing and Describing Data. Sanjaya DeSilva Econ 329 - Stata Tutorial I: Reading, Organizing and Describing Data Sanjaya DeSilva September 8, 2008 1 Basics When you open Stata, you will see four windows. 1. The Results window list all the commands

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 9 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To make a donation

More information

Unit 3 Fill Series, Functions, Sorting

Unit 3 Fill Series, Functions, Sorting Unit 3 Fill Series, Functions, Sorting Fill enter repetitive values or formulas in an indicated direction Using the Fill command is much faster than using copy and paste you can do entire operation in

More information

Unit 3 Functions Review, Fill Series, Sorting, Merge & Center

Unit 3 Functions Review, Fill Series, Sorting, Merge & Center Unit 3 Functions Review, Fill Series, Sorting, Merge & Center Function built-in formula that performs simple or complex calculations automatically names a function instead of using operators (+, -, *,

More information

(Updated 29 Oct 2016)

(Updated 29 Oct 2016) (Updated 29 Oct 2016) 1 Class Maker 2016 Program Description Creating classes for the new school year is a time consuming task that teachers are asked to complete each year. Many schools offer their students

More information

CS 104 (Spring 2014) Final Exam 05/09/2014

CS 104 (Spring 2014) Final Exam 05/09/2014 CS 104 (Spring 2014) Final Exam 05/09/2014 G o o d L u c k Your Name, USC username, and Student ID: This exam has 8 pages and 8 questions. If yours does not, please contact us immediately. Please read

More information

CS 3030 Scripting Languages Syllabus

CS 3030 Scripting Languages Syllabus General Information CS 3030 Scripting Languages Semester: Summer 2013 Textbook: Location: Instructor Info: Website: None. We will use freely available resources from the Internet. Online Ted Cowan tedcowan@weber.edu

More information

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science

PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science PLEASE HAND IN UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS CSC 108 H1S Instructors: Horton Duration 3 hours PLEASE HAND IN Examination Aids: None Student Number: Family Name(s):

More information

Homework 1. Reading. Problems. Handout 3 CSCI 334: Spring, 2012

Homework 1. Reading. Problems. Handout 3 CSCI 334: Spring, 2012 Homework 1 Due 14 February Handout 3 CSCI 334: Spring, 2012 Reading 1. (Required) Mitchell, Chapter 3. 2. (As Needed) The Lisp Tutorial from the Links web page, as needed for the programming questions.

More information

Slide 1 CS 170 Java Programming 1 Multidimensional Arrays Duration: 00:00:39 Advance mode: Auto

Slide 1 CS 170 Java Programming 1 Multidimensional Arrays Duration: 00:00:39 Advance mode: Auto CS 170 Java Programming 1 Working with Rows and Columns Slide 1 CS 170 Java Programming 1 Duration: 00:00:39 Create a multidimensional array with multiple brackets int[ ] d1 = new int[5]; int[ ][ ] d2;

More information

CSC 352, Fall 2015 Assignment 3 Due: Wednesday, September 16 at 23:59:59

CSC 352, Fall 2015 Assignment 3 Due: Wednesday, September 16 at 23:59:59 CSC 352, Fall 2015 Assignment 3 Due: Wednesday, September 16 at 23:59:59 Introduction The a2 write-up started with 3+ pages of various information about assignments. None of that is repeated here, but

More information

Part A. What is the output of the following code segments? Write the output to the right. Note that there is only output for the print statements.

Part A. What is the output of the following code segments? Write the output to the right. Note that there is only output for the print statements. CompSci 101 Exam 2 Sec01 Fall 2017 PROBLEM 1 : (What is the output? (18 points)) Part A. What is the output of the following code segments? Write the output to the right. Note that there is only output

More information

Inheritance Ch

Inheritance Ch Inheritance Ch 15.1-15.2 Announcements Test graded! Highlights - Creating parent/child classes (inheritance) -protected Story time Story time Story time Story time Story time Derived classes Let's make

More information

Decision Logic: if, if else, switch, Boolean conditions and variables

Decision Logic: if, if else, switch, Boolean conditions and variables CS 1044 roject 4 Summer I 2007 Decision Logic: if, if else, switch, Boolean conditions and variables This programming assignment uses many of the ideas presented in sections 3 through 5 of the course notes,

More information

Data Structures I: Linked Lists

Data Structures I: Linked Lists Lab 4 Data Structures I: Linked Lists Lab Objective: Analyzing and manipulating data are essential skills in scientific computing. Storing, retrieving, and rearranging data take time. As a dataset grows,

More information

Computing for Medicine (C4M) Seminar 3: Databases. Michelle Craig Associate Professor, Teaching Stream

Computing for Medicine (C4M) Seminar 3: Databases. Michelle Craig Associate Professor, Teaching Stream Computing for Medicine (C4M) Seminar 3: Databases Michelle Craig Associate Professor, Teaching Stream mcraig@cs.toronto.edu Relational Model The relational model is based on the concept of a relation or

More information

Monday. A few notes on homework I want ONE spreadsheet with TWO tabs

Monday. A few notes on homework I want ONE spreadsheet with TWO tabs CS 1251 Page 1 Monday Sunday, September 14, 2014 2:38 PM A few notes on homework I want ONE spreadsheet with TWO tabs What has passed before We ended last class with you creating a function called givemeseven()

More information

CompSci 101, Fall 2015, Rubric for Exam 2. Problem 1

CompSci 101, Fall 2015, Rubric for Exam 2. Problem 1 CompSci 101, Fall 2015, Rubric for Exam 2 Problem 1 In general a correct answer gets full credit. Small errors are 1 point, larger 2 points. 1 For writing a function and not assigning to the specified

More information

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

Programming Standards: You must conform to good programming/documentation standards. Some specifics: CS3114 (Spring 2011) PROGRAMMING ASSIGNMENT #3 Due Thursday, April 7 @ 11:00 PM for 100 points Early bonus date: Wednesday, April 6 @ 11:00 PM for a 10 point bonus Initial Schedule due Thursday, March

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG 1 Notice Assignments Reading Assignment: Chapter 3: Introduction to Parameters and Objects The Class 10 Exercise

More information

Project Compiler. CS031 TA Help Session November 28, 2011

Project Compiler. CS031 TA Help Session November 28, 2011 Project Compiler CS031 TA Help Session November 28, 2011 Motivation Generally, it s easier to program in higher-level languages than in assembly. Our goal is to automate the conversion from a higher-level

More information

Access Intermediate

Access Intermediate Access 2013 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC124 AC125 Selecting Fields Pages AC125 AC128 AC129 AC131 AC238 Sorting Results Pages AC131 AC136 Specifying Criteria Pages

More information

DATA STRUCTURE AND ALGORITHM USING PYTHON

DATA STRUCTURE AND ALGORITHM USING PYTHON DATA STRUCTURE AND ALGORITHM USING PYTHON Advanced Data Structure and File Manipulation Peter Lo Linear Structure Queue, Stack, Linked List and Tree 2 Queue A queue is a line of people or things waiting

More information

University of Washington, CSE 154 Homework Assignment 8: Baby Names

University of Washington, CSE 154 Homework Assignment 8: Baby Names University of Washington, CSE 154 Homework Assignment 8: Baby Names This assignment is about using Ajax to fetch data in text, HTML, XML, and JSON formats. Every 10 years, the Social Security Administration

More information

Chapter 3: The IF Function and Table Lookup

Chapter 3: The IF Function and Table Lookup Chapter 3: The IF Function and Table Lookup Objectives This chapter focuses on the use of IF and LOOKUP functions, while continuing to introduce other functions as well. Here is a partial list of what

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

Each line will contain a string ("even" or "odd"), followed by one or more spaces, followed by a nonnegative integer.

Each line will contain a string (even or odd), followed by one or more spaces, followed by a nonnegative integer. Decision-making in C Squeezing Digits out of an Integer Assignment For part of this assignment, you will use very basic C techniques to implement a C function to remove from a given nonnegative integer

More information

Chapter 7 : Arrays (pp )

Chapter 7 : Arrays (pp ) Page 1 of 45 Printer Friendly Version User Name: Stephen Castleberry email Id: scastleberry@rivercityscience.org Book: A First Book of C++ 2007 Cengage Learning Inc. All rights reserved. No part of this

More information

Homework 1. Notes. What To Turn In. Unix Accounts. Reading. Handout 3 CSCI 334: Spring, 2017

Homework 1. Notes. What To Turn In. Unix Accounts. Reading. Handout 3 CSCI 334: Spring, 2017 Homework 1 Due 14 February Handout 3 CSCI 334: Spring, 2017 Notes This homework has three types of problems: Self Check: You are strongly encouraged to think about and work through these questions, but

More information

Programming Assignment 5 (100 Points) START EARLY!

Programming Assignment 5 (100 Points) START EARLY! Programming Assignment 5 (100 Points) Due: 11:59PM Thursday, November 2 START EARLY! Mining is arduous and dangerous work. Miners need to be taught how to mine minerals in the most efficient manner possible.

More information

CS 111X - Spring Final Exam - KEY

CS 111X - Spring Final Exam - KEY CS 111X - Spring 2016 - Final Exam 1/10 Computing ID: CS 111X - Spring 2016 - Final Exam - KEY Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance on

More information

Student Database Challenge Problem

Student Database Challenge Problem Student Database Challenge Problem For this challenge problem, we will create a small database of user information. The python code we write will be able to add new data to the database, save it to a file,

More information

Relevancy Workbench Module. 1.0 Documentation

Relevancy Workbench Module. 1.0 Documentation Relevancy Workbench Module 1.0 Documentation Created: Table of Contents Installing the Relevancy Workbench Module 4 System Requirements 4 Standalone Relevancy Workbench 4 Deploy to a Web Container 4 Relevancy

More information

CS302 Midterm Exam Answers & Grading James S. Plank September 30, 2010

CS302 Midterm Exam Answers & Grading James S. Plank September 30, 2010 CS302 Midterm Exam Answers & Grading James S. Plank September 30, 2010 Question 1 Part 1, Program A: This program reads integers on standard input and stops when it encounters EOF or a non-integer. It

More information

SkyBuild. Export File Builder Overview of Export File Builder Using a Prebuilt Export Interface Creating an Export from Scratch Running an Export

SkyBuild. Export File Builder Overview of Export File Builder Using a Prebuilt Export Interface Creating an Export from Scratch Running an Export SkyBuild Overview What is SkyBuild and how is it used? Basic Export Information Basic Import Information Key Terminology for Export/Import File Builder Export File Builder Overview of Export File Builder

More information

Learn about the Display options Complete Review Questions and Activities Complete Training Survey

Learn about the Display options Complete Review Questions and Activities Complete Training Survey Intended Audience: Staff members who will be using the AdHoc reporting tools to query the Campus database. Description: To learn filter and report design capabilities available in Campus. Time: 3 hours

More information

CS 3030 Scripting Languages Syllabus

CS 3030 Scripting Languages Syllabus General Information CS 3030 Scripting Languages Semester: Fall 2017 Textbook: Location: Instructor Info: None. We will use freely available resources from the Internet. Online Ted Cowan tedcowan@weber.edu

More information

Gold Hw8 Problem 3: TT Securities, Incorporated

Gold Hw8 Problem 3: TT Securities, Incorporated Gold Hw8 Problem 3: TT Securities, Incorporated Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/ttsecuritiesgold on 3/29/2017 [25 points; individual or pair] Filename: hw8pr3.py Using your own loops...

More information

(Refer Slide Time 01:41 min)

(Refer Slide Time 01:41 min) Programming and Data Structure Dr. P.P.Chakraborty Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture # 03 C Programming - II We shall continue our study of

More information

CS 2316 Individual Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 18th, before 11:55 PM Out of 100 points

CS 2316 Individual Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 18th, before 11:55 PM Out of 100 points CS 2316 Individual Homework 4 Greedy Scheduler (Part I) Due: Wednesday, September 18th, before 11:55 PM Out of 100 points Files to submit: 1. HW4.py This is an INDIVIDUAL assignment! Collaboration at a

More information

IDEAL DataCENTER Software. Data Mining Features

IDEAL DataCENTER Software. Data Mining Features IDEAL DataCENTER Software Data Mining Features Short Application Note Status Jan 2015 Version 1 Introduction Handling and evaluating reports of big cabling projects can become quite confusing and time

More information

CS 051 Homework Laboratory #2

CS 051 Homework Laboratory #2 CS 051 Homework Laboratory #2 Dirty Laundry Objective: To gain experience using conditionals. The Scenario. One thing many students have to figure out for the first time when they come to college is how

More information

Conference Users Guide for the GCFA Statistical Input System.

Conference Users Guide for the GCFA Statistical Input System. Conference Users Guide for the GCFA Statistical Input System http://eagle.gcfa.org Published: November 29, 2007 TABLE OF CONTENTS Overview... 3 First Login... 4 Entering the System... 5 Add/Edit Church...

More information

eschoolplus+ General Information Training Guide Version 2.4

eschoolplus+ General Information Training Guide Version 2.4 eschoolplus+ General Information Training Guide Version 2.4 August 2013 Arkansas Public School Computer Network This page is intentionally left blank 8/23/2013 Page 2 of 29 Table of Contents eschoolplus

More information

My Favorite bash Tips and Tricks

My Favorite bash Tips and Tricks 1 of 6 6/18/2006 7:44 PM My Favorite bash Tips and Tricks Prentice Bisbal Abstract Save a lot of typing with these handy bash features you won't find in an old-fashioned UNIX shell. bash, or the Bourne

More information

The KWordQuiz Handbook. Peter Hedlund

The KWordQuiz Handbook. Peter Hedlund Peter Hedlund 2 Contents 1 Introduction 1 1.1 Easy to use............................... 1 1.1.1 Practice modes........................ 1 1.1.2 Quiz types........................... 1 1.1.3 Vocabulary

More information

Computer Science Foundation Exam

Computer Science Foundation Exam Computer Science Foundation Exam August 6, 017 Section I A DATA STRUCTURES SOLUTIONS NO books, notes, or calculators may be used, and you must work entirely on your own. Question # Max Pts Category Passing

More information

CS314 Spring 2014 Midterm 1 Solution and Grading Criteria.

CS314 Spring 2014 Midterm 1 Solution and Grading Criteria. CS314 Spring 2014 Midterm 1 Solution and Grading Criteria. Grading acronyms: AIOBE - Array Index out of Bounds Exception may occur BOD - Benefit of the Doubt. Not certain code works, but, can't prove otherwise

More information

gcc o driver std=c99 -Wall driver.c everynth.c

gcc o driver std=c99 -Wall driver.c everynth.c C Programming The Basics This assignment consists of two parts. The first part focuses on implementing logical decisions and integer computations in C, using a C function, and also introduces some examples

More information

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid:

Python allows variables to hold string values, just like any other type (Boolean, int, float). So, the following assignment statements are valid: 1 STRINGS Objectives: How text data is internally represented as a string Accessing individual characters by a positive or negative index String slices Operations on strings: concatenation, comparison,

More information

REVEL 3.0 Android/Keyboard Accessibility Documentation for Students REVEL 3.0

REVEL 3.0 Android/Keyboard Accessibility Documentation for Students REVEL 3.0 REVEL 3.0 Android/Keyboard Accessibility Documentation for Students REVEL 3.0 Email: info@barrierbreak.com Page 1 of 8 Contents REVEL 3.0 Android/Keyboard Accessibility Documentation for Students... 1

More information

Maximizing Statistical Interactions Part II: Database Issues Provided by: The Biostatistics Collaboration Center (BCC) at Northwestern University

Maximizing Statistical Interactions Part II: Database Issues Provided by: The Biostatistics Collaboration Center (BCC) at Northwestern University Maximizing Statistical Interactions Part II: Database Issues Provided by: The Biostatistics Collaboration Center (BCC) at Northwestern University While your data tables or spreadsheets may look good to

More information

Slicing. Open pizza_slicer.py

Slicing. Open pizza_slicer.py Slicing and Tuples Slicing Open pizza_slicer.py Indexing a string is a great way of getting to a single value in a string However, what if you want to use a section of a string Like the middle name of

More information

Introduction to Stata Getting Data into Stata. 1. Enter Data: Create a New Data Set in Stata...

Introduction to Stata Getting Data into Stata. 1. Enter Data: Create a New Data Set in Stata... Introduction to Stata 2016-17 02. Getting Data into Stata 1. Enter Data: Create a New Data Set in Stata.... 2. Enter Data: How to Import an Excel Data Set.... 3. Import a Stata Data Set Directly from the

More information

Working with Mailbox Manager

Working with Mailbox Manager Working with Mailbox Manager A user guide for Mailbox Manager supporting the Message Storage Server component of the Avaya S3400 Message Server Mailbox Manager Version 5.0 February 2003 Copyright 2003

More information

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes GIS 4653/5653: Spatial Programming and GIS More Python: Statements, Types, Functions, Modules, Classes Statement Syntax The if-elif-else statement Indentation and and colons are important Parentheses and

More information

CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY

CS 111X - Fall Test 1 - KEY KEY KEY KEY KEY KEY KEY CS 111X - Fall 2016 - Test 1 1/9 Computing ID: CS 111X - Fall 2016 - Test 1 - KEY KEY KEY KEY KEY KEY KEY Name: Computing ID: On my honor as a student, I have neither given nor received unauthorized assistance

More information

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines. Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Basic Intro to ETO Results

Basic Intro to ETO Results Basic Intro to ETO Results Who is the intended audience? Registrants of the 8 hour ETO Results Orientation (this training is a prerequisite) Anyone who wants to learn more but is not ready to attend the

More information

CircuitPython 101: Basic Builtin Data Structures

CircuitPython 101: Basic Builtin Data Structures CircuitPython 101: Basic Builtin Data Structures Created by Dave Astels Last updated on 2019-01-05 08:01:45 PM UTC Guide Contents Guide Contents Overview Tools and Materials Tuple List Making songs Dictionary

More information

CS 1520 / CoE 1520: Programming Languages for Web Applications (Spring 2013) Department of Computer Science, University of Pittsburgh

CS 1520 / CoE 1520: Programming Languages for Web Applications (Spring 2013) Department of Computer Science, University of Pittsburgh CS 1520 / CoE 1520: Programming Languages for Web Applications (Spring 2013) Department of Computer Science, University of Pittsburgh Term Project: Pittsburgh Interactive Research Accounting System (piras)

More information

CMSC 201 Fall 2015 Lab 12 Tuples and Dictionaries

CMSC 201 Fall 2015 Lab 12 Tuples and Dictionaries CMSC 201 Fall 2015 Lab 12 Tuples and Dictionaries Assignment: Lab 12 Tuples and Dictionaries Due Date: During discussion, November 30 th through December 3 rd Value: 1% of final grade Part 1: Data Types

More information

Spring CS Homework 3 p. 1. CS Homework 3

Spring CS Homework 3 p. 1. CS Homework 3 Spring 2018 - CS 111 - Homework 3 p. 1 Deadline 11:59 pm on Friday, February 9, 2018 Purpose CS 111 - Homework 3 To try out another testing function, check-within, to get more practice using the design

More information