Python Answers

Questions answered by Experts: 5 288

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

Define a variable called first_name which asks the user to enter their name


Define a variable called first_name which asks the user to enter their name


you have been an integer array A of size N.you need to pfint the number with the value closest to zero.if there are multiple elements print the number with greater value.





write python programming that will do the following

  1. import data from an external csv file

Write a Python program that retrieves values a, b, and c from the user,


calculates and prints the roots of a quadratic equation for any given values of a, b and c.



A teacher has taken exam of his students. He has stored marks in a dictionary where keys are the student's name and values are student's marks. Now he wants to know the name of students obtained minimum and maximum marks from this dictionary. You need to write a python function Find-min-max(A) which takes dictionary as input and returns the name of student pair having minimum and maximum marks in the class. If input dictionary is empty return "Invalid Input".

write a program to print in D days H hours M minutes S seconds

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.



simple code

Write a program to print the right alphabet tringle up to the given N rows.



Input



The input be a single line containing a positive integer(N).



Output



The output should bbe N rows with letters.



Note:there is a space after each letter.



Explanation:



For example, if the given number of rows is 4, your code should print the following pattern.



A



A B



A B C



A B C D



Input:



4



Output:



A



A B



A B C



A B C D

Write a python function Count_Freq(A) which take a dictionary containing numbers. The function will return a dictionary containing key as a number and value as frequency defining how many times the number is repeating in the dictionary.

Example-1

Example-2

Input:

{'V': 10, 'VI': 10, 'VII': 40, 'VIII': 20, 'IX': 70, 'X': 80, 'XI': 40, 'XII': 20}

 

Output:

({10: 2, 40: 2, 20: 2, 70: 1, 80: 1})

Input:

{'V': 10, 'VI': 10, 'VII': 10, 'VIII': 10, 'IX': 20, 'X': 30, 'XI': 40, 'XII': 20}

Output:

({10: 4, 20: 2, 30: 1, 40: 1})



LATEST TUTORIALS
APPROVED BY CLIENTS