I'm entirely new to programming and I'm supposed to turn pseudocode into a Python algorithm for a class assignment. I've tested mine algorithm (if you can even call it that) a few too many times and keep coming up with error messages. Any suggestions or resources that might be able to help would be greatly appreciated!
Pseudocode Order:
Attempted Code:
radius = 1.0
Area = 1.0
print(" Enter value for radius : ")
radius = input(" Enter value for radius : ")
Area = 3.14 * radius * radius
print(Area)
and the error:
TypeError: can't multiply sequence by non-int of type 'float'
Well, I will add some explain to this:
radius = 1.0 #this is not mandatory, you can create the variable and assign the value in the same moment
area = 1.0
radius = float(input(" Enter value for radius : ")) #here is so important to convert the input into a float, that's the other error you had
area = 3.14 * radius * radius t isn't working
print(area)