# Turn in a printout of your code exercises stapled to your answers to the written exercises at 2:10 PM on Thursday, January 13th.

Save this PDF as:

Size: px
Start display at page:

## Transcription

3 Exercise 3.4 More About Dictionaries In homework 3.py, under the Exercise 3.4 heading, notice that we ve defined two lists: NAMES = [ Alice, Bob, Cathy, Dan, Ed, Frank, Gary, Helen, Irene, Jack, Kelly, Larry ] AGES = [20, 21, 18, 18, 19, 20, 20, 19, 19, 19, 22, 19] These lists match up, so Alice s age is 20, Bob s age is 21, and so on. Write a function combine lists that combines these lists into a dictionary (hint: what should the keys, and what should the values, of this dictionary be? ). Then, write a function people that takes in an age and returns the names of all the people who are that age. Test your program s functions by running these lines (they are commented at the bottom of the code file; uncomment them to use them): print Dan in people(18) and Cathy in people(18) print Ed in people(19) and Helen in people(19) and\ Irene in people(19) and Jack in people(19) and Larry in people(19) print Alice in people(20) and Frank in people(20) and Gary in people(20) print people(21) == [ Bob ] print people(22) == [ Kelly ] print people(23) == [] All lines should print True. The last line is an edge condition that we re testing; your people function should be able to handle this condition (hint: what is this condition?) by simply returning an empty list... Exercise 3.5 Zeller s Algorithm, revisited This is similar to the optional problem from Homework 1, but in this version we will be writing a function that takes parameters, and using dictionaries to facilitate pretty printing (where the answer is given to the user in a nice looking fashion). For the rules of the algorithm, please take a look at the description written in Homework 1 (available as a pdf online, under the Materials section of the course website). Calling zellers( March, 10, 1940) should give the output: Sunday Hints: 1. Use a dictionary to map between the month and its numerical value. 2. You can use either a list or dictionary to convert the final output of the algorithm to the day of the week. 3. Make sure you handle the following three points correctly. Note: If the month is January or February, then the preceding year is used for computation. This is because there was a period in history when March 1st, not January 1st, was the beginning of the year. If the computed value of R is a negative number, add 7 to get a nonnegative number between 0 and 6. You might need to use one of the following (but, maybe not): To convert the string 90 to the number 90, use int( 90 ); to convert the int 90 to the string 90, use str(90). 3

6 MIT OpenCourseWare A Gentle Introduction to Programming January IAP 2011 For information about citing these materials or our Terms of Use, visit:

### Name & Recitation Section:

Name & Recitation Section: Due Thursday, Jan 13 at 2:10 PM in 34-101. Please print out your code files (homework 3.py, queue.py, and any code you wrote for optional problems), and staple them to the back

### Name & Recitation Section:

Name & Recitation Section: Due Wednesday, Jan 5 at 2:10 PM in 34-101. Please print out your code files (homework 1.py, rps.py, loops.py, and any code you wrote for optional problems), staple them to the

### 6.189 Project 1. Readings. What to hand in. Project 1: The Game of Hangman. Get caught up on all the readings from this week!

6.189 Project 1 Readings Get caught up on all the readings from this week! What to hand in Print out your hangman code and turn it in Monday, Jaunary 10 at 2:10 PM. Be sure to write your name and section

### MIT AITI Python Software Development

MIT AITI Python Software Development PYTHON L02: In this lab we practice all that we have learned on variables (lack of types), naming conventions, numeric types and coercion, strings, booleans, operator

### If Statements, For Loops, Functions

Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

### MITOCW watch?v=flgjisf3l78

MITOCW watch?v=flgjisf3l78 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

### 6.S189 Homework 1. What to turn in. Exercise 1.1 Installing Python. Exercise 1.2 Hello, world!

6.S189 Homework 1 http://web.mit.edu/6.189/www/materials.html What to turn in Do the warm-up problems for Days 1 & 2 on the online tutor. Complete the problems below on your computer and get a checkoff

### Intro to Python & Programming. C-START Python PD Workshop

Don t just buy a new video game, make one. Don t just download the latest app, help design it. Don t just play on your phone, program it. No one is born a computer scientist, but with a little hard work

### Logistics. Half of the people will be in Wu & Chen The other half in DRLB A1 Will post past midterms tonight (expect similar types of questions)

Data Structures Logistics Midterm next Monday Half of the people will be in Wu & Chen The other half in DRLB A1 Will post past midterms tonight (expect similar types of questions) Review on Wednesday Come

