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
Score will be updated after checking for the following:
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})
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:
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.