This forum is now read-only. Please use our new forums! Go to forums
6/6 Seems to have some sort of bug
Looking at all the questions, it’s pretty apparent that 6/6 is broken somehow. It’s looking for unreasonable parameters or something because I’ve looked through the questions and a lot of people have had the issue.
I’ve had similar issues with the JavaScript tutorial where proper code didn’t go through and I had to go to the forums for an exact copy and paste job to get to the next step. I think it has something to do with how the browser is handling the code as you type, because it’s happened where I refresh and paste whatever I just did and it works all of a sudden. I’ve also managed to have old code still run after I’ve deleted it.
Just something to look at. After browsing for an answer, this works:
$i=3 switch($i): case 1: case 2: case 3: echo "i is between 1 and 3"; break;break;break; default:break; endswitch;
I got it from this answer.
Answer 5531649076b8fe9bbc00013d
While I applaud codeacademy.com for providing such a great (and free) resource for learning programming, I will say that it is frustrating when you write perfectly valid code and the editor does not approve it and allow you to continue. I provided the following switch statement for this exercise which is 100% valid (and validates and functions in other PHP testing sites, like PHPTESTER.net) but does not here for whatever reason:
<?php
$dog = "doggie";
switch($dog) {
case "Woodle":
echo "That's a woodle!";
break;
case "Lab":
echo "That's a lab!";
break;
case "German Shepard":
echo "That's a German Shepard!";
break;
default:
echo "You need to give me a dog I know!";
}
?>
Answer 5527ed4286f5526f01000255
Hi Dania,
It’s looking for unreasonable parameters
Not at all. The instructions for 6/6 are very clear and easy to follow if you’ve been paying attention.
it’s happened where I refresh and paste whatever I just did and it works all of a sudden.
You probably just needed to wait a few seconds for the code to update before refreshing, but yes, that’s a common procedure for debugging a problem.
After browsing for an answer, this works:
$i=3 switch($i): case 1: case 2: case 3: echo "i is between 1 and 3"; break;break;break; default:break; endswitch;
That code is terrible. It doesn’t pass for me, and the only reason it passes for you is because it’s so terrible you broke the SCT (Submission Correctness Test; code checker).
It’s pretty easy to write a valid switch
statement that will pass you and not throw a PHP error. If you don’t remember how, look at step 2/6 :)
Answer 55196f5c9113cbca80006419
Hi Dania,
There are a lot of problems with this course and people have been raising them for a long time. For some reason it looks like the editor doesn’t always update its memory to the most recent code you’ve entered.
If you could post a copy of your code for it before you used the answer above someone might be able to see if it was an error with the code or the editor (probably the editor but you never know).
Tim
Answer 553ee6d8d3292fd48b000024
5 comments
GO CLG! GO CLG!
CLG > TSM
TSM WildTurtle > CLG DoubleLift
thats why im on 30 points
Thats why CLG came 5th, and TSM cant 1st ;)
Answer 553ee97695e37848d6000005
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
4 comments
Refresh the page && try again :)
Thanks, Zeke. I tried that several times and it still didn’t work. What’s strange is that I am not getting an error, but the blue ‘submit’ button is just showing the white “gear” icon after clicking. The result pane on the right is actually showing the correct output of the script, so I’m really puzzled…
Are you getting any connection errors?
Well, I closed my browser and re-logged in and re-copied the same switch statement above and it worked this time. Go figure… Thanks for trying to help, Zeke.