### CS2304: Python for Java Programmers. CS2304: Sequences and Collections

CS2304: Sequences and Collections Sequences In Python A sequence type in python supports: The in membership operator. The len() function. Slicing like we saw with strings, s[1:3]. And is iterable (for

### Lecture 6 CS2110 Spring 2013 RECURSION

Lecture 6 CS2110 Spring 2013 RECURSION Recursion 2 Arises in three forms in computer science Recursion as a mathematical tool for defining a function in terms of its own value in a simpler case Recursion

### A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions.

Handout 2 Functions, Lists, For Loops and Tuples [ ] Functions -- parameters/arguments, "calling" functions, return values, etc. Please make sure you understand this example: def square(x): return x *

### 3137 Data Structures and Algorithms in C++

3137 Data Structures and Algorithms in C++ Lecture 3 July 12 2006 Shlomo Hershkop 1 Announcements Homework 2 out tonight Please make sure you complete hw1 asap if you have issues, please contact me will

### Problem Solving for Intro to Computer Science

Problem Solving for Intro to Computer Science The purpose of this document is to review some principles for problem solving that are relevant to Intro to Computer Science course. Introduction: A Sample

### Overview of List Syntax

Lists and Sequences Overview of List Syntax x = [0, 0, 0, 0] Create list of length 4 with all zeroes x 4300112 x.append(2) 3 in x x[2] = 5 x[0] = 4 k = 3 Append 2 to end of list x (now length 5) Evaluates

### Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department

Al al-bayt University Prince Hussein Bin Abdullah College for Information Technology Computer Science Department 0901212 Python Programming 1 st Semester 2014/2015 Course Catalog This course introduces

### Lab 4: Imperative & Debugging 12:00 PM, Feb 14, 2018

CS18 Integrated Introduction to Computer Science Fisler, Nelson Lab 4: Imperative & Debugging 12:00 PM, Feb 14, 2018 Contents 1 Imperative Programming 1 1.1 Sky High Grades......................................

### For strings (and tuples, when we get to them), its easiest to think of them like primitives directly stored in the variable table.

Page 1 6.189 Notes Session 8 Day 6: Immutable Objects Earlier, we made a big deal about the fact that lists are mutable. The reason this is important is because certain objects are immutable once created,

### CSCI-1200 Data Structures Spring 2018 Lecture 14 Associative Containers (Maps), Part 1 (and Problem Solving Too)

CSCI-1200 Data Structures Spring 2018 Lecture 14 Associative Containers (Maps), Part 1 (and Problem Solving Too) HW6 NOTE: Do not use the STL map or STL pair for HW6. (It s okay to use them for the contest.)

### INTERMEDIATE LEVEL PYTHON PROGRAMMING SELECTION AND CONDITIONALS V1.0

INTERMEDIATE LEVEL PYTHON PROGRAMMING SELECTION AND CONDITIONALS V1.0 OCTOBER 2014 Python Selection and Conditionals 1 SELECTION AND CONDITIONALS WHAT YOU MIGHT KNOW ALREADY You will probably be familiar

### Be careful when deciding whether to represent data as integers or floats, and be sure that you consider all possible behaviors in computation.

Table of Contents: 1. Integers and floats 2. for vs. while loops 3. Checking boolean conditions with if/else 4. Docstrings 5. Changing collections while iterating over them 6. Directly Accessing Instance

### 1.2 Adding Integers. Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line

1.2 Adding Integers Contents: Numbers on the Number Lines Adding Signed Numbers on the Number Line Finding Sums Mentally The Commutative Property Finding Sums using And Patterns and Rules of Adding Signed

### Posting Bridge Game Results to VCBridge.org by Bob Gruber

Posting Bridge Game Results to VCBridge.org by Bob Gruber To post bridge game results to VCBridge.org the Ventura Unit, Unit 547, web site you need three things: 1. an Internet connection, 2. ACBLscore

### Lecture 6. COMP1006/1406 (the OOP course) Summer M. Jason Hinek Carleton University

Lecture 6 COMP1006/1406 (the OOP course) Summer 2014 M. Jason Hinek Carleton University today s agenda assignments A1,A2,A3 are all marked A4 marking just started A5 is due Friday, A6 is due Monday a quick

### At full speed with Python

At full speed with Python João Ventura v0.1 Contents 1 Introduction 2 2 Installation 3 2.1 Installing on Windows............................ 3 2.2 Installing on macos............................. 5 2.3

### Programming in Python

3. Sequences: Strings, Tuples, Lists 15.10.2009 Comments and hello.py hello.py # Our code examples are starting to get larger. # I will display "real" programs like this, not as a # dialog with the Python

### 6.00 Introduction to Computer Science and Programming Fall 2008

MIT OpenCourseWare http://ocw.mit.edu 6.00 Introduction to Computer Science and Programming Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

### Python for Non-programmers

Python for Non-programmers A Gentle Introduction 1 Yann Tambouret Scientific Computing and Visualization Information Services & Technology Boston University 111 Cummington St. yannpaul@bu.edu Winter 2013

### Lecture 3: Recursion; Structural Induction

15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

### : Principles of Imperative Computation, Spring Homework 3 Theory [Update 1]

15-122 Homework 3 Page 1 of 15 15-122 : Principles of Imperative Computation, Spring 2013 Homework 3 Theory [Update 1] Due: Thursday, February 21, 2013, at the beginning of lecture Name: Andrew ID: Recitation:

### CS61A Discussion Notes: Week 11: The Metacircular Evaluator By Greg Krimer, with slight modifications by Phoebus Chen (using notes from Todd Segal)

CS61A Discussion Notes: Week 11: The Metacircular Evaluator By Greg Krimer, with slight modifications by Phoebus Chen (using notes from Todd Segal) What is the Metacircular Evaluator? It is the best part

### Practice Midterm Exam #2

Eric Roberts Handout #25 CS106B January 30, 2013 Practice Midterm Exam #2 Review session: Sunday, February 3, 7:00 9:00 P.M., Hewlett 201 (next door) Midterm #1: Tuesday, February 5, 3:15 5:15 P.M., Braun

### Functions that return lists

342 Chapter 23 Functions that return lists If you did exercises 22.5.15 or 22.5.16, you ve already written some functions that return lists, but only in a very simple way: adding one new element to the

### SCHEME 7. 1 Introduction. 2 Primitives COMPUTER SCIENCE 61A. October 29, 2015

SCHEME 7 COMPUTER SCIENCE 61A October 29, 2015 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme programs,

### Intro. Scheme Basics. scm> 5 5. scm>

Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

### The second statement selects character number 1 from and assigns it to.

Chapter 8 Strings 8.1 A string is a sequence A string is a sequence of characters. You can access the characters one at a time with the bracket operator: The second statement selects character number 1

### CSC-140 Assignment 6

CSC-140 Assignment 6 1 Introduction In this assignment we will start out defining our own classes. For now, we will design a class that represents a date, e.g., Tuesday, March 15, 2011, or in short hand

### Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials

Fundamentals We build up instructions from three types of materials Constants Expressions Fundamentals Constants are just that, they are values that don t change as our macros are executing Fundamentals

### CS 61B Discussion 5: Inheritance II Fall 2014

CS 61B Discussion 5: Inheritance II Fall 2014 1 WeirdList Below is a partial solution to the WeirdList problem from homework 3 showing only the most important lines. Part A. Complete the implementation

### Spring 2018 Discussion 7: March 21, Introduction. 2 Primitives

CS 61A Scheme Spring 2018 Discussion 7: March 21, 2018 1 Introduction In the next part of the course, we will be working with the Scheme programming language. In addition to learning how to write Scheme

### Stacks. Revised based on textbook author s notes.

Stacks Revised based on textbook author s notes. Stacks A restricted access container that stores a linear collection. Very common for solving problems in computer science. Provides a last-in first-out

### Lecture #7: Recursion (and a data structure)

Lecture #7: Recursion (and a data structure) Announcements: A message from the AWE: The Association of Women in EECS is hosting a 61A party this Sunday (2/9) from 1 3PM in the Woz! Come hang out, befriend

### DNHI Homework 3 Solutions List, Stacs and Queues

Solutions List, Stacs and Queues Problem 1 Given the IntegerQueue ADT below state the return value and show the content of the, initially empty, queue of Integer objects after each of the following operations.

### CS24 Week 4 Lecture 2

CS24 Week 4 Lecture 2 Kyle Dewey Overview Linked Lists Stacks Queues Linked Lists Linked Lists Idea: have each chunk (called a node) keep track of both a list element and another chunk Need to keep track

### Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

### 19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd

19 Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd Will you walk a little faster? said a whiting to a snail, There s a porpoise close behind us, and he s treading

### Sixth lecture; classes, objects, reference operator.

Sixth lecture; classes, objects, reference operator. 1 Some notes on the administration of the class: From here on out, homework assignments should be a bit shorter, and labs a bit longer. My office hours

### AQA Decision 1 Algorithms. Section 1: Communicating an algorithm

AQA Decision 1 Algorithms Section 1: Communicating an algorithm Notes and Examples These notes contain subsections on Flow charts Pseudo code Loops in algorithms Programs for the TI-83 graphical calculator

### CS 211 Programming Practicum Spring 2018

Due: Thursday, 4/5/18 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a C++ program that will evaluate an infix expression. The algorithm REQUIRED for this program will

### Fundamentals of Perl 6 From Zero to Scripting. By Jeffrey Goff, in conjunction with O'Reilly Media

Fundamentals of Perl 6 From Zero to Scripting By Jeffrey Goff, in conjunction with O'Reilly Media What Is Perl 6? Perl's newest language family member Released Christmas 2015 Dynamically typed Runs on

### 10/26/2017 CHAPTER 3 & 4. Stacks & Queues. The Collection Framework

CHAPTER 3 & 4 Stacks & Queues The Collection Framework 1 Stack Abstract Data Type A stack is one of the most commonly used data structures in computer science A stack can be compared to a Pez dispenser

### LIFO : Last In First Out

Introduction Stack is an ordered list in which all insertions and deletions are made at one end, called the top. Stack is a data structure that is particularly useful in applications involving reversing.

### Pupil Name. Year. Teacher. Target Level. Key Stage 3 Self-Assessment Year 9 Python. Spelling Test No 3. Spelling Test No 2. Spelling Test No 1

Pupil Name Year Teacher Target Level Spelling Test No 1 Spelling Test No 2 Spelling Test No 3 1) 2) 3) 4) 5) 1) 2) 3) 4) 5) 1) 2) 3) 4) 5) Spelling Test No 4 Spelling Test No 5 Spelling Test No 6 1) 2)

### Assignment: 7. Due: Language level: Allowed recursion:

Assignment: 7 Due: Language level: Allowed recursion: CS 135 Winter 2018 Graham, Nijjar Tuesday, March 13th, 2018 9:00pm Beginning Student with List Abbreviations Pure Structural and Structural Recursion

### They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list.

Arrays Perl arrays store lists of scalar values, which may be of different types. They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. A list literal

### 15-122: Principles of Imperative Computation, Fall 2015

15-122 Programming 5 Page 1 of 10 15-122: Principles of Imperative Computation, Fall 2015 Homework 5 Programming: Clac Due: Thursday, October 15, 2015 by 22:00 In this assignment, you will implement a

### Signed umbers. Sign/Magnitude otation

Signed umbers So far we have discussed unsigned number representations. In particular, we have looked at the binary number system and shorthand methods in representing binary codes. With m binary digits,

### PRIORITY QUEUES AND HEAPS

PRIORITY QUEUES AND HEAPS Lecture 17 CS2110 Spring 201 Readings and Homework 2 Read Chapter 2 A Heap Implementation to learn about heaps Exercise: Salespeople often make matrices that show all the great

### Lecture 12: Abstraction Functions

Lecture 12: Abstraction Functions 12.1 Context What you ll learn: How to read, write, and use abstraction functions to describe the relationship between the abstract values of a type and its representation.

### Basic Scripting, Syntax, and Data Types in Python. Mteor 227 Fall 2017

Basic Scripting, Syntax, and Data Types in Python Mteor 227 Fall 2017 Basic Shell Scripting/Programming with Python Shell: a user interface for access to an operating system s services. The outer layer

### infix expressions (review)

Outline infix, prefix, and postfix expressions queues queue interface queue applications queue implementation: array queue queue implementation: linked queue application of queues and stacks: data structure

### Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Hello World! Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande Chapter 1 Copyright 2009 Manning Publications brief contents Preface xiii Acknowledgments xix About this

### C# Programming Exercises

EASJ Notes C# Programming Exercises (used in conjunction with Object-Oriented Programming With C#) By Per Laursen 06-02-2017 Content ProFun.0... 3 ProFun.1... 4 ProFun.2... 5 ProFun.3... 6 OOPFun.1...

### CIS 194: Homework 5. Due Monday, 18 February. Expressions. (2 + 3) 4 would be represented by the value

CIS 194: Homework 5 Due Monday, 18 February Files you should submit: Calc.hs, containing a module of the same name. As we saw in class, Haskell s type classes provide ad-hoc polymorphism, that is, the

### (3-2) Basics of a Stack. Instructor - Andrew S. O Fallon CptS 122 (January 26, 2018) Washington State University

