# Homework 5.3: Note: it is okay if your procedure produces an error if the input hexamester is not included in courses.

 0 Why?? I showed my code throws an error if the input hexamester is not included in courses and my code was considered wrong!!! It's unfair!!! I removed the example "print is_offered(courses, 'cs003', 'dec2012')" at the end of my page and my exercise is correct!! I don't want complain of automatic corrections, but I'm a bit vexed!! My solution: def is_offered(courses, course, hexamester): clist = courses_offered(courses, hexamester) if course in clist: return True return False  asked 28 Mar '12, 04:15 shilaghae 21●6 accept rate: 50%

 0 Hi @shilaghae -- this is already being talked about in http://www.udacity-forums.com/cs101/questions/50042/hw-53-why-incorrect answered 28 Mar '12, 05:15 Clair Dunn 5.1k●17●56●97
 0 My code works exactly like yours and it was graded correctly. Judging from the other posts, I guess there was a bug in the grading script. My submission was: def is_offered(courses, course, hexamester): return course in courses_offered(courses, hexamester) answered 28 Mar '12, 05:31 shebaw 1.1k●3●11●25
 0 I know what is the problem, at the end of my page I'm used to writing some examples, as follow: print courses_offered(courses, 'apr2012') print is_offered(courses, 'cs101', 'apr2012') print is_offered(courses, 'cs003', 'apr2012') print is_offered(courses, 'cs003', 'dec2012')  The last one only to demonstrate that the code throws an error when it is runned, (how the Node required). Removing the last example and pushing "submit" again, my answer is considered correct!! For this reason I'm saying that the automatic correction is unfair!! link This answer is marked "community wiki". answered 28 Mar '12, 05:45 shilaghae 21●6
Question text:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

### Tags:

×15,283
×1,718
×24
×6
×2

Asked: 28 Mar '12, 04:15

Seen: 143 times

Last updated: 28 Mar '12, 05:45