Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- L = []
- name = input("podaj nazwe pliku ")
- file1 = open(name, 'r')
- Lines = file1.readlines()
- p1 = int(input("Podaj dolny przedzial "))
- p2 = int(input("Podaj gorny przedzial "))
- while(1 == 1):
- suma = 0
- for line in Lines:
- if ( int(line) >= p1 and int(line) <= p1 + 9 ):
- suma += 1
- print("W przedziale ", p1, " - ", p1 + 9, " : ", suma)
- p1 += 10
- if( p1 > p2 ):
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement