BULLS = number of digits that appear in the same positions in the two numbers. COWS = number of digits that appear in both the numbers, but at different positions.For example, if the two numbers were 2367 and 1327, we have 2 BULLS (for the exact matches for digits 3 and 7) and 1 COW (for the remaining common digit 2 which is in different positions in the two numbers). If the numbers were 9852 and 8926, we have 0 BULLS and 3 COWS and if the numbers were 1234 and 4321, we have 0 BULLS and 4 COWS. It is quite clear that if the two numbers are the same, we have 4 BULLS and 0 COWS.
Implement the following functions in Python:
Enter the number of seconds for robot to move: Enter the maximum number of stalls before quitting (at most 5):
I am stuck for the first time. I am stuck for the second time. I am stuck for the third time. I am stuck for the fourth time. I am stuck for the fifth time.After speaking the message, the robot should move backward at full speed for 0.5 seconds and then turn left or right (chosen randomly) for a random amount of time between 0 and 1 seconds. After which it continues to move forward at full speed.
Enter the number of seconds for robot to move: 15 Enter the maximum number of stalls before quitting (at most 5): 3 I am stuck for the first time. I am stuck for the second time. Enter the number of seconds for robot to move: 5 Enter the maximum number of stalls before quitting (at most 5): 3 I am stuck for the first time. Elapsed Time: 27.3323 seconds Drop in battery voltage: 0.03765 voltsEmail your submissions to raj@cs.gsu.edu (Bulls.py and RandomMoves.py) by midnight of the due date to receive full credit. Note: Bulls.py is an independent assignment - so, each of you will submit this independently; RandomMoves.py should be submitted one per group.
IMPORTANT: Please include "CSc 2010 Bulls.py" and "CSc 2010 RandomMoves.py" in the SUBJECT of your email.