From effcd03bddd0095bbf6bc448e01c924a34ef51e6 Mon Sep 17 00:00:00 2001 From: Reshna Date: Wed, 6 Sep 2023 22:46:59 -0400 Subject: [PATCH 1/7] Commit initially for exercise 1. --- print.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 print.py diff --git a/print.py b/print.py new file mode 100644 index 0000000..69e6ea7 --- /dev/null +++ b/print.py @@ -0,0 +1 @@ +print("Hello Reshna! Let's learn programming in python!") \ No newline at end of file From 74370b4ab3906d8de33aeba6e748cc72a0e9e5ea Mon Sep 17 00:00:00 2001 From: Reshna Date: Wed, 6 Sep 2023 23:18:05 -0400 Subject: [PATCH 2/7] Create markdown file on my username. --- reshnashrestha.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 reshnashrestha.md diff --git a/reshnashrestha.md b/reshnashrestha.md new file mode 100644 index 0000000..2973f2a --- /dev/null +++ b/reshnashrestha.md @@ -0,0 +1,13 @@ +# Computational PHY 505 Fall 2023 + +### Things that I would like to learn in this semester: +- Learn coding using languages like python and c++. +- Increase my familarity in programming tools like visual studio, git and github. +- Create git repository and learn to commit, pull request and merge code. +- Learn to work in group project using Google colab and IBM Quantum Computing. +- Write my own code for various tasks and understand the codes written by others. + + #### For example: + I would like to write a well formatted code in python for finding a factorial of a number. At least, I am trying as follows: + +def factorial(n): From c4c0d9844ec7e4681dbaa9b9d29458aa339ae7be Mon Sep 17 00:00:00 2001 From: Reshna Date: Wed, 6 Sep 2023 23:45:16 -0400 Subject: [PATCH 3/7] Write python code for factorial of 16. --- reshnashrestha.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reshnashrestha.md b/reshnashrestha.md index 2973f2a..8d75afe 100644 --- a/reshnashrestha.md +++ b/reshnashrestha.md @@ -11,3 +11,8 @@ I would like to write a well formatted code in python for finding a factorial of a number. At least, I am trying as follows: def factorial(n): + if n == 0: + return 1 + else: + return n * factorial(n - 1) +print(factorial(5)) From c3d179d4cdd0b3829aa1d0fcd9b1706ab8eb767a Mon Sep 17 00:00:00 2001 From: Reshna Date: Wed, 6 Sep 2023 23:55:58 -0400 Subject: [PATCH 4/7] Fix displaying formatted python code. --- reshnashrestha.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reshnashrestha.md b/reshnashrestha.md index 8d75afe..21873b3 100644 --- a/reshnashrestha.md +++ b/reshnashrestha.md @@ -10,9 +10,11 @@ #### For example: I would like to write a well formatted code in python for finding a factorial of a number. At least, I am trying as follows: + ```python + def factorial(n): if n == 0: return 1 else: return n * factorial(n - 1) -print(factorial(5)) +print(factorial(16)) From faa2b8eeeea1f69f67243fe61be7318e84363952 Mon Sep 17 00:00:00 2001 From: Reshna Date: Wed, 6 Sep 2023 23:56:34 -0400 Subject: [PATCH 5/7] write factorial of 16 in python. --- factorial.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 factorial.py diff --git a/factorial.py b/factorial.py new file mode 100644 index 0000000..88bd1d6 --- /dev/null +++ b/factorial.py @@ -0,0 +1,6 @@ +def factorial(n): + if n == 0: + return 1 + else: + return n * factorial(n - 1) +print(factorial(16)) \ No newline at end of file From 17b4b3f806e2551dad80da1e33dd1777565d1c2a Mon Sep 17 00:00:00 2001 From: Reshna Date: Thu, 7 Sep 2023 00:05:00 -0400 Subject: [PATCH 6/7] Use Camelcase for naming pyhton file. --- factorial.py => reshnashresthaFactorial.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename factorial.py => reshnashresthaFactorial.py (100%) diff --git a/factorial.py b/reshnashresthaFactorial.py similarity index 100% rename from factorial.py rename to reshnashresthaFactorial.py From 6094e0e4e4571c383787c3638aa950c0538186f5 Mon Sep 17 00:00:00 2001 From: Reshna Date: Fri, 8 Sep 2023 12:20:59 -0400 Subject: [PATCH 7/7] Change the file name to username. --- print.py => reshnashrestha.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename print.py => reshnashrestha.py (100%) diff --git a/print.py b/reshnashrestha.py similarity index 100% rename from print.py rename to reshnashrestha.py