Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribed

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: 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago