Daily Challenge #97

Hello Everyone,
I created a daily challenge before but no one replied. This time on my 100th day on Kodular Community I am creating a new challenge that will be simple & easy.

:arrow_forward: AIM:
Convert the percentage score into the grading system given below:
Return “A+” if score = 100
Return “A” if 90<= score <100
Return “B” if 80<= score <90
Return “C” if 70<= score <80
Return “D” if 60<= score <70
Return “E” if 50<= score <60
Return “F” if score <50

:space_invader: EXAMPLE:
comp

:green_book: NOTES:

  1. No extension or component can be used.
  2. No need to take care of unexpected inputs like strings or special character
  3. Shortest & Fastest answer will be marked as solution
  4. Last date/time to post your answer is 2020-08-29T18:30:00Z

:trophy:PRIZE:

:medal_sports:All The BEST :+1:t2:

Regards,
Ansh Anand

1 Like

There is mistake. Don’t worry you have 1 day left

1 Like

That’s my try :grin::
17 blocks including the procedure block ( using dictionaries ):

Blocks
3 Likes

Nice One :+1:t2: :+1:t2:

Target for other Koders :
Do this task now in less than 17 blocks

3 Likes

Hello, can the score be less than 0 (negative)?

If no,

Solution (12 blocks)

0-100

If yes,

Solution (15 blocks)

blocks (1)

4 Likes

:100: :+1:t2:Whoa , Great. I have the same code. Perfect. Just omit intialise local block and use list directly to reduce 2 blocks (making it 10).

Also there an imperfect way of reducing two more blocks by removing + 1 block and replacing floor with ceil and 10 with 9.99999 but it will work accurate for scores only upto specific decimal places and give different results for number like 89.999999999. More you increase the 9 after point it will get more accurate.

1 Like

Let’s see if someone can do it in less than 10 blocks.

1 Like

variable makes me clear of what am I doing, because it is used for one time only, I didn’t realized I can directly put on select list :sweat_smile:

and the second point is actually not imperfect, it is better in my opinion

2 Likes

So as there were no new entries:

:1st_place_medal: @WatermelonIce

:2nd_place_medal: @Mohamed_Tamer

4 Likes

Congrats Winners :partying_face:

3 Likes

Thanks! Good work everyone :smiley:

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.