Hackety Hacking the Computer Science Classroom Workspace: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
(+See also section/ +link to hacketyhack.net)
Line 62: Line 62:


== Completed Problems ==
== Completed Problems ==


== See also ==
*http://hacketyhack.net/


[[Category:Summer of Content]]
[[Category:Summer of Content]]

Revision as of 01:01, 30 September 2007

Overview

Problem resources

What is a problem?

Problem Statement

Your Problem Statement is a short piece of writing (one or two paragraphs) describing a challenge. It should include all of the information the reader will need to solve the problem.

A strong problem statement is like an unfinished story to be completed by the reader.

Sample Output

Provide an example of how the program will look to its user.

Curriculum Connections

Provide a list of content goals to help teachers locate your problem. Some of these content goals will be Computer Science related (e.g. "Understanding if-else logic") while others might be from other fields.

Solution

Provide at least one solution to the problem in running code. It's important that this solution is well-documented with in-line comments.

Note about solution platforms

Initially, we planned to focus exclusively on Hackety Hack. However, now that I have seen your wide range of experience, I think you should feel free to experiment with different platforms, depending on the problem. For example, a particular problem might be better solved with Python rather than Hackety Hack.

Learning to use the appropriate tool is a part of learning to program. To help your audience, please explain why you chose a particular platform with your solution code.

Later on, we might collect multiple solutions for each problem. For example, imagine solving the same problem in Java, Python, and Squeak.

Sample Problem

Problem Statement

Your DJ friend has an enormous collection of vinyl records. She knows the Beats per minute (BPM) of all the records at 45rpm but wants to know how these BPMs will change if she plays the records at 33rpm. She's figured out that the proportion of 45/33 is important but isn't sure how this will affect the BPMs. Can you write a program for this DJ so that she can easily figure out what the BPMs of her 45rpm records will be when she plays them at 33rpm?

Sample Output

Please enter the BPM at 45rpm and press ENTER: 120 The BPM for this record at 33rpm will be .

Curriculum Connections

Solution

# First, we ask the user for the bpm of the record on its normal speed
# and store this answer into a variable called bpm
bpm = input("Please enter the BPM at 45rpm and press ENTER: ")

# Next, we convert this bpm to the slower speed and store this answer in 
# a variable called slowbpm
slowbpm = bpm * (33.0 / 45.0)

# Finally, we print a friendly message to the user with the answer.
print("The BPM for this record at 33rpm will be approximately ", slowbpm, "bpm.")

Problems we're working on

Make links to incomplete problems here. Prefix your page names with Hackety_Hacking_Problem_ so that we can find them easily.

  • [Hackety_Hacking_Problem_Sample]

Completed Problems

See also