Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python-3 Online

# ejercicio 4.2

def main():
    ingreso=3 #int(input("Ingrese numero entero: "))
    mini=ingreso
    maxi=ingreso
    while ingreso!=0:
        if maxi<ingreso:
            maxi=ingreso
        if mini>ingreso:
            mini=ingreso
        ingreso=3 #int(input("Ingrese numero entero: "))
    print(mini,maxi)

main()


'''
# ejercicio 4.1

def main():
    ingreso=0 # los numeros que se ingresan
    cont=0    # contador para numeros pares
    while cont<5:
        ingreso=3#int(input("Ingrese numero entero: "))
        cont=condicion(ingreso)
        
    
def condicion(ingreso):
    cont=0
    if (ingreso % 2) == 0:
            cont=cont+1
            print("Numero Par. ", end="")
            if ingreso % 4 == 0:
                print("Tambien es multiplo de 4.", end="")
            print("Total de numeros pares ingresados",cont)
    
    return cont

main()
'''

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.