Skip to content

Commit 568c030

Browse files
committed
added files
1 parent 725af35 commit 568c030

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

min_value.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python3
2+
3+
# Created By: Luke Di Bert
4+
# Date: May 20, 2025
5+
6+
# adds random module
7+
import random
8+
9+
10+
def min_value(array):
11+
min_value = 100
12+
for counter in range(0, len(array)):
13+
if array[counter] < min_value:
14+
min_value = array[counter]
15+
return min_value
16+
17+
18+
def main():
19+
rand_num_array = []
20+
for counter in range(0, 10):
21+
rand_num_array.append(random.randint(0, 100))
22+
print(rand_num_array[counter], "was added to the array")
23+
minimum_value = min_value(rand_num_array)
24+
print("The minimum value is", minimum_value)
25+
26+
27+
if __name__ == "__main__":
28+
main()

0 commit comments

Comments
 (0)