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

IT 210

by: Ahmed Notetaker
Ahmed Notetaker
Minnesota State University, Mankato
GPA 3.1

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

Firday week 2
Fundamentals of Programming
Salivia, Guarionex
Class Notes
information technology
25 ?




Popular in Fundamentals of Programming

Popular in Information technology

This 1 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 6 views. For similar materials see Fundamentals of Programming in Information technology at Minnesota State University - Mankato.

Similar to 210 at Minnesota State University, Mankato

Popular in Information technology


Reviews for IT 210


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: 09/22/16
WEEK 2 (FIRDAY) IT 210   #Monte Carlo simulation to approximate pi import random def monteCarloPi(numDarts):     hits = 0     for i in range(numDarts):  # repeat as many times as there are darts         #Simulate a dart         x = 2*random.random() ­ 1  # this guarantees the x coordinate is between ­1  and 1         y = 2*random.random() ­ 1         if x**2 + y**2 <= 1:  # syntax is ­­> if condition: where the condition is a  boolean value             hits += 1     pie = 4 * hits / numDarts     return pie # pieAccumulator = 0  # do not change it # numberOfExperiments = 10000 # numberOfDarts = 1000 # # for i in range(numberOfExperiments): #     pieAccumulator += monteCarloPi(numberOfDarts) # # pieAverage = pieAccumulator / numberOfExperiments # print(pieAverage) #If­elif­else example def grader(grade):     if grade >= 90 and grade <= 100:         print("A")     elif grade >= 80 and grade < 90:         print("B")     elif grade >= 70 and grade < 80:         print("C")     elif grade >= 60 and grade < 70:         print("D")     elif grade < 60 and grade >= 0:         print("F")     else:         print("The number you entered is not a valid grade.") grade = float(input("Please enter grade as number between 0­100: ")) grader(grade)


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

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

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.