Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# OpenBootCampPython
Repository to store Python boot camp.

* Exercise 2: Modifica la variable del anterior ejercicio en la consola de python y después muestrala por consola para ver la modificación de la variable. Tienes que subir capturas de pantalla en una carpeta comprimida zip.

* Screenshot in folder "src/ExerciseTwo/ejercicio2.png" on branch ExerciseTwo.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-i https://pypi.org/simple
setuptools==65.5.0 ; python_version >= '3.7'
wheel==0.38.0
Binary file added src/exercisetwo/ejercicio2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/exercisetwo/helloworld.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def helloworld(a='Hola mundo!'):
"""Script that show in terminal the variable a
:param a: parameter to show in terminal, default to 'Hola mundo!'
:type a: str
:return: None
:rtype: NoneType
"""
print(a)
19 changes: 19 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import sys
from src.exercisetwo.helloworld import helloworld


def main(argv):
"""Main script for exercise two
:param argv: list of arguments for helloworld script
:type argv: list(str)
:return: None
:rtype: NoneType
"""
if len(argv) == 0:
helloworld()
else:
helloworld(argv[0])


if __name__ == '__main__':
main(sys.argv[1:])