22c:005 Fall 2015
Programming Practice 2
In this assignment, you will be writing several short Python functions; but first, lets discuss some sample python
programs that are similar in nature those I will be aski
#22c:005
#September 5, 2012
#Homework 3
#homework problem 1
import random
#this function generates a random number between 1 and 10 (inclusive) and asks the user to
guess the number
def playGame2():
number = random.randint(1,10)
guess = input("I'm thinkin
#22c:005
#September 12, 2012
#Homework 4
#sample program 1
#this program asks the user for input from the keyboard and returns what they typed
def typeSomething():
#asks the user for input
choice = input("Enter an integer: ")
#if the integer is positive,
Mock Outline for Presentation Option 1: Major
1. Introduction
a. My name is Mitchell Suiter and Im from Davenport, Iowa. Im a freshman here at UofI
b. I took this course because I wasnt sure if I had chosen the right major and wanted to
explore other opti
#Mitchell Suiter
#discussion week 9
#11/7/2016
def getHawkIDs():
return ["mjsuiter"]
#Practice problem 1
#write a function that takes, as an argument, a list of positive integers and a
target value, and return the number of times that the target value app
#Mitchell Suiter
#Discussion section programs
#Monday Section September 26, 2016
def getCharacters(myString):
#iterate through the string
for char in myString:
#print each character in myString
print(char)
#print myString in all uppercase letters
print(my
#Mitchell Suiter, cs:1110 introduction to computer science
#Computer Science Discussion
#10/3/2016
#Sample program
def getElements(myList):
#iterate through the list
for element in myList:
#print each character in myList
print(element)
#try to determine i
#Mitchell Suiter
#Discussion week 8
#10/31/16
#Practice problem 1
def getHawkIDs():
return ["mjsuiter"]
#Practice problem 2
#Wrire a function that takes, as an arguement, a 12-digit positive integer n or
a string consisting of 12 digits, and calculates th
def problem1(length,width):
x=length*width
return "The area of the rectangle is "+str(x)+" sqaure inches."
def problem2(aList):
bList=[]
if (len(aList)%2=0):
return sum(aList)
else:
for element in range(0,len(aList):
bList.append(len(aList)
return bList
d
#Mitchell Suiter
#Discussion section programs
#10/10/2016
def getHawkIDs():
return ["mjsuiter"]
#Practice problem 1
#Write a function that takes, as an arguement, a positive integer n and returns
the sum of the first n perfect sqaures.
def problem1(n):
su
Instructor: Ashley Wells
Spring 2016
Rhetoric 10:30
Introductory Writing
Assignment
Purpose: To effectively guide the class and your learning, I need to be
familiar with your writing. Not only will this assignment familiarize me with
your writing skills,
#Jintao He
#Introduction to computer science
#Practcie set #9
#Practice peoblem#1
#write a func, takes a list and a int n, that values the times of a number show
up in the list
def problem1(mylist,target):
counter = 0
for i in mylist:
if (i=target):
count
#Jintao He 22c:005 Introduction to Computer Sceience
#Practice sheet #2
#Simply Program from practice sheet 2
import random
#import Random, the fucntion is going to have random fucntion
def randomNumbers(n): #def randomNumbers(n), the name of the function
#wirte the func to indicates the user they are entering the scoial # or FEIN,
then prompts the user to enter that number is in a specific format and then
verifies that the number is vaild and returns a string indicating whwather the
number is valid
#helpe
#Jintao He
#Introduction to Computer Science
#August.31th,2015
#Python Practice Assignment#1
def exponentiate(value1,value2):
return value1*value2
#Problem 1: this functions takes, as aruguments,two numbers, a and b, and
returns the difference between a a
Syllabus
Fall 2016
The University of Iowa
The College of Liberal Arts and Sciences
Department of Mathematics
MATH: 1005:0331 College Algebra
MWF 3:30 4:20 PM in 117 MLH and
Th: 5:00 5:50 PM in 51 SH
Website address: www.aleks.com
Course code:
Video Quiz 11 (complex numbers).pdf
Made with Doceri
Page 1 of 7
Video Quiz 11 (complex numbers).pdf
Made with Doceri
Page 2 of 7
Video Quiz 11 (complex numbers).pdf
Made with Doceri
Page 3 of 7
Video Quiz 11 (complex numbers).pdf
Made with Doceri
Page 4
Video Quiz 10 (polar and rectangular equations).pdf
Made with Doceri
Page 1 of 6
Video Quiz 10 (polar and rectangular equations).pdf
Made with Doceri
Page 2 of 6
Video Quiz 10 (polar and rectangular equations).pdf
Made with Doceri
Page 3 of 6
Video Quiz 1
#Mitchell Suiter
#Discussion section week 3 programs
#setpember 12th
def getHawkIDs():
return["mjsuiter"]
#Problem 1
#this algorithm takes, as arguments, 2 inputs for length and width and returns
the product of the two inputs within a sentence describing
#8/30
#write a function that takes, as an argument a natural number greater than 1,
and
#returns its status as either prime or composite
#name your function amIPrime(n
#iterate through the values 2,3,. n-1. Check to see if the remainder of the
#division o
22c:005 Fall 2012
Homework 1
Welcome to the first 22c:005 assignment. In this assignment, we will go over what you need to
know to get up and running on the Computer Science departments computers, also known as the
DIVMS machines (for Division of Mathemat
#Diane Pham
#22c:005
#Homework 9
#Thursday, October 25, 2012
#Problem 1
#this OAM program takes, as input, 4 values: a midterm score, a homework
score, a quiz score, and an in-class score, and prints the weighted average
based on the formula provided
G= 2
#22c:005
#November 1, 2012
#Homework 10
#sample program 1
#this program takes, as input, a positive integer, n, and creates a file
#containing n random integers between 1 and 1000
import random
def createFile(n):
fileName = "myFile.txt"
#open the file for
#22c:005
#Homework Assignment 7
#October 1, 2012
#mac 2.6.1
#homework problem 1
#this function takes, as input, a list of numbers and returns the list with the following changes:
#if the original value in the list is positive, the value is doubled
#if the
#22c:005:A01
#August 30, 2012
#Homework 2
#hwk problem 1
#this function takes, as input, an integer, n, creates a list of n random integers, and returns the
maximum number of the list
import random
def randomNumbers2(number):
#create an empty list
myList
#22c:005
#September 23, 2012
#Homework Assignment 6
#done on a Mac - python v3.2
#sample program 1
#this function takes, as input, a list of numbers and returns a list of the
#indices in the original list that contain negative values
def scrollList(myList
The University of Iowa
The College of Liberal Arts and Sciences
Department of Computer Science
Introduction to Computer Science
CS:1110:0AAA
Fall Semester, 2016
8:00 9:15 MW 101 BBE
Some of the policies relating to this course (such as the drop d
#class 8/29
#lists are mutable, change contents of list will change values of x and y
#write a function that takes as an argument, a list of numbers and returns
#the maximum value in the list
#always outline first, makes it easier and faster to learn
#cal