7 kyu
Dot Calculator
3,096 of 6,600ryanthestupid
Description:
Dot Calculator
You have to write a calculator that receives strings for input. The dots will represent the number in the equation. There will be dots on one side, an operator, and dots again after the operator. The dots and the operator will be separated by one space.
Here are the following valid operators :
+
Addition-
Subtraction*
Multiplication//
Integer Division
Your Work (Task)
You'll have to return a string that contains dots, as many the equation returns. If the result is 0, return the empty string. When it comes to subtraction, the first number will always be greater than or equal to the second number.
Examples (Input => Output)
* "..... + ..............." => "...................."
* "..... - ..." => ".."
* "..... - ." => "...."
* "..... * ..." => "..............."
* "..... * .." => ".........."
* "..... // .." => ".."
* "..... // ." => "....."
* ". // .." => ""
* ".. - .." => ""
Strings
Fundamentals
Similar Kata:
Stats:
Created | Apr 10, 2021 |
Published | Apr 12, 2021 |
Warriors Trained | 11091 |
Total Skips | 202 |
Total Code Submissions | 16616 |
Total Times Completed | 6600 |
Python Completions | 3096 |
JavaScript Completions | 2580 |
C Completions | 126 |
COBOL Completions | 9 |
Julia Completions | 12 |
Lua Completions | 57 |
Ruby Completions | 118 |
Java Completions | 580 |
NASM Completions | 6 |
C# Completions | 170 |
Haskell Completions | 5 |
Total Stars | 134 |
% of votes with a positive feedback rating | 91% of 841 |
Total "Very Satisfied" Votes | 722 |
Total "Somewhat Satisfied" Votes | 91 |
Total "Not Satisfied" Votes | 28 |
Total Rank Assessments | 110 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |