From 56bc4616d96e23dfd3646494b4d76b490b25e9ef Mon Sep 17 00:00:00 2001 From: gdltosea <105324256+gdltosea@users.noreply.github.com> Date: Fri, 13 May 2022 23:35:23 -0700 Subject: [PATCH 1/5] update readme --- README.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f6a26f4..f3040ff 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,47 @@ # Project Title -One Paragraph of project description goes here. +This is a homework assignment for CNE 310 IT Project Management. When I execute this code it will draw a square and a triangle. ## Getting Started -These instructions will [do something] on your local machine for [development/experimentation/demo]. +These instructions will guide the turtles it introduces in Python on your local machine for experimenting how to draw some squares and triangles. ### Prerequisites -[Project] requires [software and version] to run, with [additional packages, libaries, or mods]. The commands below will [upgrade OS and install the prerequisites, or do something else] +A herd of turtle requires Python to run, with The commands below will form some figures in some shapes and colors. -``` -sudo apt update -sudo apt upgrade -sudo apt install package1 package2 ``` ## Running Once installed you can run the program with the following command +tess.forward(80) +tess.left(120) +tess.forward(80) +tess.left(120) +tess.forward(80) +tess.left(120) + ``` -python cna_demo.py + ``` Add any additional ways to run the program below ``` -python cna_demo.py test.txt +alex.forward(50) # make alex draw a square +alex.left(90) +alex.forward(50) +alex.left(90) +alex.forward(50) +alex.left(90) +alex.forward(50) +alex.left(90) + + + + ``` ## Thanks -Provide thank yous and attributions here. If someone helped you, you looked at another repository, or another article, provide it here. +I would like to thank you to Doc McDowell who is my classmate who helped me out with this assignment. From 40d58dc8403abd9f9aa53d2bbd0182b136cda5bc Mon Sep 17 00:00:00 2001 From: gdltosea <105324256+gdltosea@users.noreply.github.com> Date: Tue, 24 May 2022 13:00:12 -0700 Subject: [PATCH 2/5] Add Debug2.py --- Debug2.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Debug2.py diff --git a/Debug2.py b/Debug2.py new file mode 100644 index 0000000..84adda2 --- /dev/null +++ b/Debug2.py @@ -0,0 +1,47 @@ +@@ -1,27 +1,21 @@ +def score_to_letter_grade(grade): + if grade > 90: + return "A" + elif grade >= 87: + return "B+" + elif grade == 80: + return "B" + elif grade >= 77: + return "C+" + elif grade <= 70: + return "C" + elif grade >= 67: + return "D+" + elif grade >= 60: + return "D" +#function given in the question +def lone_sum(a, b, c): + #sum contain the sum of 3 values in a,b and c + sum = a + b + c + if a >= b: + return c + elif a == c: + return b + elif b == c: + return a + elif a == b and a == c and b == c: + return 0 + else: + return "F" + return sum + + +print("Grade of 90 should be A: " + score_to_letter_grade(90)) +print("Grade of 87 should be B+: " + score_to_letter_grade(87)) +print("Grade of 81 should be B: " + score_to_letter_grade(81)) +print("Grade of 77 should be C+: " + score_to_letter_grade(77)) +print("Grade of 70 should be C: " + score_to_letter_grade(70)) +print("Grade of 67 should be D+: " + score_to_letter_grade(67)) +print("Grade of 60 should be D: " + score_to_letter_grade(60)) +print("Grade of 59 should be F: " + score_to_letter_grade(59)) +#input the values of a, b and c from the user +a=int(input("Enter the value of a :")) +b=int(input("Enter the value of b :")) +c=int(input("Enter the value of c :")) +#function call +print(lone_sum(a,b,c) ) From 7b4dd07589c8f128c522dd2aa01f3f3bf1ca6ca8 Mon Sep 17 00:00:00 2001 From: gdltosea <105324256+gdltosea@users.noreply.github.com> Date: Tue, 24 May 2022 16:25:58 -0700 Subject: [PATCH 3/5] Add Debug.py --- debug.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 debug.py diff --git a/debug.py b/debug.py new file mode 100644 index 0000000..ad0184d --- /dev/null +++ b/debug.py @@ -0,0 +1,21 @@ +#function given in the question +def lone_sum(a, b, c): + #sum contain the sum of 3 values in a,b and c + sum = a + b + c + if a >= b: + return c + elif a == c: + return b + elif b == c: + return a + elif a == b and a == c and b == c: + return 0 + else: + return sum + +#input the values of a, b and c from the user +a=int(input("Enter the value of a :")) +b=int(input("Enter the value of b :")) +c=int(input("Enter the value of c :")) +#function call +print(lone_sum(a,b,c) ) From d022e1a17b7da3c4bd0f92bd4932f6409c728bb1 Mon Sep 17 00:00:00 2001 From: GnosisGrain <103087417+GnosisGrain@users.noreply.github.com> Date: Tue, 24 May 2022 19:08:03 -0700 Subject: [PATCH 4/5] Commit Request --- .gitattributes | 2 ++ debug.py | 16 ++++++++++++++++ debug2.py | 27 +++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .gitattributes create mode 100644 debug.py create mode 100644 debug2.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/debug.py b/debug.py new file mode 100644 index 0000000..040a603 --- /dev/null +++ b/debug.py @@ -0,0 +1,16 @@ +def lone_sum(a, b, c): + if a >= b: + return c + elif a == c: + return b + elif b == c: + return a + elif a == b and a == c and b == c: + return 0 + else: + return a+b+c + +print("lone_sum of 10, 10, 10 should be 0: " + str(lone_sum(10, 10, 10))) +print("lone_sum of 1, 2, 3 should be 6: " + str(lone_sum(1, 2, 3))) +print("lone_sum of 1, 2, 1 should be 2: " + str(lone_sum(1, 2, 1))) +print("lone_sum of 4, 5, 6 should be 15: " + str(lone_sum(4, 5, 6))) diff --git a/debug2.py b/debug2.py new file mode 100644 index 0000000..01fade0 --- /dev/null +++ b/debug2.py @@ -0,0 +1,27 @@ +def score_to_letter_grade(grade): + if grade > 90: + return "A" + elif grade >= 87: + return "B+" + elif grade == 80: + return "B" + elif grade >= 77: + return "C+" + elif grade <= 70: + return "C" + elif grade >= 67: + return "D+" + elif grade >= 60: + return "D" + else: + return "F" + + +print("Grade of 90 should be A: " + score_to_letter_grade(90)) +print("Grade of 87 should be B+: " + score_to_letter_grade(87)) +print("Grade of 81 should be B: " + score_to_letter_grade(81)) +print("Grade of 77 should be C+: " + score_to_letter_grade(77)) +print("Grade of 70 should be C: " + score_to_letter_grade(70)) +print("Grade of 67 should be D+: " + score_to_letter_grade(67)) +print("Grade of 60 should be D: " + score_to_letter_grade(60)) +print("Grade of 59 should be F: " + score_to_letter_grade(59)) \ No newline at end of file From fec3abb4dea41691dc6f8e28606268fbc5c5f3e9 Mon Sep 17 00:00:00 2001 From: GnosisGrain <103087417+GnosisGrain@users.noreply.github.com> Date: Tue, 31 May 2022 12:17:05 -0700 Subject: [PATCH 5/5] Update debug.py --- debug.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/debug.py b/debug.py index eafbd49..040a603 100644 --- a/debug.py +++ b/debug.py @@ -1,9 +1,4 @@ - -#function given in the question def lone_sum(a, b, c): - #sum contain the sum of 3 values in a,b and c - sum = a + b + c - if a >= b: return c elif a == c: @@ -13,13 +8,9 @@ def lone_sum(a, b, c): elif a == b and a == c and b == c: return 0 else: + return a+b+c - return sum - -#input the values of a, b and c from the user -a=int(input("Enter the value of a :")) -b=int(input("Enter the value of b :")) -c=int(input("Enter the value of c :")) -#function call -print(lone_sum(a,b,c) ) - +print("lone_sum of 10, 10, 10 should be 0: " + str(lone_sum(10, 10, 10))) +print("lone_sum of 1, 2, 3 should be 6: " + str(lone_sum(1, 2, 3))) +print("lone_sum of 1, 2, 1 should be 2: " + str(lone_sum(1, 2, 1))) +print("lone_sum of 4, 5, 6 should be 15: " + str(lone_sum(4, 5, 6)))