You are on page 1of 2
Cd mS 4B allal 28% 8 5:46 pm € Deja Vu PROBLEM RESULT 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: aaaaaaaghhhhikll Sample Output: Deja Vu Cy SIS | Ballad 27% 0 5:46 pm eI EAAT << i PROBLEM CODE RESULT def repeat_check(chk=input()): i vs wc=0 Pata 3 for i in chk: rn 5 for ii in range (len(chk)): 6 if i == chk[iil]: ue wc=wc+1 3 if we>1: 9 return "Deja Vu" 10 break on] wc=0 i) return "Unique" 14 | print(repeat_check()) 15

You might also like