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 a program that displays the following menu:            

Geometry Calculator

1.     Calculate the Area of a Circle

2.     Calculate the Area of a Rectangle

3.     Calculate the Area of a Triangle

4.     Quit

  • The must be a main function that will display the menu and will ask for user's choice.
  • For each choice 1, 2 and 3, create an appropriate user-defined function for each task.
  • Provide validation for input.


Score will be updated after checking for the following:

  • 40 points deduction if there is no user defined function created at all.
  • 20 points deduction if all user defined function are void functions and no arguments.

Input

1. data

Output

Geometry·Calculator
1.·Calculate·the·Area·of·a·Circle
2.·Calculate·the·Area·of·a·Rectangle
3.·Calculate·the·Area·of·a·Triangle
4.·Quit
Choice:·2
Enter·length:·5
Enter·width:·4
The·area·of·the·rectangle·with·length·5·and·width·4·is·20.
Geometry·Calculator
1.·Calculate·the·Area·of·a·Circle
2.·Calculate·the·Area·of·a·Rectangle
3.·Calculate·the·Area·of·a·Triangle
4.·Quit
Choice:·4
Bye!







Create a Python script which will compute the TOTAL Sales in Grapes Store. The grapes is sold at 235.75 per kilo. 5% discount is given to customers that will buy 5 kilos and above. Compute also the CHANGE after the customer tendered their money. Format the display with two decimal digits.


Sample Output:

GRAPE STORE:

No. of Kilos: 6

Total Price: 1414.50

Discount: 70.73

Discounted Price: 1343.77

CASH: 1500

Change: 156.23


I need the code to have an output stated above.


Create a Python script that will accept three integers and will check each input number. If the input number is EVEN it will display the square cube of the number and if the number is ODD, it will display the square of the number.


Sample Output:

Number 1: 5

Number 2: 8

Number 3: 3

The square of 5 is 25

The cube of 8 is 512

The square of 3 is 9


I need the code to have an output stated above.


Develop a program logic that performs arithmetic functions which design to prompt values

for the variables from users. Both variables will be passed to methods named area() and

perimeter() for a trapezium. Compute the values of two arguments, respectively so each

method should perform the appropriate computation and display the results. Present all

requirements to be prepared to solve this problem.



list=[50,0,10,30]

using recursive function find min to max in ascending order.


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.

Note:

write a code without using counter function?

 

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})



Found Ya!

by CodeChum Admin

Let's now try finding a certain digit into an integer! Come and join in on the fun and code with me!


Instructions:

  1. Input two integers in one single line. The first inputted integer must be within 0-9 only.
  2. Using loops, identify if the first inputted integer (0-9) is present in the second inputted integer. If it is found, print "Yes". Otherwise, print "No".

Input

A line containing two integers separated by a space.

1·231214238

Output

A line containing a string.

Yes




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.