-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathM_deja-vu.py
More file actions
28 lines (21 loc) · 826 Bytes
/
M_deja-vu.py
File metadata and controls
28 lines (21 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Deja Vu
You aren't paying attention and you accidentally type a bunch of random letters on your keyboard. You want to know if you ever typed the same letter twice, or if they are all unique letters.
Task:
If you are given a string of random letters, your task is to evaluate whether any letter is repeated in the string or if you only hit unique keys while you typing.
Input Format:
A string of random letter characters (no numbers or other buttons were pressed).
Output Format:
A string that says 'Deja Vu' if any letter is repeated in the input string, or a string that says 'Unique' if there are no repeats.
Sample Input:
aaaaaaaghhhhjkll
Sample Output:
Deja Vu
"""
text = input()
for char in text:
if text.count(char) > 1:
print("Deja Vu")
break
else:
print("Unique")