Jul-21-2019, 04:46 AM
1. in python3 print is function, not statement
2. line #6 should be
https://pyformat.info/
https://docs.python.org/3.7/library/stri...i-language
2. line #6 should be
print("%d is equal to (%d**3)-1" %(guess,n))3. You use so called old-style. better use so called new-style, or in python 3.6+ - the newest f-string
print("{} is equal to ({}**3)-1".format(guess,n))
print(f"{guess} is equal to ({n}**3)-1")some additional reading
https://pyformat.info/
https://docs.python.org/3.7/library/stri...i-language
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs