The volume of a sphere is 4/3πr3, where π has the value of "pi" given in Section 2.1 of your textbook. composed
a function called print_volume (r) that takes an argument for the radius of the sphere, and prints the volume of the sphere.
Call your print_volume function three times with different values for radius.
Include all of the following in your Learning Journal:
The code for your print_volume function.
The inputs and outputs to three calls of your print_volume.
Recently Asked Questions
- I am creating a function that checks the index of the close bracket of the same type when the index of an open bracket is given. When there is no close
- I encountered a weird problem during programming a function: def is_anagram(s1, s2): length = len(s1) if len(s1)==0: return True elif s1 in s2:
- I am writing a function to solve hanoi tower recursively. def tower_of_hanoi(fr, to, aux, num_discs): if num_discs ==1: print(fr,'to',to) else: