Manually implement a function that finds the smallest value in a list of integers and print it.

def findMin(list): min = list[0] for i in range(1, len(list)): if list[i] < min: min = list[i] print(min)

Answered by Daniel H. Python tutor

1768 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Write a function with arguments r, dr that will return a 2D array of size (r/dr, r/dr). In the array "draw" two circles and assign them a value of 1. Separate the two circles by adding a nan circle of equal width.


Describe both For-loops and While-loops and explain how you can simulate the effect of a for loop with a while loop with an example.


Write a basic program to output the lowest of 3 input numbers. (You may omit error checks on your inputs)


Make a program that asks the user for a series of numbers until they either want to output the average or quit the program.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy