Tech C**P
Usually when you buy something, you're asked whether your credit card number, phone number or answer to your most secret question is still correct. However, since someone could look over your shoulder, you don't want that shown on your screen. Instead, we…
Tech C**P
Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized only if the original word was capitalized. Examples: to_camel_case("the-stealth-warrior") # returns…
Tech C**P
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS) HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to…
Tech C**P
Count the number of Duplicates Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both…
Tech C**P
A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits in a given base. Here we will restrict ourselves to decimal (base 10). For example, take 153 (3 digits): 1^3 + 5^3 + 3^3 = 1 + 125…
Tech C**P
from math import pow def narcissistic(value): digits = map(int, list(str(value))) power = len(digits) final_res = 0 for digit in digits: final_res += pow(digit, power) return int(value) == int(final_res) #python #solution