Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge: Number Analyzer #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jaycvilla
Copy link
Owner

Play with the number
Our goal for this challenge is to write a number analyzer program that: displays the number assigned to theNumber, and draws a rectangular outline to show whether theNumber is positive, negative or zero.

Remember that:

  • Positive numbers are numbers that are larger than zero
  • Negative numbers are numbers that are smaller than zero
  • Zero isn't positive and it also isn't negative. The only number that is zero is zero.

Right now, the outline is drawn around ''It's positive'' to show that 100 is positive (because 100 is larger than zero), but our program is not very smart yet. If we change the number, assigned to theNumber, to a number that is not positive, then ''It's positive'' will still be outlined (even though it won't be true anymore), but the correct text (''It's negative'' or ''It's zero'') will not be outlined.

Read through the code now, and then change the number assigned to theNumber to prove that it's not very smart (yet!)

Play with the number
Our goal for this challenge is to write a number analyzer program that: displays the number assigned to theNumber, and draws a rectangular outline to show whether theNumber is positive, negative or zero.

Remember that:
- Positive numbers are numbers that are larger than zero
- Negative numbers are numbers that are smaller than zero
- Zero isn't positive and it also isn't negative. The only number that is zero is zero.

Right now, the outline is drawn around ''It's positive'' to show that 100 is positive (because 100 is larger than zero), but our program is not very smart yet. If we change the number, assigned to theNumber, to a number that is not positive, then ''It's positive'' will still be outlined (even though it won't be true anymore), but the correct text (''It's negative'' or ''It's zero'') will not be outlined.

Read through the code now, and then change the number assigned to theNumber to prove that it's not very smart (yet!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant