Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Correct my code so it effectively gives me the desired output of PP 0 2 0 1 2 0 0 6 4 location = input

Correct my code so it effectively gives me the desired output of PP020120064 location = input('WWRRCCCSSSH')
warehouse = location[0:2]
room = location[2:4]
column = int(location[4:7])+2
shelf = int(location[7:10])-4
height = location[10:]
new_location = warehouse + room + str(column).zfill(3)+ str(shelf).zfill(3)+ height
print(new_location)

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

How do you best re-energize?

Answered: 1 week ago