Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def task8(a, b):
- def nod(x, y):
- while x != y:
- if x > y:
- x = x - y
- else:
- y = y - x
- return x
- n = nod(a, b)
- print (str((a / n)) + "/" + str((b / n)))
- def task15():
- A = [random.randrange(-5, 20) for i in range(75)]
- mn = 9999
- mx = 0
- i = 0
- while i < 75:
- if A[i] < mn:
- mn = A[i]
- if A[i] > mx:
- mx = A[i]
- i = i + 1
- return (mn,mx)
- def task16(a,b):
- while a != b:
- if a > b:
- a = a - b
- else:
- b = b - a
- print (a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement