Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You must write this assignment starting with Template for Simple Programs 60% by correct operation and up to 40% with good style, readability, and
You must write this assignment starting with Template for Simple Programs 60% by correct operation and up to 40% with good style, readability, and documentation. Problem Summary .py. You earn up to Create a Python program that simulates a self-driving car's navigation system. Steps Start by assigning the initial coordinates of the car to variables `current_x` and `current_y', representing the car's position on a map. Implement a list of movement commands (e.g., north, south, east, west) as strings. Use a loop to iterate over the list of movement commands. Inside the loop, update the `current_x` and `current_y` variables based on the current movement command. For example, if the command is "north," increase the value of `current_y' by a specific distance. Specify the distance with a constant and use it in your statements. Define its value to be 7. Implement boundary checks to ensure the car doesn't go off the map. Set a boundary where `current_x` can range from 0 to 100, and `current_y` can range from 0 to 100. If the car tries to move beyond these limits, print an appropriate message but continue moving. After each movement, print the car's current coordinates. Instead of the literal value of 100, define a constant to be 100 and use it in your statements. Use the template, use good variable names, comments, and generally good style. Follow the requirements in Style Requirements.pdf, posted in Blackboard: in particular, be sure to declare all variables, use block closers. Special Notes: 1. Do not use functions, exceptions, dictionaries, or any other features from chapters beyond Chapter 4, even if you know how to use them. 2. You may use lists, since we did have a limited discussion about them when learning for-in loops. You may also use the upper() and lower() string methods that we borrowed from chapter 8. 3. The purpose of this assignment is to test your skills with the topics we have covered in this class; later exercises will assess your skills with the post-chapter 4 topics. Using more advanced features demonstrates that you don't know the simpler tools well enough, which will lower your score. 4. Code that is identical to another person's code (ignoring changes in spacing or other trivial adjustments) is considered evidence of cheating and all identical code submissions receive a score of 0 on the assignment. 5. If you use code from the Internet, and another student does as well, it could result in parts of your submissions being identical. It's not my job to understand how that happened. Please use Internet examples to inform your code, but do not copy it exactly.
Step by Step Solution
★★★★★
3.43 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
Selfdriving cars navigation system simulation Initial coordinates of the car currentx 50 currenty 50 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started