Author Archives: Luis Vargas

#Mastery22

#Mastery21

#Mastery20

#Mastery19

#WSQ16

Cars

Write a program that opens and reads the file 93cars.dat.txt and produces the following data:

  • average gas mileage in city (City MPG)
  • average gas mileage on highway (Highway MPG)
  • average midrange price of the vehicles in the set

https://github.com/VenkonProgram/wsq16/blob/master/cars.py

 

#WSQ15

Final Dash

I have 32 Points in Masterys and I need 40, so I am going to work in these 8 points that I need, I might do 4 videos or 8 writes I’m thinking through it, also I am going to do the WSQ, I miss 16 and 17.

It was a great semester.

#WSQ14

Estimating e

In this assignment you will estimate the mathematical constant e. You should create a function called calculuate_e which receives one parameter called precision that should specify the number of decimal points of accuracy.

https://github.com/VenkonProgram/wsq14/blob/master/estimatinge.py

#QUIZ11 #TC1014

#QUIZ10 #TC1014

Question 1:

def findthrees(list):
    sum=0
    for x in range(0,len(list)):
        if(list[x]%3==0):
            sum+=list[x]
    return(sum)

list=[0,4,2,6,9,8,3,12]

print(“The list is: “,list)

print(“The sum of the numbers of the list divisible by three is: “,findthrees(list))

Question 2:

def dotproduct(x,y):
    ab=[]
    for i in range(0,len(x)):
        ab.append(x[i]*y[i])
    return sum(ab)

v1=[2,4,5,6]
v2=[1,2,3,4]

total=dotproduct(v1,v2)

print (“The dot product of this two vector is: “,total)

#ECOS #TC1014