[Python] how do i ask a user to enter 2 numbers and then it will check which number is higher...

Discussão em 'Python' iniciado por Stack, Outubro 24, 2024.

  1. Stack

    Stack Membro Participativo

    def displaySmallest(num1, num2):
    print ("enter num 1")
    number1 = int(input())
    print("enter num 2")
    number2 = int(input())
    if (number1>number2):
    print("the first number is larger")
    elif (number2>number1):
    print("The second number is larger")


    I'm not sure how to make functions work with user input

    Continue reading...

Compartilhe esta Página