Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . [ 3 0 points ] Implement the function has _ duplicates _ word _ finder ( ) . Input will be given a
points Implement the function hasduplicateswordfinder Input will be given a
positive integer n then a list contains n elements that each containing a string. Output should
be either True if there are any duplicates among these strings or False if there are not. Your
code should work well on long lists of strings. For example, input spring summer, fall,
summer, winter will return True; input spring summer, fall, winter will return False.
Hint: You need to program an users input on the integer and the words You might
use set in python.
points Implement the function sortflowers Input will be given a positive integer n
then a list contains n elements that each containing a flower name string which always
starts with capital letter egRose but not rose The program should sort the flower
names in Alphabetical order. In this exercise you can assume that the capital letters of flower
names are all different. You can make your choice to use any one of sorting algorithm from
bubble sort, selection sort or insertion sort. For example, input Rose Lily, Tulip will
return Lily Rose, Tulip
points In this problem, your task is to complete the reverselist function. You will
write a function to reverse a list of integers. Your algorithm must use O space beyond the
input any algorithms that use space not in O will receive half credit at most You may
not use any library functions in this question any solutions that do will receive zero credit
Your program should accept input as a list of integers and output another list of integers that
contains the original elements in reversed order. For example, the input
should result in printing the output PY points Implement the function hasduplicateswordfinder Input will be given a
positive integer then a list contains elements that each containing a string. Output should
be either True if there are any duplicates among these strings or False if there are not. Your
code should work well on long lists of strings. For example, input spring summer, fall,
summer, winter will return True; input spring summer, fall, winter will return False.
Hint: You need to program an user's input on the integer and the words You might
use set in python.
points Implement the function sort flowers Input will be given a positive integer
then a list contains elements that each containing a flower name string which always
starts with capital letter eg "Rose", but not "rose" The program should sort the flower
names in Alphabetical order. In this exercise you can assume that the capital letters of flower
names are all different. You can make your choice to use any one of sorting algorithm from
bubble sort, selection sort or insertion sort. For example, input Rose Lily, Tulip will
return Lily Rose, Tulip
Step 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