muhammad_nasif

TASK_05

Apr 12th, 2021
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. tpl = (1, 1, 1, 2, 3, 4, 5, 6, 7, 7, 7, 8, 1)
  2.  
  3. value = input()
  4. counter=0
  5. for data in tpl:
  6.     if data == int(value):
  7.         counter+=1
  8.  
  9. print(str(value)+" appears "+str(counter)+" times in the tuple.")
  10.  
Advertisement
Add Comment
Please, Sign In to add comment