Program Flowchart
Program Flowchart
START
word = s.split()
max_length = -1
if choice == "1"
YES longest = ""
for word in words:
print(f"Longest word:
'{longest}' with length
if len(word) > max_length:
{max_length}.")
max_length = len(word)
longest = word
NO
min_length = float('inf')
shortest = ""
NO
YES found = []
for word in words:
print("Words starting with
if choice == "3" 'a':", ", ".join(found) if found
if word.startswith("a"):
else "None")
found.append(word)
NO
YES
present = False
for word in words: print("Word found!" if present
if choice == "4"
if word == search_word: else "Word not found!")
present = True
break
YES
word_count = {}
for word, count in for word in words:
word_count.items():
print(f"'{word}':
if word in word_count:
word_count[word] += 1
if choice == "8" NO
{count} occurrence(s)") else:
word_count[word] = 1
YES reversed_words = []
print("Reversed words:", "
if choice == "5" for word in words:
".join(reversed_words))
reversed_words.append(word[::-1])
NO
NO
print("Program terminated.
print("Invalid input! Please
if choice == "11" Goodbye!")
choose a valid option.")
break
STOP
https://whimsical.com/program-flowchart-6z6qNaZmmEgrhuppP5PycC 1/1