Question: Please Solve using python programming. 1.Cost of Postage The original postage cost of airmail letters was 5 cents for the first ounce and 10 cents
Please Solve using python programming.
1.Cost of Postage The original postage cost of airmail letters was 5 cents for the first ounce and 10 cents for each additional ounce. Write a program to compute the cost of a letter whose weight is given by the user. See Fig. 4.11. The cost should be calculated by a function named cost. The function cost should call a function named ceil that rounds noninteger numbers up to the next integer.
Enter the number of ounces: 4 Cost: $0.35
2. Anagrams An anagram of a word or phrase is another word or phrase that uses the same letters with the same frequency. Punctuation marks, case, and spaces are ignored. Some examples of anagram pairs are angered/enraged and A gentleman/Elegant man. Write a program that requests two words or phrases as input and determines if they are anagrams of each other. See Fig. 4.13. The program should use a Boolean-valued function with header
def areAnagrams(string1, string2):
that returns True when the two strings are anagrams, and otherwise returns False.
Enter the first word or phrase: Elvis Enter the second word or phrase: lives Are anagrams.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
