I assigned these variables:
x = "1"
name = str(input("Enter Name :"))
gender = str(input("Enter Gender (M/F) :")).lower
year = int(input("Enter Year of Birth :"))
postcode = str(input("Enter Postcode :"))
Then I got I got a part of the string postcode.
partCode = postcode[0:3]
Then I converted the year in to a string.
birthYear = str(year)
After, I tried concatenating all the strings:
username = name + birthYear + gender + partCode + x
And I receive this error:
TypeError: can only concatenate str (not "builtin_function_or_method") to str
How can I solve it?

yearto anintif you are just going to convert it back to astrin the first place? None of the calls tostrare necessary, becauseinputalready returns astr.loweris a method, not a lowercase version of the original string. You need to call it:gender = input(...).lower().