Question: can some now how I can fix the error!? python 3.6 Define a function request_coordinate that asks the user first for an x and then
can some now how I can fix the error!?
python 3.6


Define a function request_coordinate that asks the user first for an x and then ay between 0 and 4 inclusive) then creates and returns an instance of Coordinate with the entered values. This function has no parameters. Use "while loops to ensure that x and y are both between 0 and 4. Your function should keep asking the user for an acceptable x value until one is entered, and then keep asking the user for an acceptable y value until one is entered. You may assume the user enters integers: if the user enters something other than an integeryour code need not behave sensibly. Be sure to cast to int! No assertEqual tests will be required for this function (though you should test it in idle) Answer: 1- def request_coordinateO: C-CoordinateO v1=int(input) 4 if v1==0: v1-0 6, while (v1 >=4) or (v1-0): vlint(inputO) 10 while v1-4 or v1 C. XV1 C.y=v2 return c Check
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
