Feb-02-2020, 08:14 PM
Hello,
Please see the following (I want to ascertain the monthly rent amount of an apartment by entering the weekly amount & play around with functions):
def monthly():
x = float(input("Please enter the weekly rent amount: ")
print("The monthly rent amount is " +x * 52 / 12)
monthly()
I get the following error message:
File "/home/pc/PycharmProjects/begin/function.py", line 4
print("The monthly rent amount is " +x * 52 / 12)
^
SyntaxError: invalid syntax
Process finished with exit code 1
Any help is much appreciated.
Please see the following (I want to ascertain the monthly rent amount of an apartment by entering the weekly amount & play around with functions):
def monthly():
x = float(input("Please enter the weekly rent amount: ")
print("The monthly rent amount is " +x * 52 / 12)
monthly()
I get the following error message:
File "/home/pc/PycharmProjects/begin/function.py", line 4
print("The monthly rent amount is " +x * 52 / 12)
^
SyntaxError: invalid syntax
Process finished with exit code 1
Any help is much appreciated.