1.

Write a program to enter a number and check whether the number Is a unique or not . (a number is said to be unique if digits are not repeated in it). sample input:5463sample output:it is a unique number.sample input: 3272sample output:it is not a unique number......give the answer by using scanner

Answer»

n():            list = ""    user_input = str(INPUT("Enter a no: "))    for x in user_input:        if x in list:            PRINT("The digit already exists !")        ELSE:            list.append(x)while True:    MAIN()



Discussion

No Comment Found