Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write in Python 3 In the book All Creatures of Mythology, gnomes are kind, bearded creatures, while goblins tend to be bossy and simple-minded.
Please write in Python 3
In the book All Creatures of Mythology, gnomes are kind, bearded creatures, while goblins tend to be bossy and simple-minded. The goblins like to harass the gnomes by making them line up in groups, ordered by the length of their beards. The gnomes, being of different physical heights, vary the size of the groups and their arrangements to confuse the goblins. Therefore, the goblins must actually measure the beards in centimeters to see if everyone is lined up in order Your task is to write a program to assist the goblins in determining whether or not the gnomes are lined up properly from shortest beard length to longest. Input The beard lengths of a group of gnomes all appear in a single line separated by spaces. Output Should be "Ordered" if they are standing in order of increasing beard length and "Unordered" otherwise. There should be no other output Example sessions 80 62 77 Unordered 50 75 100 200 Ordered 20 25 30 35 40 50 45 UnorderedStep 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