This is a MULTIPLE ANSWER question, which means you are able to select one or mo
ID: 3750168 • Letter: T
Question
This is a MULTIPLE ANSWER question, which means you are able to select one or more answers as being correct. Note that this does not necessarily mean that there are multiple correct answers. In any case, select all the answers you believe are correct. (NB: There are no part marks awarded for multiple answer questions.)
In your workshop exercises and assignment tasks you have also learned that to successfully solve a problem using a computer language we must express the right semantics, i.e., what we say must make sense. To do so you must understand precisely what each language statement does.
Which of the following claims about a computer language statement’s semantics is/are correct?
Given a pattern described by regular expression X, then regular expression X* will match the text sequence 'XXXX' .
The return statement is used in Python to return a variable to its previous value.
The Python statement 'new = numbers[3]' puts the value of variable new in position 3 of the sequence.
In HTML the markup notation <h1>text</h1> is used to link (also called ‘hyperlink’) the bracketed text to another web page.
The assignment statement ‘apple = melon’ in Python moves the value of variable melon into variable apple, leaving variable melon equal to null.
Given a pattern described by regular expression X, then regular expression X* will match the text sequence 'XXXX' .
The return statement is used in Python to return a variable to its previous value.
The Python statement 'new = numbers[3]' puts the value of variable new in position 3 of the sequence.
In HTML the markup notation <h1>text</h1> is used to link (also called ‘hyperlink’) the bracketed text to another web page.
The assignment statement ‘apple = melon’ in Python moves the value of variable melon into variable apple, leaving variable melon equal to null.
Explanation / Answer
1. Correct
X* means X occurs zero or more times. In 'XXXX', X repeats 4 times. so the regex is valid
2. False
the return statement is used to return one value to the calling function which is stored in a variable
3. False
Here new is a variable and numbers is a list
new = numbers[3] means value with index 3 is assigned to the variable new
4. False
h1 - is a heading tag which is used to represent heading in the HTML
5. False
apple = melon wont make the melon equal to null. That is just assigning the value of melon to apple variable
Let me know if you have any queries or clarifications.... :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.