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
Step: 1
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