(3-2) Basics of a Stack Instructor - Andrew S. O Fallon CptS 122 (January 26, 2018) Washington State University What is a Stack? A finite sequence of nodes, where only the top node may be accessed Insertions

### CS 220: Introduction to Parallel Computing. Arrays. Lecture 4

CS 220: Introduction to Parallel Computing Arrays Lecture 4 Note: Windows I updated the VM image on the website It now includes: Sublime text Gitkraken (a nice git GUI) And the git command line tools 1/30/18

### CSC148 Recipe for Designing Classes

Part 1: Define the API for the class CSC148 Recipe for Designing Classes Download the sample code here: https://www.teach.cs.toronto.edu/~csc148h/fall/lectures/object-oriented-programming/common/course.

### Topic 4 Expressions and variables

Topic 4 Expressions and variables "Once a person has understood the way variables are used in programming, he has understood the quintessence of programming." -Professor Edsger W. Dijkstra Based on slides

### Haskell Making Our Own Types and Typeclasses

Haskell Making Our Own Types and Typeclasses http://igm.univ-mlv.fr/~vialette/?section=teaching Stéphane Vialette LIGM, Université Paris-Est Marne-la-Vallée January 13, 2015 Making Our Own Types and Typeclasses

### Math Day 2 Programming: How to make computers do math for you

Math Day 2 Programming: How to make computers do math for you Matt Coles February 10, 2015 1 Intro to Python (15min) Python is an example of a programming language. There are many programming languages.

### 5 R1 The one green in the same place so either of these could be green.

Page: 1 of 20 1 R1 Now. Maybe what we should do is write out the cases that work. We wrote out one of them really very clearly here. [R1 takes out some papers.] Right? You did the one here um where you

### MP 3 A Lexer for MiniJava

MP 3 A Lexer for MiniJava CS 421 Spring 2010 Revision 1.0 Assigned Tuesday, February 2, 2010 Due Monday, February 8, at 10:00pm Extension 48 hours (20% penalty) Total points 50 (+5 extra credit) 1 Change

### Lecture 12 ADTs and Stacks

Lecture 12 ADTs and Stacks Modularity Divide the program into smaller parts Advantages Keeps the complexity managable Isolates errors (parts can be tested independently) Can replace parts easily Eliminates

### CS 211 Programming Practicum Spring 2017

Due: Tuesday, 3/28/17 at 11:59 pm Infix Expression Evaluator Programming Project 5 For this lab, write a JAVA program that will evaluate an infix expression. The algorithm REQUIRED for this program will

### Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, 2006 6.082 Introduction to EECS 2 Lab #9: Link-state Routing Goal: Using a network simulator written

More About WHILE Loops http://people.sc.fsu.edu/ jburkardt/isc/week04 lecture 07.pdf... ISC3313: Introduction to Scientific Computing with C++ Summer Semester 2011... John Burkardt Department of Scientific

### From last time. What is the effect on R0 (in terms of an equivalent multiplication) of each of the following ARM instructions? ADD R0, R0, R0,LSL #3

OMP15111 Lecture 9 1/26 From last time What is the effect on R0 (in terms of an equivalent multiplication) of each of the following ARM instructions? ADD R0, R0, R0,LSL #3 RSB R0, R0, R0,LSL #2 Write down

### More on Lists, Dictionaries Introduction to File I/O CS 8: Introduction to Computer Science Lecture #10

More on Lists, Dictionaries Introduction to File I/O CS 8: Introduction to Computer Science Lecture #10 Ziad Matni Dept. of Computer Science, UCSB Administrative Tutoring/Review Session Available! TWO

### Lesson 4: Type Conversion, Mutability, Sequence Indexing. Fundamentals of Text Processing for Linguists Na-Rae Han

Lesson 4: Type Conversion, Mutability, Sequence Indexing Fundamentals of Text Processing for Linguists Na-Rae Han Objectives Python data types Mutable vs. immutable object types How variable assignment

### Most of this PDF is editable. You can either type your answers in the red boxes/lines, or you can write them neatly by hand.

