Creating a personalized greeting from user input

Report a typo

Given a small Python program that assembles a greeting using a user's input. However, the code was mixed up. The program takes a user's name as input, concatenates it with some text, and then displays the full greeting on the screen. Your job is to reorder the lines of code so that it functions properly without modifying any single line of code.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                greeting = 'Hello, ' + name + '! Welcome to Python programming.'
              
                # Greeting program
              
                name = input('Please enter your name: ')
              
                print(greeting)
              
___

Create a free account to access the full topic