Skip to content

Commit 0929dab

Browse files
committed
Add comments
1 parent 263e612 commit 0929dab

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

factorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# def multiply(a, b):
2-
# return a * b
3-
#
1+
#A function that returns the factorial of a number.
2+
3+
44
# def factorial(x):
55
# return map(multiply, range(1, x+1))
66

sheep.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
#A function that counts how many sheep(true) are in the array.
2+
13
# def count_sheeps(array_of_sheeps):
24
# count = [0]
35
# for True in array_of_sheeps:
46
# count += 1
57
# print count
68

9+
710
array1 = [True, True, True, False,
811
True, True, True, True ,
912
True, False, True, False,

triangle.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
# def isTriangle(a,b,c):
2-
# if a + b > c:
3-
# print "Is a Triangle"
4-
#
5-
# elif b + c > a:
6-
# print "Is a Triangle"
7-
#
8-
# elif a + c > b:
9-
# print "Is a Triangle"
10-
#
11-
# else:
12-
# print "Not a Triangle"
13-
#
14-
# isTriangle(4, 4, 4)
1+
2+
#A function that takes 3 inputs and determines if they can form a triangle
153

164
a=input()
175
b=input()

0 commit comments

Comments
 (0)