Programming 11/12: VB Assignment 1 – Odd or Even

For this assignment, you will create a Visual Basic application that reports whether an input is odd, even or neither:

  • odd: a number when divided by 2 that yields a remainder of -1 or 1.
  • even: a number when divided by 2 that yields a remainder of 0.
  • neither: a non-numeric input (such as ‘zero’) or a number when divided by 2 that yields a remainder other than -1, 0, 1.

The output should be reported using a MsgBox function. Click here to download the sample program.


  1. Create a new Windows Forms Application project and design a user-friendly interface, similar to–but not the same as–the one below.oddOrEven
  2. Remember to change the (Name) property of the form, labels, textboxes and buttons to an intuitive descriptor. For example, the name and text of Button1 should be changed to EvaluateButton and Evaluate, respectively.
  3. Re-read the scenario and conditions above. Think and plan before starting to code (i.e. write the pseudo-code).
  4. Code, test and debug. Use comments and create appropriately named variables to increase the readability of your code.
  5. Make sure all the conditions are met using the Evaluation rubric below as a checklist.
  6. When complete, package and submit the program.
    1. Build the project (Debug → Build Project). Do NOT build the project since student accounts do not have full privileges to successfully build the application.
    2. Zip the entire folder along with its files and subfolders.
    3. Rename the zip file as
    4. Upload to the teacher via Google Drive.

Evaluation: 10 marks

  • Objects are properly named. (2 marks)
  • Program satisfies the four test cases. (8 marks)
    1. odd: any odd number including negative (e.g. -5, 11, 123).
    2. even: any even number including zero and negative (e.g. -12, 0, 4).
    3. neither: any decimal numbers (e.g. 0.1, 1.2).
    4. neither: any non-numeric input (e.g. ‘zero’, ‘apple’)
  • Extremely large numbers (e.g. 1 trillion) will not be tested.