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

List=[1,2,2,3,4,5]


Using break or continue condition find frequency of each element in List without using any other functions like append, count or dictionaries.

Swap Letters

Input: Python is a programming language

output: Python is e progremming lenguega


A palindrome is a string that reads the same forwards as backwards. Using only a fixed number of stacks and queues, the stack and queue ADT functions, and a fixed number of int and char variables, write an algorithm to determine if a string is a palindrome. Assume that the string is read from standard input one character at a time. The algorithm should output true or false as appropriate.


Given an array storing integers ordered by value, modify the binary search routine to return the position of the first integer with value K in the situation where K can appear multiple times in the array. Be sure that your algorithm is that is, do not resort to sequential search once an occurrence of K is found.


Prof. Abhiram has taken an exam of his students. He has stored the marks of students in a dictionary where keys are the student’s name and values in the dictionary are student 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 a dictionary as input parameter and return the name of student pair having minimum and maximum marks in the class as shown in the example.


 

Example-1

Example-2

Input:

{'Theodore': 19, 'Roxanne': 22, 'Mathew': 21, 'Betty': 20}

 

Output:

('Theodore', 'Roxanne')

Input:

{'Roudy': 9, 'Alexa': 2, 'Prett': 18, 'Holmes': 22}

 

Output:

('Alexa', 'Holmes')



Even Out

by CodeChum Admin

You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!

Now, let's try this one more time! 


Instructions:

  1. Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
  2. Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point).

Input

A line containing two integers separated by a space.

5·10

Output

A line containing integers separated by a space.

6·8·10





You want to know your grade in Computer Science, so write a program that continuously takes grades between 0 and 100 to standard input until you input "stop", at which point it should print your average to standard output.


If you assign the result of calling a void function to a variable in Python, you get:


Given two integers M, N as input. Write a program to print all the composite numbers present in the given range (including M and N)



Input:



2



9




Fiona has recently started acrylic painting and she is planning to order a few canvases and paints from an online stationery shop. The price of each 10 x 10 sized canvas is 120 tk and the price of each 25 ml paint tube is 75 tk. Depending on the total amount ordered from the shop, she will get some discounts. The table below shows the discount she will get on her total amount.


Total Amount (TK) Discount (TK)

0 - 299 No Discount

300 - 499 10

500 - 749 20

750 - 999 50

>= 1000 150

Write a python program and take two inputs from the user. The first input will be the number of canvases and the second input will be the number of paint tubes ordered. Based on the price of each item, calculate the total amount that Fiona needs to pay including the discount.