dmoyer2


Joined 1 year ago
Homeworks submitted:
Homework comments:
3
0

About Me

No description provided.

Classes

MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming

Class status: Established
Role: Student
. 17% complete

Submitted Assignments

MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming: Lesson 3, HW 1
# Problem Set 2  (Lesson 2, assignment 1)

import math

a=0
b=0
c=0
n=50


for n in range (50,56):
    for a in range (0, n/6 +1):
        for b in range (0,n/9 + 1):
            for c in range (0, n/20 +1):
                if (((6*a) + (9*b) + (20*c)) == n):
                    print 'ok a,b,c ' , a,b,c
            c=+1
        b=+1
    a=+1
n=+1

dmoyer2 1 year ago
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming: Lesson 2, HW 1

Problem Set 1 (Lesson 2, assignment 1)

import math

prime = 3 count = 1 divisor = 2

while count<1000: while divisor<prime: if prime%divisor == 0: divisor=prime+1 else: divisor += 1 if divisor == prime: count += 1 prime += 1 divisor=2

print 'Your 1000th prime is: ',prime-1


dmoyer2 1 year ago
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming: Lesson 1, HW 1

Problem Set 0 (Lesson 1, assignment 1)

Name: dmoyer2

Time: 0:10

firstName = raw_input('Please enter your First name: ')
lastName = raw_input('Please enter your Last name: ')
print firstName
print lastName

dmoyer2 1 year ago