Computer Science, asked by kritipareek0, 2 months ago

Create a dictionary ‘ODD’ of odd numbers

between 1 and 10, where the key is the

decimal number and the value is the

corresponding number in words. Perform

the following operations on the dictionary:



i) display the keys

ii) display the values

iii) check if 7 is present or not​

Answers

Answered by Ng33
3

ODD={1.0:'One',3.0:'Three',5.0:'Five',7.0:'Seven',9.0:'Nine'}

>>> ODD.keys()

dict_keys([1.0, 3.0, 5.0, 7.0, 9.0])

>>> ODD.values()

dict_values(['One', 'Three', 'Five', 'Seven', 'Nine'])

7.0 in ODD

True

Similar questions