“Si elif y el otro en Python” Código de respuesta

Si elife más

number = 9

if number < 5: # Condition 1
	print("Less than 5") # Code 1
elif number < 10: # Condition 2
	print("Less than 10") # Code 2
else: # If Condition 1 and 2 are not true
	print("Not less than 5 or 10") # Code 3
Ninja Penguin

Si elif y el otro en Python

var_one = input("Give me a number: ")
var_one = int(var_one)
var_two = input("Give me another number: ")
var_two = int(var_two)

if var_one > var_two:
    print(f"First number, {var_one} is bigger")
elif var_one < var_two:
    print(f"Second number, {var_two} is bigger")
else:
    print(f"Both numbers are the same : {var_one}")
Rajitha Amarasinghe

Respuestas similares a “Si elif y el otro en Python”

Preguntas similares a “Si elif y el otro en Python”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código