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]
3 years ago
13

How to Calculate the area of a rectangle in python

Computers and Technology
2 answers:
mart [117]3 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]3 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
Please use thread to complete the following program: one process opens a file data.txt, then creates a thread my_thread. The job
Firlakuza [10]

Answer:

Here is the code:-

//include the required header files

#include<stdio.h>

#include<pthread.h>

// method protocol definition

void *count_lines(void *arg);

int main()

{

    // Create a thread handler

    pthread_t my_thread;

    // Create a file handler

    FILE *fh;

    // declare the variable

    int *linecnt;

    // open the data file

    fh=fopen("data.txt","r");

// Create a thread using pthread_create; pass fh to my_thread;

    pthread_create(&my_thread, NULL, count_lines, (void*)fh);

    //Use pthread_join to terminate the thread my_thread

    pthread_join( my_thread, (void**)&linecnt );

    // print the number of lines

printf("\nNumber of lines in the given file: %d \n\n", linecnt);

    return (0);

}

// Method to count the number of lines

void *count_lines(void *arg)

{

    // variable declaration and initialization

    int linecnt=-1;

    char TTline[1600];

    //code to count the number of lines

    while(!feof(arg))

    {

         fgets(TTline,1600,arg);

         linecnt++;

    }

    pthread_exit((void *)linecnt);

    // close the file handler

    fclose(arg);

}

Explanation:

Program:-

8 0
3 years ago
____ is a linux-based operating system developed by the open handset alliance.
Misha Larkins [42]
The answer is Android
6 0
4 years ago
Which tool can be used to code basic HTML?<br><br> Text editor<br> JavaScript<br> CSS<br> HTML
luda_lava [24]

Answer:

Java Script

Explanation:

3 0
3 years ago
Read 2 more answers
You are configuring the local windows firewall on your windows 7 computer. which network category needs to have the most stringe
marusya05 [52]
B because you need to have private
8 0
3 years ago
Why would you use a billeted list in a slide presentation?
Damm [24]

Answer:

You would use a Bullet Point on a slide presentation because its concise and to the point.

Explanation:

The correct way to use a Bullet point is to keep it simple. Its not made to be a full sentence. You need to create a bullet point you can expand upon. when you keep it plain and simple you can get more info on your points.

7 0
3 years ago
Other questions:
  • I will give the brainly or whatever its called
    15·2 answers
  • A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
    13·1 answer
  • To transfer data packets between two or more networks, a ________ is used.
    11·1 answer
  • "when a dynamic web page is requested, the web server passes the request to"
    15·1 answer
  • Suppose that for an experimental device setup we have to choose settings for three parameters. There are 4, 3 and 5 settings for
    11·1 answer
  • How can you ensure that your web pages are compliant with a w3c standard?
    9·1 answer
  • If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the capti
    12·1 answer
  • Anyone Free to Talk??????? I'm Bored :(
    6·2 answers
  • Computers help eliminate that repetitive of manual task. How can this benefit you in in your overall career
    7·2 answers
  • What are non-examples of wage and salary?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!