Home / Challenges / Simple Calculator

Simple Calculator

Easy
Write a Python program that takes two numbers and an operator (+, -, *, /) from the user and performs the calculation.

Handle division by zero gracefully.

Input

Two numbers and an operator

Output

Result of the operation

Example

Input
10
3
+
Output
10 + 3 = 13
⚡ 10 XP on solve ← Back to lesson

Your Solution

Output
Click "Run" to execute your code...

Log in to submit your solution and earn XP.