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)

DH

Related Python Mentoring answers

All answers ▸

Create an algorithm that can be used as a guessing game. Make sure to import random at the start.


Write a program that takes a value x and then outputs x Fibonnaci numbers. E.g. if x=6 output would be 1 1 2 3 5 8


Explain how you would write a python program that takes a rectangle and a point in a 2D space as command-line arguments and checks if they intersect.


[Exam style] Python is an interpreted language. Explain what this means and how interpreted languages differ from compiled languages.