# Math Problems

## Problem 1

print("Problem 1 - Rectangle Area")

Assign 5 to the variable l and 7 to variable w. Assign the variable Area according to the formula:

$$
Area=lw
$$

![](/files/-LjxbN_Un-wDdmW9jGLv)

Print the value of Area.

## Problem 2

print("Problem 2 - Square Area")

Assign 11 to the variable a. Assign the variable Area according to the formula:

$$
Area=a^2
$$

![](/files/-LjxbuTzjID0iLrnQG-e)

Print the value of Area.

## Problem 3

print("Problem 3 - Circle")

Assign 5 to the variable r. Assign the variable Area and Circumference according to the formula. Print the value of Area and Circumference. &#x20;

{% hint style="info" %}
To access the value of pi, import the Python math library
{% endhint %}

```python
import math # put this on line 1
print(math.pi) # this is the value of pi
```

$$
Area=πr^2
$$

$$
Circumference = 2πr
$$

![](/files/-LjxcNoBnM5D6Jf5dSiP)

Print the value of Area and Circumference.

## Problem 4

print("Problem 4 - Triangle Area")

Assign 11 to the variable b and 5 to the variable h. Assign the variable Area according to the formula.

$$
Area=\frac{1}{2} bh
$$

![](/files/-LjxfWeirl0GoqKT6bYO)

Print the value of Area.

## Problem 5

print("Problem 5 - Parallelogram Area")

Assign 5 to the variable b and 13 to the variable h. Assign the variable Area according to the formula.

$$
Area=bh
$$

![](/files/-Ljxftuaypg4VSMF7bAU)

Print the value of Area.

## Problem 6

print("Problem 6 - Trapezoid Area")

Assign 10 to h, 7 to a and 9 to b. Assign the variable Area according to the formula:

$$
Area=h\frac{a+b}{2}
$$

![](/files/-LjxgKMQW08QbDLi5sL_)

Print the value of Area.

## Problem 7

print("Problem 7 - Kite Area")

Assign 8 to p and 9 to q.

$$
A=\frac{pq}{2}
$$

![](/files/-LpyOwAn-5hysxyuFrsq)

## Problem 8

print("Problem 8 - Rectangular Prism Volume")

Assign 7 to l, 4 to w and 5 to h. Assign the variable Volume according to the formula:

$$
Volume=lwh
$$

![](/files/-LjxgfLFjqLqu2gBwt9w)

Print the value of Volume.

## Problem 9

print("Problem 9 - Cube Volume")

Assign 13 to a. Assign the variable Volume according to the formula:

$$
Volume = a^3
$$

![](/files/-Ljxgugi0v-dVkQzqifw)

Print the value of Volume.

## Problem 10

print("Problem 10 - Pyramid Volume")

Assign 6 to l, 9 to w and 8 to h. Assign the variable Volume according to the formula:

$$
V=\frac{lwh}{3}
$$

![](/files/-Ljxh3oHjyXFNt50lQz6)

Print the value of Volume.

## Problem 11

print("Problem 11 - Cylinder Volume")

Assign 13 to r, 4 to h. Assign the variable Volume according to the formula.

$$
Volume=πr^2h
$$

![](/files/-LjxhOAdeOFkpIsVPDLk)

Print the value of Volume.

## Problem 12

print("Problem 12 - Sphere Volume")

Assign 9 to r. Assign the variable Volume according to the formula.

$$
Volume=\frac{4}{3}\pi r^3
$$

![](/files/-LjxhcEF6K0FilKcnFPK)

Print the value of Volume.

## Problem 13

print("Problem 13 - Cone Volume")

Assign 5 to r and 12 to h. Assign the variable Volume according to the formula.

$$
Volume=\pi r^2\frac{h}{3}
$$

![](/files/-LjxhpC45-k49DZUK4hj)

Print the value of Volume.

## Problem 14

print("Problem 14 - Rectangular Solid Surface Area")

Assign 11 to l, 12 to w and 13 to h. Assign the variable SA according to the formula:

$$
SA=2(wl+hl+hw)
$$

![](/files/-Ljxi1edung1i2KtA2wL)

Print the value of SA.

## Problem 15

print("Problem 15 - Cube Surface Area")

Assign 14 to a. Assign the variable Area according to the formula.

$$
Area=6a^2
$$

![](/files/-LjxiEd9gFONR5QnnLd6)

Print the value of SA.

## Problem 16

print("Problem 16 - Sphere Surface Area")

Assign 15 to r. Assign the variable SA according to the formula.

$$
SA=4πr^2
$$

![](/files/-LjxiT6R48mexufdeUSC)

Print the value of SA.

## Problem 17

print("Problem 17 - Right Cylinder Surface Area")

Assign 9 to r. Assign 6 to h. Assign the variable SA according to the formula:

$$
SA=2πrh+2πr^2
$$

![](/files/-LjxikH_8lQ4kVp8E10E)

Print the Area.

## Problem 18

print("Problem 18 - Triangular Prism Surface Area")

Assign 5 to b. Assign 3 to h. Assign 9 to l. Assign 5 to s. Assign the variable SA according to the formula.

$$
SA=bh+2ls+lb
$$

![](/files/-LjxjEyBVsP_09-5M6Pv)

Print the value of SA.

## Problem 19

print("Problem 19 - Tetrahedron Surface Area")

Assign 9 to a.  Assign the variable SA according to the formula.

$$
SA=\sqrt3 a^2
$$

Print the value of SA.

{% hint style="info" %}
To take the square root of a number, use the math library.
{% endhint %}

```python
import math
math.sqrt(3)
```

![](/files/-LpyQou6nKzSwQyyfnxV)

## Problem 20

print("Problem 20 - Tetrahedron Volume")

Assign 13 to a.  Assign the variable Volume according to the formula.

$$
Volume=\frac{a^3}{6\sqrt2}
$$

![](/files/-LpyRGFR8KJUIKBtf8_6)

Print the value of Volume.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pythonclassroom.com/math/math-problems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
