W3_Preworkshop.T1

PHOTO EMBED

Sat Jan 07 2023 05:51:12 GMT+0000 (Coordinated Universal Time)

Saved by @Shaghaf_2000 #python

# This  program that will identify the smallest value in a list of items:

values = [3005,9117,8474,2513,7004,7248,8669,9234,5428,7812,711,3908,5748,969,3296,589,2216,1792,4593,6888,2554,111,8455,8000,9158,2546,1757,6620,375,1521,9712,7185,5841,5699,9175,4525,4157,1622,8131,2736,4735,7740,1261,6249,423,7362,5653,3966,5016,8195,3465,294,7675,3075,7193,6348,2272,30,6390,2976,9344,1565,6988,2458,5365,4121,1695,4752,3251,4600,8490,5179,9572,7384,2990,9094,4746,6487,5948,8607,9311]
minVal = values[0]
# to make sure that the first value is the smallest value, I should compare it whith every single element in the list
for item in values:
    if item<minVal:
        minVal=item
    

print(f"Minimum value in list is {minVal}")
content_copyCOPY