You must create a function that takes a string as its sole input parameter. A string is the only return from the function. Using the input string as a basis, the function should generate a filename. This will be accomplished by capitalizing the initial letter and replacing each space in the string with an underscore, i.e. (" _ "). The function should return the newly formed filename. this code below generates filename elif command == "5": # filename = make_filename5(place) print(filename) an example would be: 'Dubai, Iraq, 2021' -------> make_filename5 ------->'Dubai,_iraq,_2021' 'spain is beautiful' ------> make_filename5 ------->'Spain_is_beautiful' 'America' ------> make_filename5 -------> 'America'
You must create a function that takes a string as its sole input parameter. A string is the only return from the function. Using the input string as a basis, the function should generate a filename. This will be accomplished by capitalizing the initial letter and replacing each space in the string with an underscore, i.e. (" _ "). The function should return the newly formed filename.
this code below generates filename
elif command == "5":
#<you will write this function here>
an example would be:
'Dubai, Iraq, 2021' -------> make_filename5 ------->'Dubai,_iraq,_2021'
'spain is beautiful' ------> make_filename5 ------->'Spain_is_beautiful'
'America' ------> make_filename5 -------> 'America'
elif command == "5":
<you will write this function here >
filename = make_filename1(place)
print(filename)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)