Skip to content

Commit 9d40652

Browse files
Add files via upload
1 parent 334074f commit 9d40652

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
3+
4+
5+
myList = [i for i in range(1, 101)]
6+
newList = myList[:90]
7+
newList.pop()
8+
#print(newList)
9+
newList.append(91)
10+
newList.append(92)
11+
#print(newList)
12+
#print(len(newList))
13+
#print(sum(newList))
14+
15+
16+
def findMissingNum(array, lenArray):
17+
sum1 = 92 * 93 / 2
18+
#print(sum1)
19+
sum2 = sum(array)
20+
#print(sum2)
21+
val = sum1 - sum2
22+
if(sum1 == sum2):
23+
return True
24+
else:
25+
print(val)
26+
27+
28+
findMissingNum(newList, 91)
29+
30+
31+
32+
happily move smoothly without noise or effort like a wind

0 commit comments

Comments
 (0)