Most Recent Homeworks:
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 9, HW 1
# Problem Set 5: 6.00 Word Game
# Name: smiller148
# Collaborators: Not even one curiousreef look this time.
#
import random
import string
VOWELS = 'aeiou'
CONSONANTS = 'bcdfghjklmnpqrstvwxyz'
HAND_SIZE = 7
SCRABBLE_LETTER_VALUES = {
'a': 1, 'b': 3, 'c': 3, 'd': 2, 'e': 1, 'f': 4 ...
smiller1481 day ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 3, HW 1
# Problem 1
# 2 6 piece 2 9 piece 1 20 piece for 50 total pieces
# 1 6 piece 5 9 piece for 51 total pieces
# 2 6 piece 2 20 piece for 52 total pieces
# 1 6 piece 3 9 ...
cranduit6 days ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 2, HW 1
# Problem 1a
def primes(max_value, final_index):
index = 1
last_prime = 0
prime_list = [2]
for num in range(3, max_value, 2):
prime = True
for i in range(2, int(num ** 0.5) + 1):
if num % i == 0:
prime = False
break
if prime ...
cranduit6 days ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 1, HW 1
# Problem Set 0
# Name: cranduit
last_name = raw_input("Enter your last name:")
first_name = raw_input("Enter your first name:")
print first_name, last_name
cranduit6 days ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 8, HW 1
1.1: False; 1.2: False; 1.3: False; 1.4: False; 1.5: False; 1.6: True; 1.7 ...
#6.
def findSide():
"""Asks user to enter the area of a rectangle and the length of one side of the rectangle. Returns a floating point number that is the length of the adjacent side."""
rectangleArea=raw_input("Enter the area of ...
smiller1481 week ago |
0 comments |
Leave a comment
Learning Vim from the inside Lesson 3, HW 2
I am using Fedora. No gnu idutils packaged as known. While I did this by using sublime text's multiple ...
lsqshr1 week ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 5, HW 1
This set looks harder than it is. You are only writing short little code pieces-the hardest work is already done ...
# Problem Set 3
# smiller148
# Problem 1a. Designing functions to iteratively and recursively count the number
# of instances of the key in a target string.
from string import *
def countSubStringMatch(target,key):
"""Returns the number of instances in the target that ...
smiller1482 weeks ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 7, HW 1
# Problem Set 4
# Name: smiller148
# Collaborators: eventually, curiousreef submissions for #1.
# Time: a few days, including the debugging period
#
# Problem 1
#
def nestEggFixed(salary, save, growthRate, years):
"""
- salary: the amount of money you make each year.
- save: the percent of ...
smiller1482 weeks ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 3, HW 1
# Problem Set: 2.1
#Task: How to may a given number of McNuggets
#Name: Paulina Kieliba
#Time: 0:10
import numpy as np
from math import *
packages = (6,9,20) # variable that contains package sizes
for desiredAmount in range (50 ...
Cintre3 weeks ago |
0 comments |
Leave a comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 3, HW 1
Problem 1: Combinations of 6, 9, and 20 that = 50...55.
50 6x5, 20x1
51 9x5, 6x1
52 6x2, 20x2 ...
# smiller148
# PS2, Problem 3
# Program that finds largest number of McNuggets that cannot be bought in exact quantity
# given package sizes of 6, 9, and 20.
counter=0
for n in range(0,50):
solution=False
if counter==6:
break ...
smiller1483 weeks ago |
0 comments |
Leave a comment
|
Most Recent Homework Comments:
Learning Vim from the inside Lesson 3, HW 4
will it print the current system date time in the terminal before the user type 'enter', then it goes in the editor window because on start up, VIMINIT variable is ...
lsqshr1 week ago on live_dont_exist's homework |
Link to full comment
MIT OpenCourseWare 6.00 Introduction to Computer Science and Programming Lesson 3, HW 1
I'm a fan of this-it was written with a similar enough approach to the one I took that it really helped me fix a bug in my own code. Thanks!
smiller1484 weeks ago on carmichael22's homework |
Link to full comment
Test Lesson 2, HW 1
comment
testqa4 months ago on testqa's homework |
Link to full comment
Learning Vim from the inside Lesson 2, HW 1
I am pretty new to id-utils. thought i would make more sense to have extra information.
vivekB4 months ago on vivekB's homework |
Link to full comment
Learning Vim from the inside Lesson 1, HW 3
Rocking! Don't slow down. You've got some momentum!
pbr5 months ago on atul4mlko's homework |
Link to full comment
Learning Vim from the inside Lesson 1, HW 2
awesome!
pbr5 months ago on atul4mlko's homework |
Link to full comment
Learning Vim from the inside Lesson 2, HW 2
Rockin! Now you're ready to dive into the code!
pbr7 months ago on vivekB's homework |
Link to full comment
Learning Vim from the inside Lesson 2, HW 1
...as I mentioned, both approaches work... why did you choose this one? :-)
pbr7 months ago on vivekB's homework |
Link to full comment
Learning Vim from the inside Lesson 1, HW 3
:-) awesome! Keep on going - let me know if you run into any challenges. -Paul
pbr7 months ago on vivekB's homework |
Link to full comment
Learning Vim from the inside Lesson 3, HW 2
Rockin! Keep on going - the fun starts in a few lessons!
pbr7 months ago on ravitkhurana's homework |
Link to full comment
|