Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I keep getting an error message with my code telling me the following: enter radius: 2.5 Traceback (most recent call last): File /Users/username/sphere.py, line 7,
I keep getting an error message with my code telling me the following:
enter radius: 2.5 Traceback (most recent call last): File "/Users/username/sphere.py", line 7, in radius = int( input("enter radius: ") ) ValueError: invalid literal for int() with base 10: '2.5' >>>
Please help!
import math radius int( input( enter radius: " r radius def circumference(r): return [2 math.pir] ef area(r): return [math.pi * (rA2)1 def volume (r) return IC4/3) * (math.pi) CrA3)] def surface (r) return [(4)*(math.pi) (rA2)] # solution must be above this comment # do not change any part of the code below def mainO: radius = float( input("enter radius: ") ) print("circumference: {0:1f}",format(circumference(radius))) print("circle area: 10:.1f".format(area(radius))) printC"sphere volume: 10: .1f".format (volumeCradius))) printC" sphere surface area: fo: .1f".format(surface(radius)) mainO Ln: 4 Col: 3Step 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