It wont let me pass


#1






<?php
$items = 3;

    if($items > 5) {
      echo "You get a 10% discount!";
    }
    else {
      echo "You get 5% discount!";  
        }
   ?>
</p>


It says "Ooops try again. Did you set your else statement to echo or print 'You get a 5% discount!' ? Don't forget your semicolon at the end!


#2

It will be very helpful if we know what exercise this is. Please post a link. Thank you.

From what we can see in the error message, the answer is right there.


#3

excuse me, exercise no.3 Conditionals and Control flow


#4

Did you try changing the text to that in the error message?

I asked for a link because we do not have course pages on speed dial, and it helps us to know exactly the lesson you are on. In consideration of those helping you, include it in all future questions, please. You will find the process much faster, and easier for everyone.


#5

Here is exercise
" Instructions
Under your if statement on line 12, write an else statement to capture the people who are only buying 5 items or fewer. In their case, use echo to output "You get a 5% discount!"
"
and here is link
https://www.codecademy.com/courses/web-beginner-en-QF3Wb/0/3?curriculum_id=5124ef4c78d510dd89003eb8

So the answer is I didnt try to change text. I think I write it down just right? Dont you think so?


#6

Is this what your else statement echos? It must be exactly the same.


#7

I think it is the same


#8

You think? Please post your code again. Thank you.


#9






<?php
$items = 3;

    if($items > 5) {
      echo "You get a 10% discount!";
    }
    else {
      echo "You get 5% discount!";  
    }
   ?>
</p>



#10

Your text is not like the instructions provide (and the error message).


#11

Thank you, now I can see where is mistake.