Solution:-
Python 3 code:-
# STAY HOME STAY SAFE
# Prompt the user to enter the radius
radius=int(input('Enter the radius: '))
# Compute the area of the circle
area = 3.14*(radius**2)
# Print the computed area
print('The area is ',area,' square units')
Code snapshot:-

Output snapshot:-

Instructions circle.py + >- Terminal 1 # Put your code here 2 Write and test a...
Write and test a program that computes the area of a circle. Request a number representing a radius as input from the user. Use the formula 3.14 × radius2 to compute the area. Output this result with a suitable label.
1. Write a program that determines the area and perimeter of a square. Your program should accept the appropriate measurement of the square as input from the user and display the result to the screen. Area of Square = L (squared) Perimeter of Square = 4 * L 2. Write a program that determines the area and circumference of a circle. Your program should accept the appropriate measurement of the circle as input from the user and display the result to...
Instructions sevens.py 1 # Put your code here In the game of Lucky Sevens, the player rolls a pair of dice. If the dots add up to 7, the player wins $4; otherwise, the player loses $1. Suppose that, to entice the gullible, a casino tells players that there are lots of ways to win: (1,6), (2,5), and so on. A little mathematical analysis reveals that there are not enough ways to win to make the game worthwhile; however, because...
Need C++ Code (Please put //comments on there too) 1. Complete the following code: Design a class called Circle. The class should have an integer member variable named radius and three member functions; setRadius, getRadius, calArea; the functions' prototypes should be done inside the class declaration and the functions' definitions should come after the main function #include <iostream> using namespace std; const double PI = 3.14; // fill in the declaration of the class Circle here int main() { Circle...
Write a shell script that given a radius, calculates the area of a circle. (Hint – don’t write this from scratch. Find another script that reads user input and performs a calculation, then modify it to meet your needs.) Save the script in your home directory with the name circle.sh The formula for calculating the area is: Area=Π*Radius2 You can use 3.14 for Π, and either do Radius*Radius or Radius^2 to get the square of the radius. Use the scale...
Java Question. Can someone write this code? Instructions This program will read in test data for students(you should download the input file "PairGrades.txt" shown below) Your job is to produce an output file "average.txt" which displays the student's name once in uppercase and then a list of the grades, 4 underscores, the average for the grades, and an empty line. After all the students' information is listed, you should display the student with the highest average. One sentence should be...
Write a Perl program that computes the circumference of a circle. Your program prompts for and accepts a radius from the person running the program. So, if the user enters 12.5 for the radius, she should get the answer about 78.5. Circumference is 2π times the radius (approximately 2 times 3.141592654).
(PYTHON) Write a program that displays the following menu:. , Write Algorithm for Code 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 Enter your choice (1 - 4): If the user enters 1, the program should ask for the radius of the circle and then display its area. If the user enters 2, the program should ask for the length and width of...
C++ Pr ogramming (CSC-115) Functions (pass by Reference) Programming project Using FUNCTIONS, write a C++ program that calculates the Area of a cirele, a square and a rectangle. Your program must prompt the user to select which area is to be calculated. Document your program. Apply the do while loop to repeat the program Apply the while loop for input validation. Apply the switch statements or the if/ else if statement to prompt the user for the area's selection. Based...
In Java Exercise #2: (Java) Design and implement a program (name it ComputeAreas) that defines four methods as follows: Method squareArea (double side) returns the area of a square. Method rectangleArea (double width, double length) returns the area of a rectangle. Method circleArea (double radius) returns the area of a circle. Method triangleArea (double base, double height) returns the area of a triangle. In the main method, test all methods with different input value read from the user. Document your...