15-122 : Principles of Imperative Computation, Spring 2016 Written Homework 5 6 Due: Monday 22 nd February, 2016 Name:q1 Andrew ID:q2 Section:q3 This written homework covers big-o notation, some reasoning

### Abstract Data Types Chapter 1

Abstract Data Types Chapter 1 Part Two Bags A bag is a basic container like a shopping bag that can be used to store collections. There are several variations: simple bag grab bag counting bag 2 Bag ADT

### Lecture 1. Course Overview, Python Basics

Lecture 1 Course Overview, Python Basics We Are Very Full! Lectures and Labs are at fire-code capacity We cannot add sections or seats to lectures You may have to wait until someone drops No auditors are

### [key, Left subtree, Right subtree]

Project: Binary Search Trees A binary search tree is a method to organize data, together with operations on these data (i.e., it is a data structure). In particular, the operation that this organization

### Sequences and iteration in Python

GC3: Grid Computing Competence Center Sequences and iteration in Python GC3: Grid Computing Competence Center, University of Zurich Sep. 11 12, 2013 Sequences Python provides a few built-in sequence classes:

### Computer Science 236 Fall Nov. 11, 2010

Computer Science 26 Fall Nov 11, 2010 St George Campus University of Toronto Assignment Due Date: 2nd December, 2010 1 (10 marks) Assume that you are given a file of arbitrary length that contains student

### Calculus (Math 1A) Lecture 1

Calculus (Math 1A) Lecture 1 Vivek Shende August 23, 2017 Hello and welcome to class! I am Vivek Shende I will be teaching you this semester. My office hours Starting next week: 1-3 pm on tuesdays; 2-3

### CODING CHALLENGES M A. Prepare for ios interviews, E. test yourself against friends, and level up your skills. HACKING WITH SWIFT

HACKING WITH SWIFT SWIFT CODING CHALLENGES REAL PROBLEMS, REAL SOLUTIONS Prepare for ios interviews, E L P test yourself against friends, M A S and level up your skills. E E Paul Hudson FR Chapter 1 Strings

### CS 103 Lab - Party Like A Char Star

1 Introduction In this lab you will implement a "hangman" game where the user is shown blanks representing letter of a word and then tries to guess and fill in the letters with a limited number of guesses.

### 15-110: Principles of Computing, Spring 2018

15-110: Principles of Computing, Spring 2018 Programming Assignment 5 Due: Tuesday, February 27 by 9PM Note: You are responsible for protecting your solutions to the following problems from being seen

### Coding Workshop. Learning to Program with an Arduino. Lecture Notes. Programming Introduction Values Assignment Arithmetic.

Coding Workshop Learning to Program with an Arduino Lecture Notes Table of Contents Programming ntroduction Values Assignment Arithmetic Control Tests f Blocks For Blocks Functions Arduino Main Functions

### CSE 2123 Recursion. Jeremy Morris

CSE 2123 Recursion Jeremy Morris 1 Past Few Weeks For the past few weeks we have been focusing on data structures Classes & Object-oriented programming Collections Lists, Sets, Maps, etc. Now we turn our

### CS61BL Summer 2013 Midterm 2

CS61BL Summer 2013 Midterm 2 Sample Solutions + Common Mistakes Question 0: Each of the following cost you.5 on this problem: you earned some credit on a problem and did not put your five digit on the

### 06 - Building Lists Recursively. Spring 2018 COMP110

06 - Building Lists Recursively Spring 2018 COMP110 Announcements Review Session: Tomorrow Night at 5pm in SN014 Tutoring: Friday from 12-4pm in SN115 PS01 On Point Functions Due Sunday at 11:59pm Midterm

### A Function that Calls Itself. It Doesn t Do Anything! Defining a Recursive Function. 2) Base Case. 1) Divide and Conquer 11/22/2010

The Practice of Computing Using PYTHON William Punch Richard Enbody Chapter 16 Recursion: Another Control Mechanism A Function that Calls Itself The very basic meaning of a recursive function is a function

### CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG 1 Notice Class Website http://www.cs.umb.edu/~jane/cs114/ Reading Assignment Chapter 1: Introduction to Java Programming

### Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008

### Computer Science E-119 Fall Problem Set 1. Due before lecture on Wednesday, September 26

Due before lecture on Wednesday, September 26 Getting Started Before starting this assignment, make sure that you have completed Problem Set 0, which can be found on the assignments page of the course