Coursera – SaaS – How to Submit an Assignment

I’ve just started working on the assignment for the SAAS course, and I realized that people might have questions on how to submit a question since it’s not immediately obvious how to do so. Nor was it clear, how the question would be graded.

Step 1: Make one file for each part.

For my first submission, I didn’t realize that both Part 1: (a) & (b) should be in the same file. Here’s a template to get you started on Part 1:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def palindrome?(string)
  # your code here
end
 
def count_words(string)
  # your code here
end
 
puts palindrome?("A man, a plan, a canal -- Panama")  #=> true
print "  expect true\n"
puts palindrome?("Madam, I'm Adam!")  # => true
print "  expect true\n"
puts palindrome?("Abracadabra")  # => false (nil is also ok)
print "  expect false or nil\n"
puts count_words("A man, a plan, a canal -- Panama").inspect
# => {'a' => 3, 'man' => 1, 'canal' => 1, 'panama' => 1, 'plan' => 1}
print "  expect {'a' => 3, 'man' => 1, 'canal' => 1, 'panama' => 1, 'plan' => 1}\n"
puts count_words("Doo bee doo bee doo").inspect  # => {'doo' => 3, 'bee' => 2}
print "  expect {'doo' => 3, 'bee' => 2}\n"

Note: I’ve added the puts for help with debugging, you won’t need them in the file when you submit, though there is no harm in keeping them as they won’t affect the grading. Also, notice the .inspect, this will print a pretty format.

Step 2: Code the assignment

I generally work in vi, and just run ruby part1.rb from the command line to check that the program is running correctly. However, I have found codepad.org to be an invaluable tool. Codepad is an online compiler/interpreter. You can create your files in there, run the code to check that it works, and then just click the [raw code] link at the top when you’re done. This will download the code into a file which you can then use for submitting. Make sure you check the private box, otherwise your code will be visible to others in recent pastes.

Here are codepad.org links to get you started:

Step 3: Submit the assignment

Don’t be afraid to submit multiple times. Only the last submission will count towards your homework score.

  1. Follow the assignments link on the left nav.
  2. Click on the Submit button.
  3. Choose your completed file for Output Submission only!
  4. Wait. It can take a while for the homework to be processed, but when it’s done, the score will be available on the assignments page.
  5. Check on your score. If you didn’t get 100%, click on your score to see details.
  6. Repeat Steps 1-5 until you have 100% on all parts

Final Help

After you submit an assignment, you’ll see the grading criteria. However, since it’s not listed anywhere else, I’ve compiled all of them here:

Part1 = %"
#palindrome?
  recognizes palindromes correctly [25 points]
  recognizes non palindromes correctly [25 points]
 
#count_words
  counts the words properly [40 points]
  is not sensitive to case [10 points]
"
 
Part2 = %"
rps_game_winner
  should raise WrongNumberOfPlayersError if there are not exactly two players [1 point]
  should raise NoSuchStrategyError if there is some strategy that is not R, P, or S [4 points]
  should return the correct winner in a simple RPS game with a clear winner [15 points]
  should return the first player in the case of a tie [10 points]
 
rps_tournament_winner
  should still be able to handle the case where a tournament is just one game [10 points]
  should pass the example given in the homework of an 8-player tournament [5 points]
  should pass a basic test case of 8 players [15 points]
  should return the correct winner in the cases of 16 and 32-man tournaments [40 points]
"
 
Part3 = %"
anagrams
  should handle an empty array [2 points]
  should handle the most simple, single-character case with no repeats [2 points]
  should handle the most simple, single-character case with capital letters but no repeats [2 points]
  should handle a set with no repeated anagrams and words with distinct letters [10 points]
  should handle a set with no repeated anagrams, but words with similar letters [2 points]
  should handle non-anagrams that have all but one letters the same [2 points]
  should handle a complicated case of some repeated anagrams, but no duplicates [25 points]
  should handle a complicated case of some repeated anagrams, but no duplicates [25 points]
  should handle a simple case of some repeated single-character inputs [2 points]
  should handle a complicated case of some repeated anagrams, with duplicate inputs [7 points]
  should handle a complicated case of some repeated anagrams, with duplicate inputs [7 points]
  should treat single-character capital letters as equal [2 points]
  should handle repeated single-character inputs, and treat captial letters as anagrams, while preserving case in the output [2 points]
  should treat two identical words with different cases as the same, and preserve case in output [2 points]
  should treat many identical words with different cases as the same, and preserve case in output [8 points]
"
 
Part4 = %"
dessert
  should be able to set and get a dessert's name and calories [20 points]
  should return true if a dessert has fewer than 200 calories [10 points]
  should return true for any dessert [20 points]
 
jellybean
  should be a subclass of Dessert [10 points]
  should be able to set and get a jellybean's flavor [20 points]
  should return true unless the flavor is black licorice [20 points]
"
 
Part5 = %"
single attr_accessor_with_history
  should return nil as the first element [6 points]
  should record all past values of the variable, and be able to record for multiple instances [9 points]
  should record all past values of the variable, and be able to record for multiple variables [15 points]
 
multiple attr_accessor_with_history
  should return nil as the first element [14 points]
  should record all past values of the variable, and be able to record for multiple instances [21 points]
  should record all past values of the variable, and be able to record for multiple variables [35 points]
"
This entry was posted in Online Learning and tagged , , , . Bookmark the permalink.

One comment on “Coursera – SaaS – How to Submit an Assignment

  1. Pingback: Coursera – SaaS – Week Two & Three » Jacob Eggers

Leave a Reply

Your email address will not be published. Required fields are marked *

*

HTML tags are not allowed.