Even/Odd Counters?

csd-unit-3
csd-unit-3-lesson-14

#1

Hey all,

I have a student who wants to use even/odd functions to write if/else statements and change the size of her sprite. Thoughts?


#2

I feel like the syntax is incorrect here.
Provided that isEven is a function that returns true if the parameter sent to it is even and false otherwise.
It should be something like

if (isEven(counter))
{
    profile.scale=.3;
}
else
{
    profile.scale=.38;
}

Check that out and report back.