Element pl-string-input: Input of short strings

1) For the following python code snippet, enter below the resulting string:

1
a = "love"*4

a =

2) For the following python code snippet, what is d = b + c?

1
2
  b = "hello "
  c = "it is a beautiful day!"

b + c =

3) Enter the string below, however include trailing and leading blanks. When using the attribute remove-leading-trailing="true", the answer will still be evaluated as correct. We also set show-score="false" to hide the score badge.

1
"01111101"

4) Enter the string below, however include blank spaces between some of the numbers. When using the attribute remove-spaces="true", the answer will still be evaluated as correct. This example also uses the attribute placeholder="string", to add a placeholder indicating the expected input is of type "string".

1
"01111101"

5) The attribute allow-blank="true" allows users to submit blank answers, without receiving the Invalid error. Leave the box below empty, and notice that you will not receive the Invalid feedback (and hence the question is graded).

blank input box =

6) To allow for case insensitivity, use ignore-case="true". This will autoconvert both the student answer and the correct answer to lower case. Entering the string below with any choice of uppercase and lowercase letters will yield the correct answer as a result.

1
"cAsE iNsEnSiTiVe"

Input box is case insensitive =

7) The size of the input box can be set with the attribute size, and the attribute show-help-text="false" removes the button for the help popup. This box below has size=5 instead of the default size=35.

1
"small"

Small box =

8) For students using non-latin keyboards, it is possible that non-English characters may be introduced into the box. This can cause confusion if these characters resemble a latin character (e.g., the cyrillic character а looks a lot like the latin character a). Similarly, students may copy from text editors and paste into the answer box, causing characters like fancy quotes to be introduced. The attribute normalize-to-ascii="true" converts many Unicode characters to the ASCII character that mostly resembles it.

The box below contains an input using a Greek Epsilon, a Cyrillic ie, and fancy quotes. Copying this text into the answer box below should result in the appropriate text ("Ee") being accepted.

“Εе”

Weird text = ?

Correct answer
Student view placeholder
In student views this area is used for assessment and score info.
Staff information
Staff user:
Dev User
dev@example.com

Question:
Title:
Element pl-string-input: Input of short strings
Started at:
2024-09-19 17:56:24 (CDT)
Duration:
0 s
Show/Hide answer
{
  "ans1": "lovelovelovelove",
  "ans2": "hello it is a beautiful day!",
  "ans3": "01111101",
  "ans4": "01111101",
  "ans5": "blank",
  "ans6": "cAsE iNsEnSiTiVe",
  "ans7": "small",
  "ans8": "\"Ee\""
}