Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function print _ steps ( walks , name ) that takes a dictionary walks mapping people's names to ( distance , step _
Write a function printstepswalks name that takes a dictionary walks mapping people's names to distance steplength tuples and a name from that dictionary, and prints the number of steps that person walked.
Distances and step lengths are both in metres, so you can calculate the number of steps using:
stepsdistancesteplength
The number of steps should be printed to the nearest whole number.
For example:
Test Result
walks
"Angus McGurkinshaw":
"Bobert Buckingdale":
"Suzan Smith":
"Jackie Jean":
printstepswalks "Angus McGurkinshaw"
Angus McGurkinshaw:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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