Something like this. The steps are as close to the original as possible:
r = "" # This line is essentially unnecessary
def sfera (r):
sfera = float (4) * 3.14 * float (r) * float (r)
return sfera
r = input ("Enter a number:")
print (sfera (r))
Answer 1
import math
r = input ("Enter radius:")
def sfera (r):
sfera = float (4) * math.pi * float (r) * float (r)
print (sfera)
sfera (r)