0
Python syntax error
How can I fix it without syntax error ??? https://code.sololearn.com/cFB689ThM9xK/?ref=app
3 Antworten
+ 1
There was a syntax error because the program already knew the data type of the variable so it was confused by the str. You also didn’t need the brackets around pi_string when you were declaring it.
pi_string wasn’t actually a string because 3.1415926 wasn’t inbetween quotation marks (you made it an integer) to make it an actually string you would do this-
pi_string="3.1415926"
+ 4
pi_string = str(3.1415926)
0
pi_string="3.1415926"