Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python program:Write a function microcar which accepts two inputs. The two inputs are two lists of strings containing names of CSV files the first list

Python program:Write a function microcar which accepts two inputs. The two inputs are two lists of strings containing names of CSV files the first list contains the names of the files containing the instructions for each microcar and, the second list contains the names of the files containing the actual actions of each care corresponding to the instructions provided to them.

The two csv files will contain lines in the following format: Action, time, speed - where each action will be specified as:

N, t, s = Move North for t seconds with speed s meters per second

E, t, s = Move East for t seconds with speed s meters per second

W, t, s = Move West for t seconds with speed s meters per second

S, t, s = Move South for t seconds with speed s meters per second

The function will return six numpy arrays:

The expected horizontal displacements for each microcar

The expected vertical displacements for each microcar

The actual horizontal displacements for each microcar

The actual vertical displacements for each microcar

The expected distances traveled by each microcar

The actual distances traveled by each microcar

All displacements and distances are to be presented in meters and rounded to 2 decimal places for the final returned lists. Keep the data rounded to at least 10 decimal places for all intermediate computations.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

Explain why non-relational databases are useful.

Answered: 1 week ago