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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started