From 0a438e8407d3f5fae6d94a4fbf96c3756bac4671 Mon Sep 17 00:00:00 2001 From: tlizri Date: Thu, 3 Nov 2022 11:40:17 +0100 Subject: [PATCH 1/6] Initial commit --- src/main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main.py diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..019ce9b --- /dev/null +++ b/src/main.py @@ -0,0 +1,16 @@ +# This is a sample Python script. + +# Press Mayús+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/ From d34e8c39996a0310e4766a04b445806be9c35e2a Mon Sep 17 00:00:00 2001 From: tlizri Date: Fri, 4 Nov 2022 12:49:25 +0100 Subject: [PATCH 2/6] Added requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e4f81fa --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +-i https://pypi.org/simple From 410dc0a899411f0e8828c90ca5af0d1100f5b003 Mon Sep 17 00:00:00 2001 From: tlizri Date: Fri, 4 Nov 2022 13:18:49 +0100 Subject: [PATCH 3/6] Resolve package versions --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index e4f81fa..ee2bf11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ -i https://pypi.org/simple +setuptools==65.5.0 ; python_version >= '3.7' +wheel==0.38.0 From 9cbae18e908f4bdf6eaf6f6a3a5a3f93a17ac12a Mon Sep 17 00:00:00 2001 From: Izri Toufali Lapaz Date: Mon, 7 Nov 2022 13:24:19 +0100 Subject: [PATCH 4/6] Updated README.md Updated readme for exercise four. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fa0237d..e2ed6ff 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # OpenBootCampPython Repository to store Python boot camp. + +* Exercise 4: Escribe un programa que sea capaz de mostrar los números del 1 al 100 en orden inverso. From 2c3aa4c3ff48dc8407537c3b48745796472f742a Mon Sep 17 00:00:00 2001 From: tlizri Date: Mon, 7 Nov 2022 13:33:18 +0100 Subject: [PATCH 5/6] Completed exercise four --- src/ExerciseFour/invertedCount.py | 3 +++ src/main.py | 15 ++++----------- 2 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 src/ExerciseFour/invertedCount.py diff --git a/src/ExerciseFour/invertedCount.py b/src/ExerciseFour/invertedCount.py new file mode 100644 index 0000000..ace6f84 --- /dev/null +++ b/src/ExerciseFour/invertedCount.py @@ -0,0 +1,3 @@ +def invertedCount(): + for i in range(100, 0, -1): + print(i) diff --git a/src/main.py b/src/main.py index 019ce9b..f3d1659 100644 --- a/src/main.py +++ b/src/main.py @@ -1,16 +1,9 @@ -# This is a sample Python script. +import ExerciseFour.invertedCount as e4 -# Press Mayús+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 main(): + e4.invertedCount() -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/ + main() From 2d22d149a34dad26f007f47f280e336df51255e1 Mon Sep 17 00:00:00 2001 From: tlizri Date: Tue, 8 Nov 2022 14:40:05 +0100 Subject: [PATCH 6/6] Added docstring and renamed folder --- src/ExerciseFour/invertedCount.py | 3 --- src/exercisefour/invertedCount.py | 7 +++++++ src/main.py | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) delete mode 100644 src/ExerciseFour/invertedCount.py create mode 100644 src/exercisefour/invertedCount.py diff --git a/src/ExerciseFour/invertedCount.py b/src/ExerciseFour/invertedCount.py deleted file mode 100644 index ace6f84..0000000 --- a/src/ExerciseFour/invertedCount.py +++ /dev/null @@ -1,3 +0,0 @@ -def invertedCount(): - for i in range(100, 0, -1): - print(i) diff --git a/src/exercisefour/invertedCount.py b/src/exercisefour/invertedCount.py new file mode 100644 index 0000000..6582206 --- /dev/null +++ b/src/exercisefour/invertedCount.py @@ -0,0 +1,7 @@ +def invertedCount(): + """Script that show in terminal numbers from 100 to 1 + :return: None + :rtype: NoneType + """ + for i in range(100, 0, -1): + print(i) diff --git a/src/main.py b/src/main.py index f3d1659..c980955 100644 --- a/src/main.py +++ b/src/main.py @@ -1,8 +1,12 @@ -import ExerciseFour.invertedCount as e4 +from src.exercisefour.invertedCount import invertedCount def main(): - e4.invertedCount() + """Main script for exercise four + :return: None + :rtype: NoneType + """ + invertedCount() if __name__ == '__main__':