Question: Please answer questions 3.8, 3.9, and 3.10 Exercise 3.8 How many integers 1 sa s 10000 are divisible by 2, 3, or 5? Exercise 3.9

 Please answer questions 3.8, 3.9, and 3.10 Exercise 3.8 How many

Please answer questions 3.8, 3.9, and 3.10

Exercise 3.8 How many integers 1 sa s 10000 are divisible by 2, 3, or 5? Exercise 3.9 Let V be a set with VI = k. What is the number of dicts d with len(d) == n and d.values() in V? 3.5 Maps Exercise 3.10 The values of the roman numerals are given by the dict {'M' :1000, 'D':500, 'C' :100, 'L':50,'X':10,'V':5,'I':1} Write a function highest that returns the index of the first occurance of the highest-value numeral: highest('XII') = 0, highest('CDLVCDXII') = 1. Write a function roman that translates a number from roman to decimal as fol- lows. In roman notation, numerals are initally written left to right in decreasing order, >>> roman('MCCLXII) = 1000 + 200 + 50 + 10 + 2 True Ir, however, a numeral has greater value than numerals in a block of numerals to its left, then that block is counted with a minus. Thus roman('IX') is -1 + 10 = 9, and >>> roman('MCLDII') == 1000 - (108+50) +500 + 2 True

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!