1_>circle 2_>retangle 3->triangle 4_>square 5_>trapezoid 6_>parallelogram enter the figure code 2 enter the breadth and length​

Answers

Answer 1

# define a function for calculating

# the area of a shapes

def calculate_area(name):

 

 # converting all characters

 # into lower cases

 name = name.lower()

 

 # check for the conditions

 if name == "rectangle":

   l = int(input("Enter rectangle's length: "))

   b = int(input("Enter rectangle's breadth: "))

   

   # calculate area of rectangle

   rec area = l * b

   print(f"The area of rectangle is: rec area")

 

 elif name == "square":

   s = int(input("Enter square's side length: "))

     

   #calculate area of square

   sqt_area = s * s

   print(f"The area of square is

         {sqt_area}.")

 elif name == "triangle":

   h = int(input("Enter triangle's height length: "))

   b = int(input("Enter triangle's breadth length: "))

     

   # calculate area of triangle

   tri_area = 0.5 * b * h

   print(f"The area of triangle is

         {tri_area}.")

 elif name == "circle":

   r = int(input("Enter circle's radius length: "))

   pi = 3.14

       

   # calculate area of circle

   circ_area = pi * r * r

   print(f"The area of circle is

         {circ_area}.")

       

 elif name == 'parallelogram':

   b = int(input("Enter parallelogram's base length: "))

   h = int(input("Enter parallelogram's height length: "))

   

   # calculate area of parallelogram

   para_area = b * h

   print(f"The area of parallelogram is

         {para_area}.")

   

 else:

   print("Sorry! This shape is not available")

# driver code

if __name__ == "__main__" :

 

 print("Calculate Shape Area")

 shape_name = input("Enter the name of shape whose area you want to find: ")

 

 # function calling

 calculate_area(shape_name)

Output:

Calculate Shape Area

Enter the name of shape whose area you want to find: rectangle

Enter rectangle's length: 20

Enter rectangle's breadth: 15

The area of rectangle is 300.

What is code?

In computing, source code, is any collection of code, with or without comments, written in a human-readable programming language. The source code of a programme is specially designed to aid the work of computer programmers, who write source code to specify the actions to be performed by a computer.

To learn more about code

https://brainly.com/question/26134656

#SPJ9


Related Questions

Question 7 of 10
is a rate that charges interest on the interest that accumulates on debt.
O A. Simple interest
OB. Variable interest
O C. Principal interest
OD. Compound interest
SUBMIT

Answers

Compound interest is a rate that charges interest on the interest that accumulates on debt.

What is an interest?

Interest is the payment of an amount above the principal sum by a borrower or deposit-taking financial institution to a lender or depositor at a specific rate. It differs from a fee that the borrower may pay to the lender or a third party. It is also distinct from a dividend, which is paid by a company to its shareholders (owners) from its profit as well as reserve, but not at a fixed rate, but rather on a pro rate basis as a share of the reward gained by risk-taking entrepreneurs when revenue exceeds total costs.

When interest is compounded on the principal amount invested as well as borrowed, the interest rate is applied to the new (larger) principal. It's essentially interest on interest, which leads to exponential growth over time.

So, D is the right answer.

To learn more about interest

https://brainly.com/question/16134508

#SPJ9

I would like to create crossword puzzles in Java. Two 4X4 and two 6X6 puzzles. How do I go about it?

Answers

One of the ways to create crossword puzzles in Java using GUI is given below:

The Program

import java.awt.BorderLayout;

import java.awt.FlowLayout;

import java.awt.GridLayout;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.util.Random;

The program is attached in the file below as the profanity counter is rejecting the code here, so I cannot post it here.

Read more about java programming here:

https://brainly.com/question/18554491

#SPJ1

write a statement that retrieves the image stored at index 0 from an imagelist control named slideshowimagelist and displays it in a picturebox control named slideshowpicturebox.

Answers

The statement that retrieves the image stored at index 0 from an image list control named slideshowimagelist and displays it in a picturebox control named slideshowpicturebox are:

{

slideshowPictureBox.Image = slideShowImageList.Images [0];

}

What is picturebox?

The PictureBox control is used to display photos on a Windows Form. The PictureBox control provides an image property that allows the user to set the image at runtime or design time. It acts as a container control, uses memory to hold the picture, and allows for image manipulation in the picture box. It also has an auto size property but no stretch feature.

To learn more about picturebox
https://brainly.com/question/27064099

#SPJ4

So I'm doing a coding project again and I have to recreate a website I'm having difficulty getting my website to look like the one I'm recreating I have put a screenshot of the website I need I recreate and a picture of the code I have so far

Answers

HTML and CSS tutorials

Explanation:

Search for website tuturials

The US Centers for Disease Control and Prevention (CDC) said in a statement on October 22 local time that the director of the agency, Wollensky, tested positive for COVID-19 on the evening of the 21st and had mild symptoms. Wolenski has been vaccinated with the latest COVID-19 vaccine, and is currently isolated at home and will participate in the meeting online.

Answers

The director of the Centers for Disease Control and Prevention and the administrator of the Agency for Toxic Substances and Disease Registry, Rochelle Paula Walensky, is an American physician and scientist.

How long after taking Covid may you test positive?

You might continue to test positively for a while after receiving a positive test result. After your initial positive result, you can test positive for antigens for a few weeks. NAAT results can remain positive for up to 90 days.

CDC works around-the-clock to safeguard America from threats to its health, safety, and security, both domestically and abroad.

The CDC battles disease whether it originates domestically or overseas, whether it is acute or chronic, curable or preventable, caused by human error or malicious attack and encourages residents and communities to do the same.

To learn more about Covid-19 refer to:

https://brainly.com/question/28347122

#SPJ1

Answer:

Explanation:

Answer:

The director of the Centers for Disease Control and Prevention and the administrator of the Agency for Toxic Substances and Disease Registry, Rochelle Paula Walensky, is an American physician and scientist.

What is Covid-19?

Different people are affected by COVID-19 in various ways. The majority of infected individuals will experience mild to moderate sickness and recover without being hospitalized.

Most typical signs:

fever \scough \stiredness

loss of scent or taste.

Less frequent signs:

throat infection headache aches and discomfort

diarrhea, a skin rash, discoloration of the fingers or toes, or red or itchy eyes.

To learn more about covid-19 refer to the:

https://brainly.in/question/49728785

#SPJ1

Discuss in brief the major of components of computer network?

Answers

The major components required to install software are computer network components. NIC, switch, cable, hub, router, and modem are all important network components. Some network components can be removed depending on the type of network that needs to be installed. A wireless network, for example, does not require a cable.

The following are the major components needed to set up a network:

1)NIC: NIC is an abbreviation for network interface card. A network interface card (NIC) is a piece of hardware that connects one computer to another on a network. It has a transfer rate range of 10,100 to 1000 Mb/s.

2)Hub: A hub is a piece of hardware that divides a network connection among multiple devices. When a computer requests information from a network, it first sends the request via cable to the Hub. This request will be broadcast to the entire network by Hub.

3)Switch:A switch is a piece of hardware that connects multiple devices on a computer network. A Switch has more sophisticated features than a Hub.

4)Router: A router is a piece of hardware that connects a local area network (LAN) to the internet. It receives, analyses, and forwards incoming packets to another network. A router operates on the OSI Reference Model's Layer 3. A router routes a packet based on the information in the routing table.

