Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. def function()
  2.     n=int(input(""))
  3.     a=int(input(""))
  4.     b=int(input(""))
  5.     liste = []
  6.     comptage = []
  7.  
  8.     for k in range(n):
  9.         valeur = int(input(""))
  10.         liste.append(valeur)
  11.  
  12.     for p in range(len(liste)):
  13.         comptage.append(0)
  14.  
  15.     for i in range(len(liste)):
  16.         for o in range(a,b):
  17.             if(liste[i] == 0):
  18.                 comptage[0] += 1
  19.  
  20.     for j in range(a,b+1):
  21.         print("nombre de", j, " : ", comptage[j])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement