It is best to use a POGIL approach with the following. In POGIL students work in groups on activities and each member has an assigned role. For more information see https://cspogil.org/Home.
If you work in a group, have only one member of the group fill in the answers on this page. You will be able to share your answers with the group at the bottom of the page.
A string is a sequence of characters enclosed in quotes. In Python you can use pairs of single or double quotes to enclose a string. You can even use tripe quotes when a string covers more than one line.
Run the code below to see what it prints. Then fix it to pass the given test. It should return a string with the first character of the first name and first character of the last name.
Use [index] to get a character from a string. The first character in a string is at index 0 and the last is at the length of the string minus 1 (also know as index -1 in Python). Also note that you can use pairs of single quotes or double quotes to create a string. This is useful when the string includes a single quote.
Use the slice [start:end] operator to get a slice (substring) from a string. It will return a new string starting at the start and including all the characters up to just before the end (end - 1).
Write a function join_no_first that takes two strings a and b and returns a new string with all the characters in string a except the first one followed by all the characters in b except the first one. For example, join_no_first('hi', 'bye') would return 'iye'.
If you worked in a group, you can copy the answers from this page to the other group members. Select the group members below and click the button to share the answers.
The Submit Group button will submit the answer for each each question on this page for each member of your group. It also logs you as the official group submitter.