replit

Before you start this course, you must login to Replit

If you have forgotten your Replit account user name or password, ask your Coder Coach.

Make Task

What’s a ‘Make’ Task?

In these tasks you have to use the skills learned in the previous exercises to create a new program based on the requirements below.

Task Instructions

  • Define four subroutines – add, subtract, multiply, divide that add multiply etc two numbers and return the result. Each should have two integer number arguments.
  • The user is asked to input two numbers. These numbers will be passed as arguments into one of the subroutines.
  • The user is asked to input 1 to add, 2 to subtract etc.
  • If they input 1, call the ‘add’ subroutine, input 2 calls the ‘subtract’ subroutine etc
  • Output the returned result as part of a sentence.

Help! My code doesn’t work

Make sure that you check for the following things:

  • The subroutine name is identical everywhere it is used (capitals matter)
  • The subroutine call is not indented inside the subroutine
  • The subroutine is defined before it has been called

Hints