This is my second guided project. Have a couple questions:
When printing the results, the numbers are all over the place. I tried to sort the numbers but did not know how to do it properly when there is a string in front of the number. I did some research and came across this following code online:
So this is the correct answer, which returned 3rd and 4th answer as False.
However, if I use else , it would give a different answer. (I thought else , and returning outside of the if statement would give the same answer.)
Had lots of fun doing this project. Looking forward to the next one!
Thank you for dropping by this post and would greatly appreciate if you could answer my questions.
Thank you for your reply!
When analyzing the results, I find it hard to read the numbers, so I wanted to return the results based on the numbers in ascending or descending order .
However, I don’t know how to sort it so that it would return[category, “:” , numbers that I want to sort]
So I attempted to turn the list into a tuple and sort it that way.