Drop hier links of afbeeldingen om ze aan de editor toe te voegen.

In a modify task you take code that has already been started and adapt it so that it does what it should.

A school needs a system that automatically generates a username for each student. A programmer has started the code, but left gaps where the string slicing and the case conversion should go. Every gap is marked with question marks:

print("Enter student first name:")
first_name = input()

print("Enter student last name:")
last_name = input()

first_initial = first_name[????]

username = ???????

print("Generated username: " + ???????)

The editor starts you off with this code. It does not run as it stands: Python stops at the first line of question marks.

Your task

Modify the program so that it:

Keep the two questions exactly as they are. The case conversion can go anywhere before the username is built, as long as both names end up in small letters.

The output

The two questions first, worded exactly like this:

Enter student first name:
Enter student last name:

Then one line, where USERNAME is the first letter of the first name followed by the whole last name, all in lower case:

Generated username: USERNAME

Example

Input:

Ada
Lovelace

Output:

Enter student first name:
Enter student last name:
Generated username: alovelace

Input:

ALAN
TURING

Output:

Enter student first name:
Enter student last name:
Generated username: aturing

Anything else in the last name stays in: Tim and Berners-Lee give tberners-lee.

Help! My code doesn't work!

Make sure that you check for the following things:

  • Every set of question marks has been replaced. Python cannot run a line that still has one.
  • The first character of a string is at index 0, not 1.
  • lower() gives back a new string, so its result is stored, as in first_name = first_name.lower().
  • The username is the initial followed by the last name, with no space in between.
  • The last print outputs the username, not the first name or the initial.