Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Write a function that takes two strings as arguments. The function should return the number of times the second argument appears in the
2. Write a function that takes two strings as arguments. The function should return the number of times the second argument appears in the first. 3. Write a function that takes a list and an integer argument. The function should return a new list with each of the values of the argument list multiplied by the value of the integer argument. 4. Write a program that uses a dictionary to keep track of the grades associated with students. The keys of the dictionary should be student IDs and the values should be a list of grades. The user should be able to repeatedly specify a student number and the grade to add. When the user enters "quit" for the student number, print out the average grade for each student that had at least 1 grade entered. 5. Write a function that takes two string arguments. The function should return a new string value that is equivalent to the first argument with all of the occurrences of the second argument removed. For example, if the inputs are "My catdog's breath smells like catdog food" and "dog", the returned value should be "My cat's breath smells like cat food".
Step by Step Solution
★★★★★
3.42 Rating (168 Votes )
There are 3 Steps involved in it
Step: 1
Here are the solutions to the provided tasks 1 Function to count occurrences of the second string in ...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