+ 2
Santa's challenge đ đ
With Christmas before you know it ol' Santa Claus chose YOU to help him prepare for it in time. You see, Nipper Twinkle-Toes, Santa's beloved elf hid one page of the Naughty or Nice List a while ago and poor Santa found it only a few minutes ago! He will never be able to go through that list in time unless... he would use a machine to do all the tedious counting. So he chose YOU, great coder, to create him a code that can determine which children were naughty and which were nice. (continued in the comments)
8 Respostas
+ 9
If you join the SoloLearn Discord Chat group, there is a private message function.
https://www.sololearn.com/Discuss/689391/?ref=app
+ 4
https://code.sololearn.com/cIPMEcm9iEJy/?ref=app
+ 3
@HeisAbdulaziz
Thank you âș
+ 2
Sololearn should have a reply option for answers of quession and private chat option.
Without that options I have some difficulty.
+ 1
@David Ashton
đđđ
+ 1
Yes, true. Especially since SoloLearn already has "Parental guidance" notice in Google Play store. I imagine sometimes apps wouldn't allow private messaging because they want more children to be able to use those apps.
0
(continuation)
The task: create an algorithm which takes multiple lines of input, does a calculation and outputs the result.
Input description:
Line 1: n [integer].
Lines 2 to n+1: str [string], *space*, g [integer], *space*, b [integer].
n = number of children on the list
str = child's name
g = number of good deeds
b = number of bad deeds
Calculation description:
If at least 50% of child's deeds are good, he/she is "nice", otherwise he/she is "naughty".
Output description:
Lines 1 to n: str, *space*, "is naughty" or "is nice"
Example:
  Input:
3
Tom 5 3
Sue 7 7
Luke 3 4
  Output:
Tom is nice
Sue is nice
Luke is naughty
All programing languages are welcomed (yes, including Assembly) if the code actually WORKS. Santa needs a working code, not a pseudocode.
Good luck!!! đ
*Edit*
If input separation is a problem you can write each variable in a new line instead.
Example:
  Input:
3
Tom
5
3
Sue
7
7
Luke
3
4
  Output:
Tom is nice
Sue is nice
Luke is naughty