Write a program to input an integer and check whether all digits in it are same or not.
Answers
Are you expecting an answer like this? It will return True if all the digits are same else False.
What I am doing in this answer is, I am taking the first digit then I am multiplying the string form of the digit times the length of the string and using an If statement to check whether they match or not.
def check(n):
if str(n) == str(n)[0] * len(str(n)):
return True
else:
Answer:
Deoxyribonucleic acid is a molecule composed of two polynucleotide chains that coil around each other to form a double helix carrying genetic instructions for the development, functioning, growth and reproduction of all known organisms and many viruses.
hi ji
apka naam
Deoxyribonucleic acid is a molecule composed of two polynucleotide chains that coil around each other to form a double helix carrying genetic instructions for the development, functioning, growth and reproduction of all known organisms and many viruses.
Explanation: