ADD dia 01

This commit is contained in:
Manuel Vergara 2023-04-12 21:53:28 +02:00
parent fb4622968b
commit 62d6dfc393
3 changed files with 46 additions and 0 deletions

16
dia_01/main.py Normal file
View File

@ -0,0 +1,16 @@
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')
# See PyCharm help at https://www.jetbrains.com/help/pycharm/

26
dia_01/primer_proyecto.py Normal file
View File

@ -0,0 +1,26 @@
""" Primeros ejercicios """
print("Hola mundo")
print(100 + 50)
print("\nHOLA" + " " + 'MUNDO')
print("\nMe llamo \"Manuel\"")
print("Primera linea\nSegunda linea")
print("\ttabulemos")
print("This isn't a number")
print('This isn\'t a number')
print("Este signo \"\\\" es una barra invertida")
print("\n\nHola ")
print("Tu nombre es " + input("Introduce tu nombre: ")
+ " y tu apellido es "
+ input("Introduce tu apellido: "))
print(input("¿Qué estás estudiando? "))
print(input("Escribe tu nombre: ") + " " + input("Escribe tu apellido: "))

4
dia_01/programa01.py Normal file
View File

@ -0,0 +1,4 @@
""" programa 01 del curso """
print("La cerveza se llama\n"
+ "\"" + input("¿Cuál es tu mascota favorita? ") + " " + input("¿Cuál es tu color favorito? ")
+ "\"\n¡Felicidades por tu espumosa!")