Question: 1. Write Python code to calculate the volume of a parallelepiped. The volume of a parallelepiped is the product of the area of its base

1. Write Python code to calculate the volume of a parallelepiped. The volume of a parallelepiped is the product of the area of its base and its height. Write Python code to compute the volume of a parallelepiped after reading in the area of the base and height.Do not allow the user to enter a negative radius. Use an if/else clause to allow only proper inputs (positive) and display an error message to the user otherwise.

2.Assume that you have a Python list named numbers that contains a list of integers. Write Python code to run through the list and determine the second smallest number. You may assume that all numbers are different (that is, no number is duplicated) and that there are at least two numbers in the list. The list only contains numbers: no strings, Booleans, etc.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!