Create two variables "name" and "city" and assign your name and the city you live in to…
- User
Create two variables "name" and "city" and assign your name and the city you live in to them. The "name" variable should be a string of length between 5 and 10 characters, inclusive. The "city" variable should be a string of length between 10 and 20 characters, inclusive. Then, concatenate the values of "name" and "city" to create a new variable called "location". Finally, use string interpolation to print a message that says "I am [name] and I live in [city], which is a great place to be!". Ensure that the message is exactly 50 characters long, including spaces and punctuation.
- Assistant
name = "Samantha" city = "New York City" location = name + city message = f"I am {name} and I live in {city}, which is a great place to be!" message = message.ljust(50) print(message)