Question: in python Exercise 3 - Count spaces (5 pts) Write a program that outputs the number of spaces contained in user input. The program should
in python

Exercise 3 - Count spaces (5 pts) Write a program that outputs the number of spaces contained in user input. The program should define a function count_spaces that takes as a parameter a string, and returns the count of spaces. The program should also define a function main that prompts the user for input and then calls count_spaces. main should output the count returned from count_spaces. Here's a sample run: User input: To be or not to be Program output: Your input contains 5 spaces
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
