Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write the Python code of a program that reads an integer, and prints the integer if it is NOT a multiple of 2 OR NOT a multiple of 5.

Write a python function C-F(X) which takes a dictionary containing numbers as input. The function will return a dictionary containing key as a number and value as frequency of how many times the number is repeating in the dictionary. For Ex: 1) {'V': 10, 'VI': 10, 'VII': 40, 'VIII': 20, 'IX': 70, 'X':80, 'XI': 40, 'XII': 20 } is input , then output is { 10: 2 , 20: 2 , 40:2 , 70: 1 }.


2) input: {1: 10, 2: 20, 3: '30', 4: '10', 5: 40, 6: 40} output: {10: 1, 20: 1, '30': 1, '10': 1, 40: 2} .


Function should be general and should work for any finite items dictionary.

write a python function Find_Min_Max(A) (Refer RollNo_W9B_2.py ) which takes a dictionary as input parameter and return the name of student pair having minimum and maximum marks in the class

writing a python function Convert_Dict(A) (Refer RollNo_W9B_1.py )function which take a dictionary as an input and convert it into list of lists

Write a program that draws the three shapes as illustrated in figure 4.2. Think about the concept of composition discussed in chapter 3. Create several smaller functions to perform the basic tasks. Use those functions to build more complicated functions until you have achieved the stated goal.


Describe the difference between a chained conditional and a nested conditional. Give your own example of each.


Lowest and highest score. The teacher gave out the scores of the science quiz conducted last week and asked the ones with the lowest and highest scores to group up. Print the names of the students with minimum and maximum scores, respectively.



Note: In case of a tie, choose the name which comes first in the (dictionary order).



Input : 2



shakti 24



disha 26



output: shakti disha



input: 3



ajay 23



bijay 24



sanjay 23



output: ajay bijay

On Sunday, Sunil went to the D-Mart with his family. All the family members of Sunil buy many items as per their need. At the payment counter Sunil paid 5000 Rs. After payment Sunil came home and now, he wants to analyse the top three item he bought from the D-Mart. You need to write a python function Top_Price(A)which takes a dictionary containing all items with their prices and return a string containing top-3 item names and their prices as shown in the example

 

Example-1

Example-2

Input:

{'item1': 45.50, 'item2':35, 'item3': 41.30, 'item4':55, 'item5': 24}

 

Output:

item4-55

item1-45.5

item3-41.3

Input:

{'item1': 105.50, 'item2':325, 'item3': 411.30, 'item4':5.4, 'item5': 24.7}

 

Output:

Item3-411.30

Item2-325

Item1-105.50



write a python function Top_Price(A) (Refer RollNo_W9A_2.py ) which takes a dictionary containing all items with their prices and return a string containing top-3 item names and their prices

Write a Python class named Product which has attributes product_id, product_name,

number of items. Include the constructor and other required methods to set and get the

class attributes. The class should have 2 additional methods to add and remove products from the inventory. If the number of items for a product in the inventory is less than zero, the user should be notified with a print message stating, “Product is out of stock”. Create 2 instances of the class and display all its associated attributes.


I want very simple code