Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Python selecting one or more answers as being correct. A. Given a pattern descri

ID: 3834652 • Letter: P

Question

Python

selecting one or more answers as being correct.

A. Given a pattern described by regular expression X, then regular expression X* will match the text sequence 'XXXX' .

B. The assignment statement ‘apple = melon’ in Python moves the value of variable melon into variable apple, leaving variable melon equal to null.

C.The return statement is used in Python to return a variable to its previous value.

D. The Python statement 'new = numbers[3]' puts the value of variable new in position 3 of the sequence.

E. In HTML the markup notation <h1>text</h1> is used to link (also called ‘hyperlink’) the bracketed text to another web page.

Explanation / Answer

a) True .. as X* means zero or more occurence of X and XXXX matches with this.

b) False .. as after assigning value of melon to apple, value of melon will still be there. It will not be null.

c) False return statements returns the value from a called function to calling function. It is not at all related to previous value of variable.

d) False. as new = numbers[3] , this statements puts the 4th(array starts from 0) element of array number to new.

e) False - This tag is used to create heading of the page with text given between <h1> tag . For hyperlink , anchor tag is used.