Practicas manejo de matematicas

PRÁCTICA : SUMA DE DOS NUMEROS



#Aqui insertamos el codigo
import time
from math import *

print 'ingresa un primer valor: '
a = int(input(""))

time.sleep(5)

print 'ingresa un segundo valor: '
b = int(input(""))

suma = a + b
print "Suma de los valores ingresados:"
print(suma)

PRÁCTICA : FACTORIAL DE UN NUMERO




#Aqui insertamos el codigo
import math

a = 6
print "El factorial de 6 es:"
print math.factorial(a)
print math.ceil(a)

PRÁCTICA : PROGRAMA QUE VERIFICA SI ES ADMINISTRADOR O NO



#Aqui insertamos el codigo
import time

print "ingrese su nombre"

nombre = raw_input()

if nombre == 'uribe':
    print ('es usted administrador')
else:
    print ('no tiene acceso')

PRÁCTICA 29: PROGRAMA QUE VERIFICA SI ES ADMINISTRADOR UTILIZANDO LA LIBRERÍA TIME



#Aqui insertamos el codigo
import time

print ('nombre')
nombre = raw_input()
print ('cargando password')
time.sleep(1)
print('***')
time.sleep(2)
print('***')
time.sleep(3)
print('***')
time.sleep(4)
print('***')
time.sleep(5)
print('Carga completa 100%')

if nombre == 'uribe':
    print('Es usted administrador')
else:
    print('no tiene acceso')

PRÁCTICA 30: PROGRAMA QUE VERIFICA SI UN NUMERO ES PAR O IMPAR




#Aqui insertamos el codigo
h=input('Introduzca un numero')
if h%2 == 0:
    print  'Este numero es par'
else:
    print 'Este numero es impar'

PRÁCTICA 31: PROGRAMA QUE REALIZA LA CONVERSIÓN DE DECIMAL A BINARIO



#Aqui insertamos el codigo
import time

print 'programa de conversion decimal a binario'
print 'numero a convertir'
time.sleep(2)
a = input()
b = bin(a)
print (b)
time.sleep(3)


Práctica #34: Edad



#Aqui insertamos el codigo
#encoding: utf-8
edad = 20

if edad>=0 and edad <18:
    print "Eres un niño"

elif edad>=18 and edad<27:
    print "Eres un joven"

elif edad>= 27 and edad <60:
    print "Eres un adulto"

else:
    print "Eres de la tercera edad"









No hay comentarios:

Publicar un comentario

Unidad No.4 Triangulo en 3D

import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * verticies = (     (1, -1, -1),     (1, 1,...