You must write this assignment starting with Template for Simple Programs 60% by correct operation and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
Selfdriving cars navigation system simulation Initial coordinates of the car currentx 50 currenty 50 ... View the full answer
Related Book For
Financial Accounting and Reporting a Global Perspective
ISBN: 978-1408076866
4th edition
Authors: Michel Lebas, Herve Stolowy, Yuan Ding
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The school district in Problem 3-46 wishes to impose an additional constraint on the problem: It wants to enroll the same number of students in each of the three schools. Solve for the revised...
-
With regard to the potential change to account for most leases on the balance sheet under ASC842, provide the following: What would be the impact on the financial statements of Delta Airlines, Inc....
-
Given: MIII; Prove: M Use the definitions and postulates given in Example 2 to prove the theorems in Problems 914. Give both statements and reasons.
-
Find (a) The focal length and (b) The power of a lens that will produce an image at 80 cm from the eye of a book that is 30 cm from the eye.
-
Spending on Medicare and Social Security is expected to grow over the next few decades as the share of the population who are elderly grows. Explain why an aging population increases government...
-
Plaintiff purchased stain and paint from defendant that, upon application, presented significant issues: discoloration and cracking. These issues became apparent 30 days after receipt of the...
-
The following events and transactions relate to a single contribution. 1. A high-tech rm pledged to contribute $1 million in the company's common stock to a university's business school if the school...
-
Ruler Formula Bar Normal Page Break Page Custom Preview Layout Views Gridlines Headings Zoom 100% Zoom To Selection Window Macros Workbook Views Show Zoom Macros A A1 V A B D E F G H 4 Assume That...
-
20. What is the IPv6 address of the computer making the DNS AAAA request? This is the source address of the 20th packet in the trace. Give the IPv6 source address for this datagram in the exact same...
-
Arrange the following in order of increasing oxidation number of the carbon marked with asterisk *H H I HC=C IV
-
Cray Computing needs a 6 - month loan for $ 3 0 0 , 0 0 0 . Its bank quotes a simple interest rate of 1 1 % on the loan. a . ) What is the annual percentage rate ( APR ) if there is a compensating...
-
A mass of 0.5 kg hangs motionless from a vertical spring whose length is 0.81 m and whose unstretched length is 0.62 m. Next, the mass is pulled down to where the spring has a length of 0.93 m and...
-
In April, the Sparky corporation had $200,000 of sales. 89% of these sales were credit sales and the rest were cash sales. For credit sales, 20% are typically paid by customers in the month following...
-
If you deposit $ 1 , 0 0 0 per month for 4 years in an account earning 6 % annually, what will you save by the end of year 4 assuming end of the period payments?
-
O. A seller wanted to net $20,000 on the sale of property. The seller had a first mortgage on the property of $61,800. The broker charged a 7% commission with the seller also having to pay $2,000 in...
-
Modeling with exponential functions. The town of Tinyville has been growing at a steady rate for many years now. Its population at the end of the last three years is indicated in the table below. The...
-
A number of years ago the United Food and Commercial Workers Union organized 800 workers of the 1035 employees at one of the Wilson Brothers food operations in Toronto, Ontario. The employees include...
-
Multiple Choice Question Select the right answer (only one possible answers unless otherwise stated). 1 An example of an item that is not an intangible asset is (a) Patent (b) Goodwill (c) Computer...
-
NorthWest Boards and Bikes sells and rents skis and snowboards in the winter and bicycles during the whole year. The following data appear in the balance sheet or have been gathered by the chief...
-
You will find below in Exhibits 1 and 2 the balance sheets and income statements from eight different companies.
-
Describe how competence, caring, and character affect your credibility as a communicator.
-
Explain the importance of establishing credibility for business communications.
-
Define and explain business ethics, corporate values, and personal values.
Study smarter with the SolutionInn App