Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. L = []
  2. name = input("podaj nazwe pliku ")
  3. while(1 == 1):
  4. p1 = int(input("Podaj dolny przedzial "))
  5. p2 = int(input("Podaj gorny przedzial "))
  6. file1 = open(name, 'r')
  7. Lines = file1.readlines()
  8. suma = 0
  9. for line in Lines:
  10. if ( int(line) >= p1 and int(line) <= p2 ):
  11. suma += 1
  12. print(suma)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement