Beta

Broken Keyboard

Description:

You decided to sit down and make a nice simple program, little did you know your little sister has removed both of the shift buttons and the caps lock from your keyboard.

In other words: In this this Kata you need to make your program without any capital letters or square brackets [].

Why no square brackets you ask?

I don't know I felt like it ㄟ(o-o)ㄏ

(In order to prevent cheating, \ is not allowed either)

The program is simple, you only need to have three functions (you can have more if you want):

add

Add should be able to get any of the following: int, char, float, double, boolean, String.

If the input is an int it should store that number, oterwise just dont crash...

avg

Avg should return the average of all of the ints recived so far and then remove them all.

Avg should return an int.

Avg will never be called befor a valid int was added.

get_amount_of

Get_amount_of should return the amount of times the given number was entered

Keep in mind that numbers are erased after avg and shouldn't be counted

That's it! Have fun!

Puzzles
Logic
Fundamentals

More By Author:

Check out these other kata created by Aharon Sambol

Stats:

CreatedOct 15, 2020
PublishedAug 11, 2021
Warriors Trained185
Total Skips77
Total Code Submissions174
Total Times Completed14
Java Completions14
Total Stars7
% of votes with a positive feedback rating81% of 8
Total "Very Satisfied" Votes6
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes1
Total Rank Assessments6
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • Aharon Sambol Avatar
  • FArekkusu Avatar
Ad