×

### Let's log you in.

or

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

×

### Create a StudySoup account

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

or

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

Already have a StudySoup account? Login here

## IT 210

by: Ahmed Notetaker

10

0

3

# IT 210 210

Ahmed Notetaker
Minnesota State University, Mankato
GPA 3.1

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

×
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

week 4 of it 210
COURSE
Fundamentals of Programming
PROF.
Salivia, Guarionex
TYPE
Class Notes
PAGES
3
WORDS
CONCEPTS
information technology
KARMA
25 ?

## Popular in Information technology

This 3 page Class Notes was uploaded by Ahmed Notetaker on Thursday September 22, 2016. The Class Notes belongs to 210 at Minnesota State University - Mankato taught by Salivia, Guarionex in Fall 2016. Since its upload, it has received 10 views. For similar materials see Fundamentals of Programming in Information technology at Minnesota State University - Mankato.

×

## Reviews for IT 210

×

×

### What is Karma?

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

Date Created: 09/22/16
WEEK 4 (FRIDAY) IT 210 from math import * #Fibonacci sequence def fibonacci(n:int):     #Assuming n is at least 3     fib1 = 1     fib2 = 1     fibN = 0     for i in range(2, n):         fibN = fib1 + fib2         fib1 = fib2         fib2 = fibN     return fibN x = fibonacci(10) #print(x) #for 6 terms #range(1, 12, 4) => {1, 5, 9} #range(3, 12, 4) => {3, 7, 11} #Leibniz approximation of Pi def leibnizPi(numTerms):     front = 0     end = 0     for i in range(1, 2* numTerms, 4):         front += 4/i     for i in range(3, 2* numTerms, 4):         end += 4/i     pie = front ­ end     return pie def archimedesPi(n:int):     angle = radians(360 / (2*n))     pie = n * sin(angle)     return pie # n = 10000 # print("Archimedes  |  Leibniz") # print("______________________") # for i in range(1, n): #     archPi = abs(pi ­ archimedesPi(i)) #     leibPi = abs(pi ­ leibnizPi(i)) #     print("{0:.2e}     |  {1:.2e}".format(archPi, leibPi)) # #List ­ introduction myList = [1,2,3,5,6] #print(type(myList)) #print(myList) myList2 = [i for i in range(1,6)] print(myList2) myList3 = [i**2 for i in range(1,6)] print(myList3) myList4 = [(i­1)**2 for i in range(1, 10, 3)] print(myList4) # n = 6 # evens = [i for i in range(2, 2*(n+1),2)] # firstOdds = [i for i in range(1, 2*n, 2)] # secondOdds = [i for i in range(3, 2*(n+1), 2)] # # print(evens) # print(firstOdds) # print(secondOdds) #myList = [7, 5, 10, 4] def listMult(aList):     mult = 1     for i in aList:         mult *= i     return mult #print(listMult(myList)) import time start = 0 end = 0 def wallisPi(numTerms):     global start     global end     start = time.time()     evens = listMult([i for i in range(2, 2 * (numTerms + 1), 2)])     firstOdds = listMult([i for i in range(1, 2 * numTerms, 2)])     secondOdds = listMult([i for i in range(3, 2 * (numTerms + 1), 2)])     pie = 2* (evens / firstOdds) * (evens /secondOdds)     end = time.time()     return pie #n = 10000 #for i in range(1, n): #    pie = wallisPi(i) #    #print(pie) #print(end ­ start) print("Different process")

×

×

×

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

Amaris Trozzo George Washington University

#### "I made \$350 in just two days after posting my first study guide."

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

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

#### STUDYSOUP CANCELLATION 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 support@studysoup.com

#### STUDYSOUP REFUND POLICY

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: support@studysoup.com

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 support@studysoup.com

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.