This code first creates two variables first_name and last_name with the first and last names, respectively. Then, it concatenates them with a space in between to form full_name.
Next, it calculates the number of * symbols needed on each side to ensure that the surrounded name has a maximum length of 25 characters. To do this, it subtracts the length of full_name from 25 and divides by 2 (using integer division // to ensure an integer result).
Finally, it creates a new string surrounded_name by concatenating the appropriate number of * symbols to the left and right of full_name. This surrounded name is printed to the console using the print() function.
first_name = "John"
last_name = "Doe"
# Concatenate the first and last name with a space in between
full_name = f"{first_name} {last_name}"
# Calculate the number of * symbols needed on each side
num_of_stars = (25 - len(full_name)) // 2
# Use the * symbol to surround the full name
surrounded_name = "*" * num_of_stars + full_name + "*" * num_of_stars
# Print the surrounded name
print(surrounded_name)