I have to enter a diameter, then change it to a float, and after divide the diameter by 2. The beginning of my code works, but when I coded, “print (radius)” it stopped working. Maybe I made a mistake?
diameter = float(input("Enter a diameter: ")) print(diameter) #changing diameter to type float myfloat = diameter #creating a variable name radius # assign radius the value og diameter/2 radius = (diameter/2) // this where it went wrong print = "The radius is equal to" print(radius)
I keep getting, “‘str’ object is not callable”