""" Write a program that reads the string and counts the number of '*' in the string. Write 2 solutions: one without functions (all in main) and one with functions (write a function count_star that has one parameter - string, function returns the number of '*' in the string) """ def count_star(str): count=0 for item in str: if(item=='*'): count+=1 return count def main(): str=input("enter string ") count=0 for item in str: if(item=='*'): count+=1 print("count",count) print("using function",count_star(str)) main()