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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
47 changes: 47 additions & 0 deletions Debug2.py
Original file line number Diff line number Diff line change
@@ -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) )
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions debug.py
Original file line number Diff line number Diff line change
@@ -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)))
27 changes: 27 additions & 0 deletions debug2.py
Original file line number Diff line number Diff line change
@@ -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))