+ 17
[ASSIGNMENT] Niven number
In this challenge you have to find whether a number is Niven number or not. Note:- (Niven number is that number which is divisible by its sum of digits) Example :- Consider the number 126 Sum of its digits is 1 + 2 + 6 = 9 and 126 is divisible by 9 hence it is a Niven number. Best of luck ๐ HAPPY CODING ๐ Don't forget to try at once Note :- This challenge had already posted as assignment My try https://code.sololearn.com/c85zwXbQfMo8/?ref=app
31 Answers
+ 26
https://code.sololearn.com/cqf9zr4zdo7a/?ref=app
+ 18
https://code.sololearn.com/c5yYxMnPtK8i/?ref=app
+ 17
Ujjwal Kumar
Thank you very much for your support and such nice words ๐๐๐
I really appreciate it from you! ๐
You really thrilled me! ๐๐๐ค
+ 16
Ujjwal Kumar
W/o๐ooohoo ... !!!!!!
Thank you very much, ๐๐ค
I'm really surprised ๐ and happy ๐ that you marked my answer as the best! ๐๐
I'm glad you like it ๐๐๐ค๐ป
I'm really honored and grateful! ๐ค๐
+ 10
+ 10
Created it a while ago.
BTW , I had submitted this assignment too.๐
https://code.sololearn.com/WhUP0c3amF72/?ref=app
+ 9
heres mine....
give diff inputs in n='...' part in the code
https://code.sololearn.com/cjm7UHbIAFbZ/?ref=app
+ 8
Please post challenges via usage of the lesson-factory.
Thanks.
+ 8
My solution:
โข One-liner
โข No loops
โข No if statements
โข No equality operators
โข 115 bytes
https://code.sololearn.com/cD36sYcL5hi5/?ref=app
+ 8
~ swim ~
Feel free to use SoloLearn's Discord server to help the moderators organize the Q&A.
https://www.sololearn.com/discuss/689391/?ref=app
+ 7
https://code.sololearn.com/W7F9QYSTI1sk/?ref=app
+ 7
Python:
# number given as n
print(n % sum([int(i) for i in str(n)]) == 0)
+ 7
~ swim ~
It's seen as "miscellaneous". An area has been provided for challenge submissions, so posting it to the Q&A (whether or not the challenge was submitted via the lesson-factory) will result in the post being labeled as off-topic. Submitting a challenge via the lesson-factory does not justify posting it to the Q&A afterward. I do agree that SL's in-house approval-rate could use some work, but the mods are only doing what they've been instructed to do. The headers have nothing to do with a post's worth. Their purpose is to prepare the Q&A for an upcoming update. That is all.
Update: Challenge-threads will now be marked with a new header [ASSIGNMENT] to help distinguish between the user-created challenges and the user-vs-user challenges.
+ 6
+ 5
~ swim ~ there are so many challenges that are still in post section ๐ซ but only my challenge is off topic
+ 4
Any num is divisible by any number... I assume you mean the quotient must result in an integer value.