New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Exam 2 study guide

by: Carly Ott

Exam 2 study guide 3489

Carly Ott
GPA 3.89
Algorithmic Problem Solving
Adam Carter

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

I wrote out all the answers to the clicker questions that will be on the next exam. I wrote part of the questions, but the full questions with the code to look at, is on his website.
Algorithmic Problem Solving
Adam Carter
Study Guide
50 ?




Popular in Algorithmic Problem Solving

Popular in Computer Science and Engineering

This 4 page Study Guide was uploaded by Carly Ott on Wednesday April 8, 2015. The Study Guide belongs to 3489 at Washington State University taught by Adam Carter in Spring2015. Since its upload, it has received 88 views. For similar materials see Algorithmic Problem Solving in Computer Science and Engineering at Washington State University.


Reviews for Exam 2 study guide


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 04/08/15
Chapter 6 Clicker Q s Part 2 1 Value of s after the code executes a Dictionaries give you the name of the box or value within it b Items quotaquot 1 i quotaquot key ii 1 value c Boxes are probably in a different order because the order you type it doesn t mean that is the order d For lists the answer would be 123 you get the values e For dictionaries you get the keys f Answer abc c 2 What gets printed to the screen printotheritemsquotbquot a Items quotaquot 1 b 2 quotcquot 3 b Exy5xyxx 2Dvalueofygoestox i But in lists and dictionaries you can make x equal y when y is a listdictionary c When you change items you also change otheritems d The new values would be 2 3 and 4 e Answer 3 c but with the mistake printotheritems1 answer would be E 3 What is the value of s after the code executes this question has a lot wrong to it a For x y in enumerate items s y b X gives us the keys c To get values itemsx i Name of the variable at x gives us the value d Y gives us the values only in the format given e Answer 123 d s x y would give you the answer B 4 How will Python react to the following command a Answer a python will create a new slot and store the value for that slot b This works for dictionaries not lists 5 What is the main difference between lists and dictionaries a Keys for lists are numbers and start at 0 numeric names b Dictionaries keys can be called anything custom named boxes 6 How to determine if we should use a list or dictionary best data structure to use a Dictionary i Care about name of the box ii Ex worked well with days of the week iii Better with mapping makes programming easier b Otherwise use a list Chapter 6 Clicker Questions Alist 1 2 3 4 5 6 7 a The length is 4 B b The 4 sections are 1 23 4 and 57 Xlist 1 1 2 1 2 3 printxist1 a The output is 1 2 C The value of s after the code executes a quot5quot would be quotabcquot A b Make a table to help see how the loop is running and to see the values for each variable The value of s after the code executes a quot5quot would be quotcbaquot C b Make a table to help see how the loop is running and to see the values for each variable What is the output when we printzlist a The answer is none of the above D b It should print quot34quot Which will sum the values of the second element of the nests lists a The answer is all of the above E Chapter 8 clicker Questions part 2 l I Why isn t it a good idea to include print andor input to computational functions a Answer it makes modular development more dif cult B 2 What value gets printed to the screen a Answer 4 A b Default value of x is 4 defined in the function c The return value would be 2 B What is the value of xlist after the code executes a Answer 2345 B assuming xlist somelist i With the code unchanged the answer would be D error b If we change a list within a function as the input perimeter the change stays 4 What is the value of xlist after the code executes a Answer none C b You would need to return a value i Xlist does not exist before we call the function in this code but it does in the previous question What is the value of xlist after the code executes a Answer 1 2 3 4 A b This kind of FOR loop for a list the change does not stick i At the end of the FOR loop the values revert ii No actual change occurred iii Adding return would not make the changes stick What is the value of somestr after the code executes a Answer quotbcdequot D b The 1 singles start 1 signals stop c Get values 14 i When it starts at 0 UL U39l 01 Chapter 8 Clicker Questions Which is NOT an advantage to using functions a Answer produce faster code e Value of X after the code has been executed a Answer 20 b b Will give you a oat number In the example below f s input does this always need to be the same a Answer No b b Can use any variable name that you want Value of X after the code has been executed a Answer None c b Function did not return anything just said return not return x or y c Would need to say return x to get 13 Return y would get you 10 What variables can f1 see a Answer abc b b Just because f2 calls f1 does not mean it can see f2 s variables How many variables boxes might be called quotaquot Answer 3 d 3 de nitions 3 boxes For f1 A 5 For f2 A 7 e For global A None because f2 did not have return within it If the user enters 4 what is the value of y a Answer 20 b anew


Buy Material

Are you sure you want to buy this material for

50 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Kyle Maynard Purdue

"When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the I made $280 on my first study guide!"

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.