Funcion
Funcion
Funcion
import os
os.system('cls')
nombre1 = "Mariano"
nombre2 = "Santiago"
nom = input("Ingrese su nombre: ")
lista = []
cantidad = int(input("Cantidad: "))
mayor = 0
menor = 0
i = 1
while(cantidad > 0):
numero = float(input("Numero #" + str(i) + ": "))
lista.append(numero)
i = i +1
cantidad = cantidad - 1
mayor = max(lista)
menor = min(lista)
matrix.mean(axis=0)
matrix.mean(axis=1)
def cImc():
peso = vNumFloat(40,300,"peso:")
estatura = vNumFloat(40,300,"Estatura:")
imc = peso /(estatura*estatura)
return imc
numero=int(input("Numero: "))
esPrimo=True
for i in range(2,numero):
if numero%i==0:
esPrimo=False
break
if esPrimo:
print("Es numero Primo")
else:
print("No es numero Primo")
if num % 2 == 0:
else:
print("El numero", num, "Es impar.")
import os
from random import randint
os.system('cls')
participante = []
aux = 0
while aux != 2:
print("Gran rifa Duoc")
print("1.- Vender numero")
print("2.-Sorteo")
aux = int(input(">> "))
if aux == 1:
if len(participante) >25:
print("no hay numeros")
else:
participante.append(input("nombre :"))
if aux == 2:
if len(participante) <10:
print("Error, faltan vender numeros")
aux = 0
else:
print("Vamos con el sorteo....")
ganador = randint(1,len(participante))
print(f"el ganador es {participante[ganador - 1]}")
input("presione enter para continuar")
usuario1 = "raul_1"
contraseña1 = "s1d3"
usuario2 = "xXdD"
contraseña2 = "mmaa"
usuario3 = "duoc"
contraseña3 = "aea"
usuario4 = "Lucy"
contraseña4 = "mugi"
conexion = False
if conexion:
print("logueado!")
else:
print("error de conexion")
system("cls")
matrix = array([
[" "*1," "*1," "*1,]
[" "*1," "*1," "*1,]
[" "*1," "*1," "*1,]
[" "*1," "*1," "*1,]
])
for fila in range(2):
for columna in range(3):
matrix[fila][columna] = randint(1,5)
print(matrix)
import os
os.system('cls')
nombre = []
aux = 0
while aux!= 5:
print("Sistema de Beca")
print("1.- Solicitar hora")
print("2.- Cancelar hora")
print("3.- Mostrar personas")
print("4.- Ver cantidad")
print("5.- Salir del sistema")
aux =int(input(">>"))
if aux ==1:
nombre =input("Ingrese nombre:")
nombre.append
if aux ==2:
nombre =input("Ingrese su nombre: ")
nombre.remove
if aux ==3:
print(len(nombre))
if aux ==5:
print("Saliendo del sistema....")