Generation

generate functionTue, 04 Apr 2023

Algoritmo que pida dos números aleatorios e indique si el primero es mayor que el segundo o no con los comandos if, elif o else

def greater(a, b): if (a>b): return "The first number is greater than the second" elif (a==b): return "The first number is equal to the second" else: return "The first number is less than the second" greater(2,3), greater(3,3), greater(3,2)

Questions about programming?Chat with your personal AI assistant