[BUG] Unit-1 / Final Quiz - Don't change the value of page

I keep getting an error that says "Your submission was incorrect. Don't change the value of page."

I've not changed the value of page, and my code runs fine on a regular python interpreter.

# page = contents of a web page
page = '<div id="top_bin">    <div id="top_content" class="width960">       <div class="udacity float-left">            <a href="http://www.xkcd.com">'
end_url=page.find('"',start_url)
url = page[start_url:end_url]


how is that changing the value of page?

gubatron
156148

accept rate: 100%

1

I've updated the quiz to use a page variable without spaces. So paste in everything after start_link= and it should work.

(22 Feb '12, 17:11)

Try your solution now. I've updated the grading code. Sorry for the trouble!

PeterUdacity ♦♦
36.2k73220333

start_url = page.find('"', start_link)
end_url = page.find('"', start_url + 1)
url = page[start_url + 1:end_url]


This yields "Good job" on the bottom alert but "Try again" on top. I say give it a couple days and try again after they have time for some ironing out.

j

Jake Solomon
4824921

1

That was a fault on my end. Fixed now!

(22 Feb '12, 17:12)

one step method method

1linsanity
2.8k73041

This wont help next week when u need to fined all urls

(25 Feb '12, 18:55)

@Marek Kotewicz and @KarenT: While your code does produce the correct output, we wanted you to use the "find" command in this problem.

Also, some quizzes will expect you to print something and some will not. We realize that this is an easy thing to make a mistake with and we will try to always be as clear as possible (for example, the print command will usually be pre-populated in the code if we expect a print), but if you ever make a mistake you will be told so with an error message and you can easily make the necessary change.

AndyAtUdacity ♦♦
57.5k112260301

i tried and got the result ..it works ..

priya
3062515

I have experienced the same issue, hope they find a solution for this quickly

I can confirm that this quiz is working correctly. jsolomon, I tried your code and it worked for me, so they possibly have fixed it since you tried it last.

Eric Solomon
2.4k71325

Hello Peter

When I write code, it shows the correct output but when I submit, it wont accept
The error says : "Your submission was incorrect. You shouldn't print anything for the submission in this quiz."

Dinesh M-2
1.7k1126

ilikeudacity, you don't print anything in this quiz. I'm guessing you did what a lot of others, myself included, did at first as well and printed the url at the end. Remove your print statement and submit. =D

Jacob C. Ting
23018

It is working now.

Dinesh M-2
1.7k1126

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

×29,672
×3,801
×732
×207