This quiz is all about learning so you will not be penalised for any wrong answers. Just keep trying until you get everything right!

1. Which of the following is not a valid command?





Correct! Commands cannot spread across multiple lines.
Hmm, that’s not right. Hint, we are looking for a command that is not correct.
Hmm, that’s not right. Hint, we are looking for a command that is not correct.
Hmm, that’s not right. Two of these of these are valid commands.

2. Given the following input:
Hello world!
What is the outcome of the following command?
insert "foo" at pos 1





Correct! Position 0 represents the space before the first letter. Position 1 will come after the “H”.
Hmm, that’s not right. It looks like you are trying to insert the text at position 0 not position 1.
Hmm, that’s not right. We want to insert text not replace text.
Hmm, that’s not right. One of these is a correct solution.

3. Which command is the same as the following command?
insert "foo" at pos 0





Correct!
Hmm, that’s not right. Hint, which bracket looks like it can best squeeze between letters?
Hmm, that’s not right. Hint, which bracket looks like it can best squeeze between letters?
Hmm, that’s not right. Hint, remember you can use brackets to represent positions, characters, and instances. Which bracket looks like it can best squeeze between letters?

4. Given the following input:
Hello world!
What is the outcome of the following command?
remove char 6





Correct! The 6th character is the space between “Hello” and “world!”. This is the character we want to remove.
Hmm, that’s not right. Hint, the first character has index 1. We want to remove the 6th character.
Hmm, that’s not right. Hint, the first character has index 1. We want to remove the 6th character.
Hmm, that’s not right. Hint, the first character has index 1. We want to remove the 6th character.

5. Given the following input:
Hello world!
Which command will produce the following output?
Helo word!





Correct! There are 3 instances of “l” in this input; two of which are right next to each other. You can either remove the first and last instance or the second and last instance to get this output.
Hmm, that’s not right. Hint, are you sure that’s the only correct solution?
Hmm, that’s not right. Hint, are you sure that’s the only correct solution?
Hmm, that’s not right. Hint, are you sure that’s the only correct solution?

6. Which command would you use if you would like to add an inline comment to your code?





Correct! The """ command will create a multiline comment and the "" command will create an empty text.
Hmm, that’s not right. This will create an empty text. We are wanting to create an inline comment.
Hmm, that’s not right. This will create a multiline comment. We are wanting to create an inline comment.
Hmm, that’s not right. Rewrite supports both inline and multiline comments.