Aug-29-2017, 10:38 PM
(Aug-29-2017, 09:11 PM)sparkz_alot Wrote: In the print() function you are telling Python to concatenate (add) two strings, 'B' and 'G', yet you have defined them as integers.
>>> x = 'hello' >>> y = 'world' >>> x + y 'helloworld' >>>Since you are using Python 3.6.2, you should look into formatting. So your print() function would look like this:
print("your compatibillity is {} %".format(B + G))Also, you have defined a function "Love", which you do not use. If B, G and "print" are meant to be part of the function, they need to be properly indented and the function called:
def love(): B = int(len(input("please put your name: "))) G = int(len(input("please put the name of your love interest: "))) print("your compatibility is {} %".format(B + G)) love()
Output:C:\Python36\python.exe C:/Python/Games/scratch.py please put your name:joe please put the name og your love interest:sally your compatibility is 8 %
thx dude ur awesome!! i understand now and i think i will mess around with this... Thx again!