In general scenario, candidates are allowed to use as many built-in functions as they like, as long as it doesn’t make the solution look trivial or the logic part hard to understand. The interviewer wants to collect as many data points on why they should hire you. So, covering the logic part in your code do makes a lot of sense. Anyways, you can always clarify with the interviewer if you may use certain library or function. It's largely appreciated in interviews if you do that. Good luck!!
@@Analyticsvidhya armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits. 1634 is also armstrong number. 1⁴+ 6⁴+3⁴+4⁴ = 1634. You stated its cube of its digits and wrote code according to that.
@@Analyticsvidhya its not always sum of cube of its digits. If the number is 1234 then as it contains 4 digits. we need to raise power for 4 to all digits and then add to check if it is armstrong 1234 : 1**4 + 2**4 + 3**4 + 4***4 = 1 + 16 + 81 + 256 = 354 354 != 1234 So not an armstrong Similarly 1634 1*1*1*1 + 6*6*6*6 + 3*3*3*3 + 4*4*4*4 = 1634 So 1634 is armstrong number But that's not a big deal. its called armstrong of an order. Just conceptual thing. Overall great clear explanation of important python topics. Thank you