1.

Write a program to find the greatest number among three numbers using a function named greatest_number?​

Answer»

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

from random IMPORT randrange

def greatest_number(nums):

max_num = nums[0]

for n in nums:

if max_num < n:

max_num = n

return max_num

nums = [randrange(1, 69) for n in RANGE(3)]

PRINT(greatest_number(nums))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!



Discussion

No Comment Found