HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Python Labs
  2. /Faces, edges and vertices
MathematicsMediumHigh School (9–10)Geometry › Lines and Angles

Faces, edges and vertices

You will count the parts of prisms and pyramids with short functions, and test a rule that every solid with flat faces obeys.

Your tasks.

  1. In prism, return the tuple (faces, edges, vertices) of a prism with an n-sided end.
  2. In pyramid, return the tuple (faces, edges, vertices) of a pyramid with an n-sided base.
  3. Set total to the sum of the numbers of faces and vertices of a cube, minus its number of edges. A cube is a prism with n=4n = 4n=4.

Run it first, just as it is. The checker at the end prints FAIL for each task. Then do the tasks one at a time, and run the program again after each one. A Hint appears under every check that still fails.

When every line says PASS, change the cube to an octagonal prism. Does the same sum come out?

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

Have you tried it?

Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.

Log in to save
← All Labs
← Angles of regular polygonsCan this triangle be drawn? →
More onGeometry › Lines and Angles

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Solids and the parts of a circleGeometrical Terms and Shapes

More labs on this topic

  1. Angles of regular polygonsEasy
  2. Enlargement and the area scale factorMedium
  3. Reflect, turn and slide pointsEasy
  4. Finding the order of rotational symmetryMedium
Bearings and journeysMedium
All labs on this topic →