×

Challenges

  1. Not started

Challenge 1.1

Check for odd/even numbers using “mod” operation

Challenge Level: Growing experience

Requirement:

Create a program which asks the user to enter a number and checks if the number is odd or even. Use the “mod” operation for this challenge.

Hints
  • To find out if a number is even or odd, use the “mod” operation to find the remainder after dividing that number by two. If the remainder is zero the number is even (the 'Mod' block under “Operators” returns the remainder from division of two numbers.
Programming Reminders

Output statements

Output a string directly
Blocks showing how to output a string
Output a variable
Blocks showing how to output a variable

Variables

Set a variable as a string
Blocks showing how to set a variable as a string
Set a variable as an integer
Blocks showing how to set a variable as an integer
Set a variable from a calculation
Blocks showing how to set a variable from a calculation
Set a variable from a user input (text)
Blocks showing how to set a variable from a user input (text)
Set a variable from a user input (number)
Blocks showing how to set a variable from a user input (number)
Add one to a value
Blocks showing how to add one to a value

Conditionals

Find out the discount on fruit
Blocks showing how to use conditional blocks

Loops

Output string 10 times
Blocks showing how to output a string
Output number until number reaches 10
Blocks showing how to output a string
Recommended Blocks
Number block
String block
Ask and wait for number block
Say block
Mod block
Equality block
Set variable to block
Custom variable block
If else block

Create your program in the editor below

Your submission results will be displayed here

Input Expected output Received output Status
265
You entered an odd number!

                
Not yet run ?
0
You entered an even number!

                
Not yet run ?
-22
You entered an even number!

                
Not yet run ?