Python Segunda Sesion de Clases

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Python Segunda Sesion de Clases - Presentation Transcript

    1. Python + Sugar Carlos Mauro Cardenas Fernandez http://unimauro.blogspot.com http://www.twitter.com/unimauro unimauro@gmail.com    
    2. Usando la Calculadora Python >>> 13.0/7 >>> 6*7 >>> 13.0/7. >>> 7*7*7*7*7 >>> 13.0/7.0 >>> 7**5 >>> 7%4 >>> -7**6 >>> 8%2 >>> -7**5 >>> 9/5 >>> 8.75%.25    
    3. Asignando Variables en Python >>> a = 19 >>> mun1 =input("Ingrese un numero: ") >>> a * 6 >>> nun1*d >>> a ** 9 >>> nun1 ** 0.5 >>> b = 73 >>> mun2 =input("Ingrese un numero: ") >>> b + a >>> e = nun1 * mun2 >>> c = b * a >>> d = c/2.5    
    4. Librerias Matemáticas >>> 5**4 >>> import math >>> pow(5,4) >>> math.floor(19.3635) >>> num3 = -150 >>> math.sqrt(100) >>> raiz = math.sqrt >>> abs(num3) >>> raiz(121) >>> floor(18.7) >>> redondeo = math.floor ¿Qué sucede? >>> redondeo("Algo")    
    5. Trabajando con Cadenas :D >>>"Hola a todos" >>>int(mvar) >>>'Hola a todos' >>>mvar_num= in(mvar) >>>a = "Uno" >>>mvar_num >>>b = "Dos" >>>¿Qué Sale? >>>a + b >>>a, b >>>mvar='2' >>>mvar    
    6. Cadenas y Caracteres Especiales >>>"Hi. What's the problem?" >>>'Hi. What's the problem?' >>>"Romulo Dijo: "Yó ha hice" " >>>"Romulo Dijo: "Yó ha hice. Gracias Hijita " "    
    7. Concatenando Números con Cadenas >>> ns = 28 >>> ns + 1 >>> ns >>> print "Hoy!!!. La pasare con " + ns+ " Amigos" >>> num1 = str(40) >>> print "Hoy!!!. La pasare con " + num1 + " Amigos... Somos" >>> num2 = 4 >>> print "El Rector Padilla("repite el plato") con " +`num2` + " a favor"    
    8. Secuencias y Tuplas familia =['ma','pa','tio','abue','herm1','herm2'] familia[2] familia[-2] semana =['lun','mar','mier','jue','vie','sab','dom']    
    9. Extracción de Partes de una Secuencia ejemplo=[0,1,2,3,4,5,6,7,8,9] ejemplo[2:6] ejemplo[-1:-6] ejemplo[:8] ejemplo[:] ejemplo[2:6:8] ejemplo[9:2:-3]   ejemplo[::-5]  
    10. Editando secuencias >>> [7,4,5]+[78,45,9,5] >>> 'curso' + 'python' >>> [7,4,5] + 'python' – ¿Qué Sucede? >>> 'curso'*5 >>> [18]*7 >>> x1 = 'esternocleudomastoideo' >>> 'no' in x1    
    11. ¡¡¡Más Listas!!! familia =['ma','pa','tio','abue','herm1','herm2'] >>> del numeros[4] >>>'ma' in familia >>> lista1 = list('VamosBien') >>>len(familia) >>> lista2 = list('creo') >>>max(familia) >>> lista1 >>>min(familia) >>> lista2 >>>numeros =[156,635,0.5,56,895, 98,1,-77] >>> lista1[5:]=list('...Anda!!') >>>numeros[4]=78 >>> lista2[2:2]=[25,16,58,63] >>>list('Curso de Python') >>> lista1[1:8]=[]   >>>nom= list('Curso de Python')  
    12. Métodos de Listas, Cadenas >>>cuadrado=[10,10,30] >>>cuadrado >>>cuadrado.append(41) >>>cuadrado.count(10) >>>triangulo=[50,30,40] >>>triangulo.extend(cuadrado)   >>>triangulo  
    13. Ordenamientos >>>nuevo=[12,3,2,65,55,663,12,5,5] >>>nuevo.sort() >>>sorted('Palabras de un Diario') >>>entradas ="Holas %s , tu edad es %d" >>>var=('Jackson', 50) >>>print entradas % var >>>noticia="El Astro Michael murió a los 50 años"   >>>noticia.find('Michael')  
    14. Agregando y Formateando >>> familia =['ma','pa','tio','abue','herm1','herm2'] >>> invitamos='herm3' >>> glue.join(familia) >>> oracion="universidad NACIONAL of ingenieria" >>> oracion.lower() >>> oracion.replace('of','de')    
    15. Jugando con Diccionarios >>> libros={'fisica':'ciencia','mate1':'ciencia','odisea':'literatura'} >>> libros['fisica'] >>> libros['odisea'] >>> libros.clear() >>> alumnos={'alum1':'3', 'alum2':'5'} >>> asistencia=alumnos.copy() >>> alumnos.haaas_key('alum1')    
    16.    
    17. Servidores para Descarga ● U.S.A. master http://download.sugarlabs.org/soas/releases/soas-strawberry.iso ● Europe mirror ● http://ftp.snt.utwente.nl/pub/software/sugarlabs/soas/releases/soa s-strawberry.iso ● Netherlands mirror http://ftp.nluug.nl/pub/os/Linux/distr/Sugar/soas/releases/soas- strawberry.iso    
    18. Proceso de Instalación en Windows ● Descargar el liveusb-creator http://fedorahosted.org/liveusb-creator/ ● Usar un USB con por lo menos 1gb de espacio. ● Renombrar el Volumen del USB a: FEDORA ● Ejecutar el liveusb-creator ● Seleccionar el iso de Sugar on a Stick (Strawberry) del menu derecho de la ventana de liveusb-creator ● Configurar el Persistent Storage, el tamaño del espacio a usar en el USB.   ● Seleccionar el USB a usar. Y Click  en: Create Live USB
    19. Usando USBLive    
    20.    
    21. Avisos Interesantes    
    22.    
    23.    
    24.    
    25.    
    26.    
    27. Bibliografía    

    + Carlos CardenasCarlos Cardenas, 4 months ago

    custom

    608 views, 0 favs, 1 embeds more stats

    Tipos de Datos en Python y Sugar Stick

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 608
      • 537 on SlideShare
      • 71 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 12
    Most viewed embeds
    • 71 views on http://unimauro.blogspot.com

    more

    All embeds
    • 71 views on http://unimauro.blogspot.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?