Q:

Joining two strings together then converting to an integer. Python

I have to write a program so that a user can increase $100 by a percentage they input.I need to do 100 * 1.n, but I keep getting an error as I am converting a string into an integer, please help;
percent = input("Enter the % you want to increase by: ")
n = "1." + percent
k = int(n)
print(k)

I keep getting the error message:
Traceback (most recent call last):
 File "C:\Users\T Pad\Downloads\dlee.py", line 3, in <module>               
 k = int(n)
 ValueError: invalid literal for int() with base 10: '1.50'

thanks for any help.

A:

You can't convert it to int, you need float.
percent = '2837' #input("Enter the % you want to increase by: ")
n = "1." + percent
k = float(n)
print(k)

