Python Classroom
  • Introduction
  • About Python Classroom
  • Python Cloud Options
    • CS50 IDE
      • CS50 IDE Overview
      • CS50 IDE and Python
      • CS50 IDE Debugging
      • CS50 IDE Shortcuts
      • Linux Bash Shell
      • Vim Mode
        • Vim Tutorial
    • CS50 Sandbox
    • PythonAnywhere
    • Repl.it
  • Python Curriculum Map
    • Pedagogy
      • Python Professional Development
      • Teaching Tips
      • Assessment Tips
      • Rubrics
      • Activities
        • Picture Activity
        • Map Activity
        • Crossing the Bridge
        • NIM
        • Mastermind
        • Cards
          • Card Deck Algorithms
          • Sorting Cards
        • River Crossing
          • Jealous Boyfriends
          • Cannibals and Priests
          • Family
          • Police and the Thief
          • Humans and Monkeys
          • Moving Money
        • Crossing the River
        • Traveling Salesperson
        • Logic Problems
        • CIA Crack the Code
        • IQ Test
        • Puzzles
    • AP Computer Science Principles Framework
  • Python Philosphy
    • How to Practice Python
  • microbit
  • Turtle Graphics
    • Turtle Examples
    • Turtle Activities
    • Turtle Maze Problems
    • Turtle Graphics with loops
    • Turtle Snake
    • Turtle Graphics with Conditionals
  • Output
    • Output Examples
    • Output Mistakes
  • Variables
    • Variable Data Type Examples
    • Variable Role Examples
    • Variables Mistakes
    • Variables Problems
  • Math
    • Math Examples
    • Math Mistakes
    • Math Problems
    • Math Self Check
  • Input
    • Input Examples
    • Input Mistakes
    • Input Problems
  • Decisions
    • if
      • if Examples
      • if Mistakes
      • if Problems
    • if else
      • if else Examples
      • if else Problems
      • if / if else Problems
    • if elif else
      • if elif else Examples
      • if elif else Problems
    • nested if
      • nested if Examples
      • nested if Problems
    • Logical Operators
      • Logical Operators Examples
    • Adventure Game Project
  • Loops
    • while loop - count up
      • Examples
      • Problems
    • while loop - countdown
      • Examples
      • Problems
    • while loop - sentinel value
      • Problems
    • while loop - sentinel menu
      • Problems
    • for loop - range (one argument)
      • Examples
      • Problems
    • for loop - range (two arguments)
      • Problems
    • for loop - range (three arguments)
      • Problems
  • Lists
    • Lists - Numbers
      • Problems
    • Lists - Strings
      • Problems
      • Shopping Project
  • Dictionaries
  • String Methods
  • Functions
    • Variable Scope
    • Functions - no parameters
    • Functions - one parameter
    • Functions - return
    • Functions - lists
  • Files
  • Classes
    • Inheritance
  • Python Projects
    • Adventure Game
    • Restaurant Project
    • Trivia Game
    • Family Tree Project
  • Raspberry Pi
    • Raspberry Pi Models
    • Raspberry Pi Setup
  • Roblox
  • Glossary
Powered by GitBook
On this page
  • Problem 1
  • Problem 2
  • Problem 3
  • Problem 4
  • Problem 5
  • Problem 6
  • Problem 7
  • Problem 8
  • Problem 9
  • Problem 10
  • Problem 11
  • Problem 12
  • Problem 13
  • Problem 14
  • Problem 15
  • Problem 16
  • Problem 17
  • Problem 18
  • Problem 19
  • Problem 20

Was this helpful?

  1. Math

Math Problems

PreviousMath MistakesNextMath Self Check

Last updated 5 years ago

Was this helpful?

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=lwArea=lwArea=lw

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=a2Area=a^2Area=a2

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.

To access the value of pi, import the Python math library

import math # put this on line 1
print(math.pi) # this is the value of pi
Area=Ï€r2Area=Ï€r^2Area=Ï€r2
Circumference=2Ï€rCircumference = 2Ï€rCircumference=2Ï€r

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=12bhArea=\frac{1}{2} bhArea=21​bh

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=bhArea=bhArea=bh

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=ha+b2Area=h\frac{a+b}{2}Area=h2a+b​

Print the value of Area.

Problem 7

print("Problem 7 - Kite Area")

Assign 8 to p and 9 to q.

A=pq2A=\frac{pq}{2}A=2pq​

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=lwhVolume=lwhVolume=lwh

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=a3Volume = a^3Volume=a3

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=lwh3V=\frac{lwh}{3}V=3lwh​

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=Ï€r2hVolume=Ï€r^2hVolume=Ï€r2h

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=43πr3Volume=\frac{4}{3}\pi r^3Volume=34​πr3

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=πr2h3Volume=\pi r^2\frac{h}{3}Volume=πr23h​

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)SA=2(wl+hl+hw)SA=2(wl+hl+hw)

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=6a2Area=6a^2Area=6a2

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Ï€r2SA=4Ï€r^2SA=4Ï€r2

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Ï€r2SA=2Ï€rh+2Ï€r^2SA=2Ï€rh+2Ï€r2

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+lbSA=bh+2ls+lbSA=bh+2ls+lb

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=3a2SA=\sqrt3 a^2SA=3​a2

Print the value of SA.

To take the square root of a number, use the math library.

import math
math.sqrt(3)

Problem 20

print("Problem 20 - Tetrahedron Volume")

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

Volume=a362Volume=\frac{a^3}{6\sqrt2}Volume=62​a3​

Print the value of Volume.