[ASSIGNMENT] Niven number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

22nd Mar 2018, 5:17 PM
Ujjwal Kumar
Ujjwal Kumar - avatar
24 Answers
+ 26
https://code.sololearn.com/cqf9zr4zdo7a/?ref=app
23rd Mar 2018, 8:09 AM
Danijel Ivanović
Danijel Ivanović - avatar
29th Mar 2018, 9:04 PM
MeanMachine
MeanMachine - avatar
+ 18
https://code.sololearn.com/c5yYxMnPtK8i/?ref=app
22nd Mar 2018, 9:22 PM
LukArToDo
LukArToDo - avatar
+ 17
Ujjwal Kumar Thank you very much for your support and such nice words 😊👍😆 I really appreciate it from you! 😉 You really thrilled me! 😄👍🤗
13th Apr 2018, 5:36 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 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! 🤗😃
13th Apr 2018, 5:02 PM
Danijel Ivanović
Danijel Ivanović - avatar
22nd Mar 2018, 8:09 PM
Med Arezki
Med Arezki - avatar
+ 10
Created it a while ago. BTW , I had submitted this assignment too.😉 https://code.sololearn.com/WhUP0c3amF72/?ref=app
23rd Mar 2018, 1:26 AM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 9
heres mine.... give diff inputs in n='...' part in the code https://code.sololearn.com/cjm7UHbIAFbZ/?ref=app
22nd Mar 2018, 5:35 PM
sayan chandra
sayan chandra - avatar
+ 8
Please post challenges via usage of the lesson-factory. Thanks.
23rd Mar 2018, 12:44 PM
Fox
Fox - avatar
+ 8
My solution: • One-liner • No loops • No if statements • No equality operators • 115 bytes https://code.sololearn.com/cD36sYcL5hi5/?ref=app
23rd Mar 2018, 2:35 PM
ƒred
ƒred - avatar
+ 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
31st Mar 2018, 8:56 AM
Fox
Fox - avatar
+ 7
https://code.sololearn.com/W7F9QYSTI1sk/?ref=app
22nd Mar 2018, 5:54 PM
Manorama
Manorama - avatar
+ 7
Python: # number given as n print(n % sum([int(i) for i in str(n)]) == 0)
22nd Mar 2018, 7:37 PM
Pedro Demingos
Pedro Demingos - avatar
+ 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.
31st Mar 2018, 8:49 AM
Fox
Fox - avatar
23rd Mar 2018, 9:49 AM
Aaron Stone
Aaron Stone - avatar
+ 5
~ swim ~ there are so many challenges that are still in post section 😫 but only my challenge is off topic
30th Mar 2018, 1:39 AM
Ujjwal Kumar
Ujjwal Kumar - avatar
+ 4
Any num is divisible by any number... I assume you mean the quotient must result in an integer value.
23rd Mar 2018, 12:06 PM
J.G.
J.G. - avatar