1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
forsale [732]
2 years ago
13

How to Calculate the area of a rectangle in python

Computers and Technology
2 answers:
mart [117]2 years ago
7 0
Firstly, take input from the user for length and breadth using the input() function.

Now,calculate the area of a rectangle by using the formula Area = l * b.

At last, print the area of a rectangle to see the output.
Alexandra [31]2 years ago
6 0

very easy:

print('The amazing rectangle area calculator')

height = float(input('enter the height '))

width = float(input('enter the width '))

area = height * width

print('The area of the rectangle is', area)

You might be interested in
MyProgramming Lab
Akimi4 [234]

Answer:

Explanation:

The following code is written in Python. It creates a method for each one of the questions asked and then tests all three with the same test case which can be seen in the picture attached below.

def alternating_list(lst1, lst2):

   lst3 = []

   for x in range(len(lst1)):

       lst3.append(lst1[x])

       try:

           lst3.append(lst2[x])

       except:

           pass

   if len(lst2) > len(lst1):

       lst3.extend(lst2[len(lst1):])

   return lst3

def reverse_alternating(lst1, lst2):

   lst3 = []

   if len(lst1) == len(lst2):

       for x in range(len(lst1) - 1, -1, -1):

           lst3.append(lst1[x])

           lst3.append(lst2[x])

   return lst3

def alternating_list_no_extra(lst1, lst2):

   lst3 = []

   max = 0

   if len(lst1) > len(lst2):

       max = len(lst2)

   else:

       max = len(lst1)

   for x in range(max):

       lst3.append(lst1[x])

       try:

           lst3.append(lst2[x])

       except:

           pass

   return lst3

4 0
3 years ago
Which software programs should students avoid using to create and submit course work? (Choose all that apply). Word, Pages, Numb
Aleksandr [31]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

You can submit your course work most often in a Word document. Because in the word document, you can insert text, numbers, images, charts whatever you want such as required for writing a book- easily.

The correct options to this question, that you should need to avoid using to create and submit course work are pages, numbers, and keynote.

Because while submitting the course work, you need to submit a complete word document, it is not required to you that you have to submit numbers, pages, or keynotes along with the course assignment. You can create a course assignment or project document in word and submit to your respective teacher. However, you can not create your course work using keynotes or pages, etc as given in the question.

3 0
3 years ago
Which option is the easiest way to configure macros in Access 2016?
zhuklara [117]
Number 2
Have a nice day
6 0
3 years ago
5.2
Ray Of Light [21]

Answer:

In order to reduce the risk of accidents on the roads.

Explanation:

The special equipment is used when  testing eyesight for a driver's license in order to reduce the risk of accidents on the roads. Good eyesight is very important for good and safe driving so to find out the eyesight of the driver, the license officer used special equipment in order to check driver's eyes. If the eyesight is good, the officer provide license to the person otherwise not so that no accidents happen on the road.

8 0
2 years ago
Which type of electronic payment is typically favored in b2b?
Dennis_Churaev [7]
Electronic checks would<span> typically be favored in b2b</span>
4 0
2 years ago
Other questions:
  • In Python please:
    15·1 answer
  • Does anyone have game design in connections
    13·1 answer
  • Network address 192.10.10.0<br>​
    12·1 answer
  • The purpose of​ a/an _________ system is to capture best practice solutions and program them into a set of rules in a software p
    13·1 answer
  • What are the services offered by web-based email?​
    12·1 answer
  • Consider the following code.
    7·2 answers
  • Write a program named as reverse.c that reads a message, then prints the reversal of the message. The output of the program shou
    7·1 answer
  • drag each type of document to the correct location on the table. Drag each document to its respective category
    7·1 answer
  • The retention of encoded information over time refers to
    14·1 answer
  • . When you ____________________ a word, you can use a single line, a double lines, a dotted line, or even a wavy line!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!