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

Intro to Computer Science: Week One

by: Katie DeRose

Intro to Computer Science: Week One CS:1110:0AAA

Marketplace > University of Iowa > CS:1110:0AAA > Intro to Computer Science Week One
Katie DeRose
GPA 3.4
Introduction to Computer Science
Denise Szecsei

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

These are the first Week's Lecture notes for Intro to Computer Science! Anything colored means she was typing in Python and those colors appeared. Everything Italicized are things written in...
Introduction to Computer Science
Denise Szecsei
Class Notes
Intro to Computer Science; Computer Science
25 ?




Popular in Introduction to Computer Science

Popular in Department

This 5 page Class Notes was uploaded by Katie DeRose on Tuesday February 3, 2015. The Class Notes belongs to CS:1110:0AAA at University of Iowa taught by Denise Szecsei in Spring2015. Since its upload, it has received 352 views.

Similar to CS:1110:0AAA at UI


Reviews for Intro to Computer Science: Week One


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: 02/03/15
I Introduction 1202015 A Python 3something 1 Install Python rst B Wing 101 free version environment we are using to write code 1 Wing is the environment C Python commands in Python Shell 1 can use it as a calculator a quotdoes not exponentiate in Python b exponentiates c example 5225 1 integer division in version 3 but it is a different answer in different versions of Python and different computer languages 2 must do 522 3 521 d if there is an in nite loop you can restart the command shell in the options button 2 Error in the shell a Python says the reason for the error in the last line of the error message b you can de ne something in the shell 1 example hello is a variable 4 is its assignment 2 he04 then type hello and python will tell you the answer is 4 3 if you restart python or restart the shell it will not remember what you de ned 3 ask python what is the datatype 1 type ie o a will respond that it is a ltclass oat gt 2 if you say he0 3 he0 4 a it will say it is a ltclass st gt for class string b Can add oats together can add a oat with an integer 1 changes its datatype to whatever works c Can add strings and strings but not strings and integers d if something has quotes it is a string e if no strings it is a variable f example yjbbje hello yang world yjbbje yang h ello world example in t 4 1 0 14 4 str1 0 41 0 D Top left screen 1 Where to write code a write word for function wing turns blue means not a good variable name def i then write function de nition wing turns green t1yth1 sa 19 ii need colon at end of de nition don t mess with the indentation indent is good no indent means you forgot the colon at the end of the de nition 1391 139 return a 19 iv means comments Python knows to ignore after 1 write comments before code in future work v pressing green arrow at top 1 sends the function to the shell 2 in the shell you can quotcall the function try15111563 6 9 trythisquothello 4 an t add integer and a string try151219 quoth ello 4 h elloh elloh elloh ello II Lecture 1222015 A Outlines are useful for Python a lists i in shell you can make a list X 1 2 3 4 WpeCX it will return ltclass ljst gt y 45 75 95 it will return y 45 75 95 y1 it will return45 1 adding lists X123 z45 6 xz it will return 1234 5 6 2 can append lists a object oriented programming b Xappendz i type X in shell 123 4 5 6 3 can nd length of lists IenX it will return 4 b quirks in python i variable changing x3 yX y it will answer 3 1 change to x7 Y it will still answer 3 ii midterm question 1 lists are mutable 2 integers oats and strings are not mutable in python at least 3 why a variable for integers have own memory for X and y even if one is a copy of the other b but if one list variableX is supposed to memorize rst list they use same memory as X for y not a copy c functions and lists i nd maximum python will not know aList is a list that is for you to recognize when you are reading it def ndMaXaL139st return a 19 Some people would want to do aList425348 bad idea because it is hardcoded instead trust that when function is called you can give it a list that you are working with set the maXValue to be the initial value in the list maXValue aLjst0 go through the list and compare each value in the list to the maXValue for element in aLJ39st if a value in th elist is larger than maXValue if element gt maXValue maXValue element set maXValue equal to this larger thing in the list otherwise do nothing once you have gone through the entire list return maXValue return maXValue 2 press play in shell and see if it works a check for errors and don t let it crash i befor e turning in check green arrow for errors b give it a list ndMaX4 62 3 9 3 2 9 f Next try glmmeN 12 125 print 12345 def gimmeNn n should represent a positive integer n5algorithm is going to start with 1 go to 2 and so on until it reaches n n5 start1 while start lt 12 less than or equal to prjn ts tart start start1 press play to send it to the shell in the shell type glmmeN4 it will respond 1234 C on quiz she will give us a function that doesnt work and we x it


Buy Material

Are you sure you want to buy this material for

25 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

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

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."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

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.