Thank you
for choosing Habsida.
Now you only need to complete the JS Admission Task Challenge!
A Admission Task Challenge is a necessary requirement when choosing the "Pay after employment" plan. After completing the task, the coordinator will contact you and invite for an admission interview.
The start of the next course is May 15.
Get you spot!
Days
Hours
Minutes
Seconds
Here's what you need to do:
1
Admission Task Challenge
Create the "Calculator" app with easy-to-follow guidelines.
2
Interview
After completing the task, we'll arrange a stress-free admission interview.
3
Education
In just 6-8 months, you'll be ready for a successful career as a Developer
4
IT Career
With your industry portfolio and interview skillset ready, you'll be on your way to a thriving IT career!
JS Admission Task Challenge

Description of admission task "Calculator"

  • You will need to solve a code problem in JavaScript.
  • Task link: https://repl.it/@JavaMentor/RomanCalculator
  • After solving the problem, save the link to the solution (copy the url).
The solution is saved on the platform under a unique url, which will need to be sent to us at info@schoice.co with the subject “Front-end test task”

Description:
Create a calculate function. The function must accept arithmetic operations of two numbers as a string and return a string with the result of their execution.

The function takes data from arguments and returns with return.
Requirements

  1. The solution must pass all tests.
  2. The calculator can perform addition, subtraction, multiplication and division operations with two numbers: a + b, a - b, a * b, a / b. The data is transferred as a single line!
  3. The calculator can work with both Arabic (1,2,3,4,5…) and Roman (I,II,III,IV,V…) numbers. Both operands must be either Arabic or Roman.
  4. The operands must be in the range 1 to 10 inclusive, no zero. The answer may be more than 10.
  5. The calculator can only work with integers, accepts and returns.
  6. The output result is always a string with an integer. In division, we take into account only the integer part - we discard the decimal part, for example 2 / 4 \u003d 0.5 - we return 0.
  7. The calculator can only work with Arabic or Roman numerals at the same time, when the user enters a string like 3 + II, the calculator should throw an exception (error) and stop working.
  8. Since there are no zero and negative numbers in the Roman numeral system, we return an empty string instead. (for example I - II = '')
  9. When calling the calculator with inappropriate numbers, the function throws an exception and exits.
  10. When calling the calculator with a string that is not a math example with one of the arithmetic operations described in the requirement, the application throws an exception and exits.

calculate('1 + 2'); // string '3' will be returned
calculate('VI / III'); // return string 'II'
calculate('VII / III'); // return string II'
calculate('I + II'); // return string 'III'
calculate('I - II'); // return string '' (empty string) there are no negative numbers in the roman system
calculate('I + 1'); // an exception (error) will be returned throws Error different number systems are used at the same time
calculate('I'); // throws Error exception will be returned. string is not a mathematical operation
calculate('1 + 1 + 1'); // throws Error exception will be returned. the format of the mathematical operation does not satisfy the task - two operands and one operator (+, -, /, *)

Step 1
  1. You need to register or login on the platform https://replit.com/
  2. Follow the link https://repl.it/@JavaMentor/RomanCalculator and click the “Fork” button to start solving the problem
Evaluation criteria

  • You must solve the problem on your own, without anyone's help.
  • You can use Google, but do not look for a ready-made solution to the problem.
How to submit the solution?

  • The solution is saved on the platform under a unique url, which will need to be sent to us at info@schoice.co with the subject “Front-end test task”
Struggling? We've got you covered!
We offer a free crash course to get you started in Java from scratch.
Still need help?
Consider our course with mentor support for expert guidance.
Help Section
It's easier than you think!
WhatsApp
Telegram
If you still have questions, we're only one button away.
© 2023 Habsida School
Address
Schoice Habsida, Inc
주식회사 에스초이스 합시다

Block 3, 1st floor, 20, Pangyo-ro, 289 beon-gil, Bundang-gu, Seongnam-si, Gyeonggi-do
경기도 성남시 판교로 289번길 20 스타트업 캠퍼스 1