Question: Explain what the below Python code does? nums=[15,9,22,330,2,102,490,87,101] mx=nums[0] for na in range(1,len(nums)): if nums[na]>mx: mx=nums[na] print(The value of mx is ,mx)
Explain what the below Python code does?
nums=[15,9,22,330,2,102,490,87,101]
mx=nums[0]
for na in range(1,len(nums)):
if nums[na]>mx:
mx=nums[na]
print("The value of mx is ",mx)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
