Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 816 Bytes

math_class_50.md

File metadata and controls

21 lines (11 loc) · 816 Bytes

Math Class (50)

Problem

Use the programming interface to complete this task. You'll be given a math expression, such as add 1 2 or subtract 5 3, where you will perform the operations 1+2 and 5-3, respectively.

ID: math-class

Input: An expression in the form of operation operand1 operand2, separated by spaces. Read input from math-class.in.

Output: The absolute value of the evaluated expression. Your output should always be a positive integer.

There are only 2 different possible operations, addition and subtraction, and all operands will be integer values between 1 and 1000. As always, remember to end your program with a newline.

Hint

Two very useful functions are int() and split(). Read about them in the documentation.

External Writeups

None yet!