Tell us what’s happening:
Hello,
first_name = ‘John’
last_name = ‘Doe’
print(first_name)
print(last_name)
full_name = first_name + ’ ’ + last_name
print(full_name)
address = ‘123 Main Street’
address +=’ Apartment 4B’
print(address)
result
John
Doe
John Doe
123 Main Street Apartment 4B
error:
You should use the += operator to add the string , Apartment 4B to the address variable.
please, can you help me? i don’t understand why , my code is not valid
Your code so far
first_name = 'John'
last_name = 'Doe'
print(first_name)
print(last_name)
full_name = first_name + ' ' + last_name
print(full_name)
address = '123 Main Street'
# User Editable Region
address += ' Apartment 4B'
# User Editable Region
print(address)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Norton/146.0.34394.179
Challenge Information:
Build an Employee Profile Generator - Step 5