Skip to content
Advertisement

Python can’t describe two varibles

I am trying to make a simple program to calculate the area of a triangle. But at the end, python does not recognize the str function I am using. I have little to no experience on Python so if this is a stupid question, then that is why.

I have tried renaming the variables and looking at other questions on Stack Overflow. None really helped

JavaScript

But the Python terminal (repl) brings back

JavaScript

Advertisement

Answer

Here is an answer, all credit goes to Barmar, who first made a comment containing the answer.

Here is what your code should look like:

JavaScript
Advertisement