Main.Lab2 History
Hide minor edits - Show changes to markup
String length comparison
Write a function called string_length_compare that receives two strings as its parameters and return True if they have the same length, and False otherwise. The length of a string is determined using the len built in function. For example:
(:source lang=python:) >>> len("python") 6 (:sourceend:)
Lab 2
Objectives:
- Practice the use of functions and conditionals
Maximum of two numbers
Write a function called max2 that returns the maximum of two numbers
Maximum of three numbers
Write a function called max3 that returns the maximum of three numbers.
Write two versions of this function: one that does this directly, and one that uses the function max2.
