Question: Python: 1.Write a function letter_count that takes a string argument and returns a dictionary of the number of times each letter occurs in the string,

Python:

1.Write a function letter_count that takes a string argument and returns a dictionary of the number of times each letter occurs in the string, ignoring case.

2. Write a function both_strings that takes 2 string arguments and returns a set consisting of the letters that are contained in both strings, ignoring case.

3. Write a function repeats_num that takes a list of ints and returns True if the list contains a number that appears twice in a row.

4. Write a function order_summary that takes a list of order details as (item, price, quantity) tuples, and returns a (cost, number) pair representing the total cost of the order and the total number of items.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!