Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### (1) ###
- tiedosto = open("tmalli.txt", "r", encoding="utf-8") #avataan tiedosto lukemista varten
- while True:
- rivi = tiedosto.readline()
- if len(rivi) == 0:
- break
- print(rivi, end = "")
- tiedosto.close()
- ### (2) ###
- luku = 1000000000
- x = int(luku)
- alaraja = 0
- y = int(alaraja)
- tiedosto2 = open("nmalli.txt", "r", encoding="utf-8")
- while True:
- numerot = tiedosto2.readline()
- if len(numerot) == 0:
- break
- paska = int(numerot)
- if y < num < x:
- x = num
- print(x)
- tiedosto2.close()
Add Comment
Please, Sign In to add comment