Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
"""
Created on Thu Jun 8 21:46:30 2017
@author: ben
"""
import csv
from first_class import mean
import matplotlib.pyplot as plt
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 1 20:49:45 2017
@author: ben
"""
#import random
#
## write a guessing game
#
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 1 20:49:45 2017
@author: ben
"""
# take a list of numbers and find their average
numbers = [80, 90, 95, 78, 100, 0, 0, 0, 0, 0]
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 20 20:53:05 2017
@author: ben
"""
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 13 21:51:23 2017
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 13 21:51:23 2017
@author: ben
"""
import csv
import numpy
import matplotlib.pyplot as plt
# given a bunch of numbers, find their average
# 5, 15, 20, 0
True False
mybool = (10 < 5) or (5 == 2) or (1 < 2)
if mybool:
print 'your thing was true'
else:
print 'your thing was false'
nums = [90, 88, 76, 100, 98, 20]
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 14 22:35:34 2016
@author: ben
"""
#grades = {
# 'Ben': [90,85, 76],
# 'Bob': [98, 77, 75]
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 1 21:10:41 2016
@author: ben
"""
# goal: given some numbers, find their average
def find_average(numbers):
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 10 21:27:59 2016
@author: ben
"""
import csv
import numpy
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 3 20:51:32 2016
@author: ben
"""
# write a program that finds the average of some numbers
def my_avg(nums, arg2):
total = 0.0