post here funny pictures

  • Thread starter Thread starter T-hug
  • Start date Start date
  • Views Views 3,410,096
  • Replies Replies 55,234
  • Likes Likes 16
When the husband is asked to prepare the snacks for the babyshower:

View attachment 427478
Ralph.JPG
 
  • Haha
Reactions: impeeza
And the new entry I put

if ($Score <= 84) then
That would be the correct solution that wouldn't output "FAILPASS".
Or even just "$Score < 85".
And using "else if" would be best.
But if you use ">= 85" for one, and "<=85" for the other, both statements are true when the score is exactly 85 and you get "PASSFAIL", that's what I was getting at.
 
  • Like
Reactions: AncientBoi
That would be the correct solution that wouldn't output "FAILPASS".
Or even just "$Score < 85".
And using "else if" would be best.
But if you use ">= 85" for one, and "<=85" for the other, both statements are true when the score is exactly 85 and you get "PASSFAIL", that's what I was getting at.

:O Wait a minute... I'm not a programmer. :ohnoes: lol

But I do know some of the basics :D
 
  • Haha
Reactions: impeeza
It's something teachers try to drill into students, avoiding the common and obvious edge cases.
When kids first encounter this type of problem, the most common error is to write a case for "X<N" and one for "X>N" and not have a case for "X=N" and the teacher uses that example to tell you to always always always use ">=" or "<=" when working with such comparisons so every eventuality is covered.
 
It's something teachers try to drill into students, avoiding the common and obvious edge cases.
When kids first encounter this type of problem, the most common error is to write a case for "X<N" and one for "X>N" and not have a case for "X=N" and the teacher uses that example to tell you to always always always use ">=" or "<=" when working with such comparisons so every eventuality is covered.

Yea, I do remember something like that in class. [Lotus]
 
  • Haha
Reactions: impeeza
Last edited by CoolMe,

Site & Scene News

Popular threads in this forum

God