Answer to Question #247142 in Python for Reddy

Question #247142
A company wishes to bucketize their item ids for better search operators.the bucket for the item id is chosen on the basis of the maximum value of the digit in the item id write an algorithm to find the bucket to which the item id will be assigned.
1
Expert's answer
2021-10-05T23:13:33-0400
itemID = input(">")
bucket = itemID[0]
for item in itemID:
    if item > bucket:
        bucket = item
print(bucket)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS