Computer Science, asked by Blackpetal346, 3 months ago

1Q) write a Python program to print the area of a rectangle (area of rectangle = length X breadth)
2Q) Write a program to print the length of the word python
3Q) Create Python list containing even integer elements from 3 to 11 and print the count of even numbers
please i need the answer urgently and by request please don't give bad answer's or else i will report
please i need proper answer step by step and marked with the particular number of question please guys i beg you all

Answers

Answered by Anonymous
2

Answer:

....1..Program to calculate the area of the rectangle

Area of a rectangle is the amount of space occupied by the rectangle. A rectangle can be defined as the plain figure with two adjacent sides equal in length. The 4 angles present in the rectangle are also equal. A rectangle can be divided into 4 similar square. The measurement of each interior angle in a rectangle is 90 degrees.

Area of a rectangle is the number of square units takes to fill a rectangle completely.

Formula

A= W x H

where

A is the area of the rectangle

W is the width of the rectangle

H is the height of the rectangle

Algorithm

Define the width of the rectangle.

Define the Height of the rectangle.

Define Area of the rectangle.

Calculate the area of the rectangle by multiplying the width and height of the rectangle.

Assign the area of the rectangle to the area variable.

print the area of the rectangle.

Complexity

O(1)

Solution

C Program

#include <stdio.h>

int main()

{

int width=5;

int height=10;

int area=width*height;

printf("Area of the rectangle=%d",area);

}

Output:

Area of the rectangle=50

PHP Program

<?php

$width=5;

$height=10;

$area=$width*$height;

echo "Area of the rectangle=";

echo $area;

?>

Output:

Area of the rectangle=50

Java. program.

Similar questions