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

Create a program wherein any user should be able to borrow books. Each of the book must have three copies. Indicate how many books are left when they want to borrow a book. Users should be able to check-out and reserve any copy.


2. Which Color?

My favorite color is blue. What's your favorite color? Never mind it doesn't matter, as long as you know how to identify which color is given.


Instructions:

  1. Input a string that represents a color.
  2. Print "Red" if the color is red, "Blue" if it is blue, "Green" if it is green, and "None of the Above" if it isn't any of the three colors.
  3. Inputting the strings "ReD" or "rED" should still output "Red", this also applies to the other colors, so make sure to use one of the functions discussed previously!

Input

A line containing a string.

red

Output

A line containing a string.

Red
  1. Given an integer and specific digit between (0-9) write a program to print the count of a given specific digit in the given integer

Example

Input: 2343243233

Input: 3

Output: 5




  1. Given a string that other than letters, numbers, and space if any characters are there print the count of those characters.

Example

Input: aaa34@raj?where454/

Output: 3




An e-commerce application wants to give discounts to its customers. The discount is calculated as the product of the sum of even numbers and the sum of odd numbers present in the bill. Print the discount that a customer can get.

  1. Input: 2345, Output: 48 

Explanation: even_sum = 2+4 = 6.

Odd_sum = 3+5 = 8.

Product = 6*8 = 48.


  1. Check how many perfect squares are in a given list

Input:

[22,9, 45, 82, 81, 21]

Output:2




  1. Get the maximum number out of the given integer 

 Example

 INPUT=257895334; OUTPUT=9




  1. Write a program to count the characters that are not words, integers, spaces  

Given a list, add 1 if the given number in the list is even and add 2 if the given number is odd in a given string


Find the largest triangle between the two triangles given the height1, base1, height2, base2.here area of triangle=base*height/2


LATEST TUTORIALS
APPROVED BY CLIENTS