Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE SOLVE IN JAVA OR PYTHON 3!!! Kenny is in the market for a new pineapple adorned backpack. He goes to the store and decides
PLEASE SOLVE IN JAVA OR PYTHON 3!!!
Kenny is in the market for a new pineapple adorned backpack. He goes to the store and decides he wants the backpack with the most pineapples. You know which backpack has the most pineapples but must give Kenny directions to get there. The backpacks are laid out in aisles. Each aisle has a single backpack on it, and splits into three more aisles (it's not a very efficient store). The backpacks are numbered from 1 to infinity. The first aisle has backpack 1. If you turn left you get to backpack 2. If you had gone down the middle, you would have gotten to backpack 3, and if you turned right you would have gotten to backpack 4. The store looks something like this (but it is an infinite store, of course) 56789 10 11 12 13 Given a backpack number, give Kenny the directions to get there from the first aisle in terms of L for left, M for middle and R for right. Solutions are guaranteed in: Python 3 with more to come... Input Format The index of a backpack in the store to give directions to Constraints 0Step 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