Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
challenge 1 | test challenge
test daily challenge
course content

Course Content

test daily challenge

test daily challenge

book
challenge 1

Task
test

Swipe to show code editor

Implement a basic calculator that can evaluate a mathematical expression provided as a string input. The calculator should support the following operations: addition (+), subtraction (-), multiplication (*), division (/), and parentheses for grouping. The calculator should handle operator precedence correctly and be able to process expressions that include whitespace.

Examples

Input:

Output

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 1
toggle bottom row

book
challenge 1

Task
test

Swipe to show code editor

Implement a basic calculator that can evaluate a mathematical expression provided as a string input. The calculator should support the following operations: addition (+), subtraction (-), multiplication (*), division (/), and parentheses for grouping. The calculator should handle operator precedence correctly and be able to process expressions that include whitespace.

Examples

Input:

Output

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 1
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt