Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help with coding this. I have no idea how to even approach the problem. W

ID: 3564472 • Letter: P

Question

Please help with coding this. I have no idea how to even approach the problem. Whatever help one can give will be greatly appreciated. Thanks.

Start with a variable named myList. myList will have the numbers 1, 9, 16, and 24 in it, in that order. Add this line to the top of your code:

Prompt the user for a single integer, and insert that number into myList in such a way that myList is still in order (use the insert() or append() function). You can assume the number will not be in the list already. For example:

Or:

You may not use the python built in sort function for this.

Explanation / Answer

def main(): # variables width and height width = 0 height = 0 # Takes input from user for variables width = int(input("Please enter the width: ")) height = int(input("Please enter the height: ")) i = 0 max_num = width * height while i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote