Sesión 1 - Curso Python
Sesión 1 - Curso Python
aplicado a la adquisición de
datos de audio
Sesión 1. Introducción a Python
y PyCharm
Grupo de Estudio en Modelamiento Matemático y Computo Científico
Alexander Arias
Septiembre de 2017
¿Porqué escoger Python?
• Nature se toma el software libre en serio: Python como alternativa real a
MATLAB, Mathematica y otros programas comerciales
http://cacheme.org/charla-nature-software-libre-python-alternativa-matlab-mathematica/
• Desarrollo Web
• Análisis de Datos Web frameworks, graphical user interfaces, databases, multimedia,
networking and communications.
• Robótica
– Text processing, scientific computing, and image processing.
• Juegos
– Automation and web scraping, test frameworks, system
• IA administration, documentation tools.
• IoT
•…
https://www.unixmen.com/guido-van-rossum-python-creator/
Programming: Pick up Python
A powerful programming language with huge
community support.
http://www.nature.com/news/programming-pick-up-python-1.16833
Python 2.x o 3.x
Python 2.x Python 3.x
print 2+3 Print with multiple arguments print ("2 + 3 = ", 2+3)
Print es una función en python 3
x = eval(input("Enter a number: ")) Input from the keyboard x = input("Enter a number: ")
Integer Division
1 print (3 / 2) 1.5
1 print (3 // 2) 1
1.5 print (3 / 2.0) 1.5
1.0 print (3 // 2.0) 1.0
“strings” son Unicode de forma
predeterminada
https://www.pythonmania.net/es/2016/02/29/las-principales-diferencias-entre-python-2-y-3-con-
ejemplos/
http://web.cs.wpi.edu/~heineman/html/teaching_/cs110x/days/27-30.html
Creador de Python
• Guido van Rossum
• Computer Programming for Everybody
In 1999, Guido submitted funding proposal to Defense Advanced Research Projects
Agency (DARPA), called Computer Programming for Everybody, in which Guido
further defined his goals for the Python:
– Code which is as understandable as the plain English.
– Open source, so everyone can contribute to its development.
– Suitability for the everyday tasks, to allow shorter development times.
– Easy and intuitive language as powerful as other major competitors.
Python’s name is derived from a television series called “Monty Python’s Flying
Circus” according to Guido. The language is common to use the Monty Python
references in its example code. As example, metasyntactic variables that are often
used in the Python literature are “spam and eggs”, instead of traditional “foo and
bar”. Official Python documentation also often contains various obscure Monty
Python references.
https://www.unixmen.com/guido-van-rossum-python-creator/
Instalar Python
• Descargar de python.org la versión para su sistema operativo de:
https://www.python.org/
• Tener cuidado en seleccionar el ADD Python PATH al instalar
Ensayando la consola de Python
• Ir al símbolo del sistema
• Digitar Python