Entradas

Clases

def suma ( self ):     ##Definido fuera de la clase esta funcion     print ( "suma" )         class Marca ( Exception ):     f = suma ###la variable f ahora es una funcion de tipo suma         ##constructor     def __init__ ( self ):                 print ( "Constructor al inicio" )         def __del__ ( self ):         print ( "Destructor al final " )             def toyota ( self ):                 print (f "Es toyota" )         def BMW ( self ):         global goma         goma = 4         print (f "Es un BMW" )         def honda ( self ):         print (f "Es honda" )         a = 14         ...

Python RPM

 Python RPM print("Python"[5])##Obtenemos la posicion 5 contando desde la posicion 0 a=200_000 ## usar el _ para interpretar mejor un numero 200,000 c=150 print (type(c))##Para saber el tipo de dato mes=12 print(f"Los meses de año son  {mes} ,  algo ") edad=int(input("Caul es tu edad?")) mdays=edad*365 print(mdays) import myRandom ##importando un archivo de python para usar sus variables y function myRandom.generaRandomInt() print(myRandom.PI) print(myRandom.generaRandom()) ------------------------------------------------------------------------------------------------- _number=int(input("Enter your number:")) _result=_number%2 if _result==0:     print("Your number is even") else:     print("Your number is Odd")      -------------------------------------------------------------------------------------------------------------- print ( 4 ** 2 ) ## el cuadro es elevado a las 2 ##PEMDAS #() # ** #* / #+ - print ( 3 * 3 + 3 / 3 - 3...