There are two coding problems in this assignment, both of which are trying to solve the same problem: to define a function biggest_bed that consumes a string (representing a garden) and producing a string representing the biggest bed of flowers in that string. You can see an example garden below. Notice how garden is a single string with commas separating flowers of the same kind. Each group of flowers is a bed, and the goal of our function is to find the biggest (longest) bed. You can assume that all flowers in the bed are of the same type.
# Example garden
"πΉπΉ,π·π·,πΌπΌπΌ,π±π±π±π±π±,π³,πΈ,πΊπΊπΊπΊ,π»π»π»"
There are two extra difficulties to this function:
"π±"), since those are not yet fully grown."π³"), since that marks the edge of our property.In the example above, the answer would be "πΊπΊπΊπΊ", were it not for these rules. Instead, the answer would become "πΌπΌπΌ" since we ignore the row of seedlings and ignore everything past the tree.
The two coding problems already have a substantial amount of code and test cases provided for you. Unfortunately, each one has four small bugs. The bugs are all minor typos, and isolated to their own line. We might have changed a value, or deleted part of an expression, or moved variables around in a statement. The bugs are not the same between the two programs, because the programs solve the problem in two very different ways:
The test cases are all correct. Do not modify the test cases. The instructor test cases will include the test cases we give you, so modifying them wonβt help you!
You are free to work on either the first or the second coding problem, in whatever order you want. You might take a look at both, and tackle the one that you think is easier. We might also suggest that one version is easier than the otherβ¦