Question: If statements: The code in the file generates a random integer between 1 and 100 . Write an if statement to determine if this number

If statements: The code in the file generates a random integer between 1 and 100 . Write an if statement to determine if this number is even. If it is even use disp to say so ("The number 4 is even."), and if not, say that the number is odd. Hint: The function mod is the key to writing this if statement. Having remainder 0 when divided by 2 means that a number is even. You'll want to use something like the previous part to include the random number that was generated in your sentence.

If statements: The code in the file generates a random integer between

3. If statements: The code in the file generates a random integer between 1 and 100 . Write an if statement to determine if this number is even. If it is even use disp to say so ("The number 4 is even."), and if not, say that the number is odd. Hint: The function mod is the key to writing this if statement. Having remainder 0 when divided by 2 means that a number is even. You'll want to use something like the previous part to include the random number that was generated in your sentence

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!