Formatting string with different variable types

Report a typo

You have been given a Python program, where some parts are missing (indicated by ▭). The program has three variables: `name` (string), `age` (integer), and `is_married` (boolean). The program should print these variables in a single string, for example: 'Name: John, Age: 27, Is married: False'. Please fill in the blanks in the code to make it work as described.

Fill in the gaps with the relevant elements
name = "John"
age = 27
is_married = False
("Name: " + name + ", Age: " + (age) + ", Is married: " + str(is_married))

Create a free account to access the full topic