5)Modem: A modem is a piece of hardware that allows a computer to connect to the internet via an existing telephone line. A modem is not built into the motherboard; rather, it is installed in a PCI slot on the motherboard.

6)Cables: A cable is a type of signal transmission medium.

What is computer network?

A computer network is a group of computers that share resources on or provided by network nodes.

To learn more about computer network

https://brainly.com/question/1167985

#SPJ9

Write a program to display the s
tandard/deviation of 100 sets of numbers already stored in an array​

Answers

import random

import statistics

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

print("Standart deviation is: ", statistics.stdev(number))

Please edit the array before compiling the code.

Other Questions
24. refer to charholi december 31, 2019 income statement shown below. charholi began 2019 with a taxes payable account balance of $7 million. if it ended 2019 with a taxes payable account balance of $10 million, how much did it pay in taxes in 2019? $12.6 million $18.6 million $22.6 million $25.6 million Question 7 013 points Redo Which theorem is depicted by the figure and information shown below? R S Theorem? ZRAZT 2Qazs A) Opposite sides of parallelograms are congruent (Tm 16-A) B) Opposte angles in a parallelogram are congruent. (Tm 16-B) C) The sum of any consecutive angles within a parallelogram equals 180 (Tm 16-C) D) The diagonals of a parallelogram bisect each other (Tm 16-D) E) The diagonal of a parallelogram separates it into two congruent triangles (Tm 16-E) For which type of lesion would a bandage be most important in order to keep bacteria and other pathogens from entering the body?. thornton universal sales' cost of goods sold (cogs) average $2,000,000 per month, and it keeps inventory equal to 50% of its monthly cogs on hand at all times. using a 365-day year, what is its inventory conversion period? a. 14.4 days b. 16.7 days c. 13.0 days d. 15.2 days e. 11.7 days flitter reported net income of $17,500 for the past year. at the beginning of the year the company had $200,000 in assets and $50,000 in liabilities.by the end of the year, assets had increased to $300,000 and liabilities were $75,000. calculate its return on assets: if(f) (x)= x/2 - 2 and (g) (x) = 2x^2 + x - 3 find (f+g) (x)|| how do i add functions when the number is a fraction? || Phospholipids are found in a limited number of foods. They consists of a glycerol backbone with two fatty acids and a compound that contains phosphate. Why are they important in food and in the body?. The author includes Napster to - *OA analyze a person's moral codeB suggest people tend to stealOC address music piracyD explain where streaming came from Tori is writing an essay for her English class. She already has 235 words, andon average writes 175 words every hour. The essay needs to be at least 1,600words. How many more hours should she plan to work on it? Write and solvean inequality for the situation. Which one is it because i thought it was 32g+26 While the practice of forming an o with the thumb and index finger indicates ok in american culture, in japan it means __________. For the rhombus below, find the measures an electron accelerated from rest through a voltage of 790 v enters a region of constant magnetic field. part a if the electron follows a circular path with a radius of 21 cm , what is the magnitude of the magnetic field? express your answer using two significant figures. b GIVE BRAINLIST !!!!! ONLY 2 QUESTIONS!! 1.How can perceived norms affect a person's choices about drug use? 2. What roles does individual responsibility play in a persons choice about drug use and why is it important Hello,May I please request for help on the word problem number 37, please? the dahlia flower company has earnings of $3.64 per share. if the benchmark pe for the company is 18, how much will you pay for the stock? note: do not round intermediate calculations and round your answer to 2 decimal places, e.g., 32.16. if the benchmark pe for the company is 21, how much will you pay for the stock? Question 11 > Alvin can go upstream at a rate of 25 miles per hour and downstream at a rate of 35 miles per hour. One day while Alvin was on the river, he received a call telling him he needs to turn around and come home. So he turned around and went back to his starting point. If his entire trip took 12 hours, how far did he travel on the river? Alvin traveled miles. (Roundtrip) Question Help: Message instructor Submit Question when working in retail stores discuss how you have developed these skills and give some specific examples for each:CommunicationTeamworkProblem solvingInitiativePlanningSelf-managementLearning Technology On a recent survey, students were asked if they ice skate, snowboard, or ski. The Venn diagram below shows the results of the survey O GRAPHS AND FUNCTIONSFinding inputs and outputs of a two-step function that models a...