ADITYA CODING CLUB
Aditya College of Engineering, Madanapalle
Python Programming Test-14
1. Test contains 10 Questions 
2. Each Question Carries 1 Mark
Roll Number: *
Type Valid Roll Number 
Name of the Student: *
Department *
Year of Course: *
Required
Section  *

1. What will be the output of the following Python code?

re.split(r'(n\d)=', 'n1=3.1, n2=5, n3=4.565')
*
1 point
2.  Which of the following pattern matching modifiers permits whitespace and comments inside the regular expression? *
1 point
3. What will be the output of the following Python code?
s = 'welcome home' m = re.match(r'(.*)(.*?)', s) print(m.group())
*
1 point
4. What will be the output of the following Python code?
re.split(r'(a)(t)', 'Maths is a difficult subject')
*
1 point
5. What will be the output of the following Python code?
a=re.compile('[0-9]+') a.findall('7 apples and 3 mangoes')
*
1 point
6.  Which of the following statements regarding the output of the function re.match is incorrect?
*
1 point
7.  What will be the output of the following Python code?
a = re.compile('0-9') a.findall('3 trees')
*
1 point
8. What will be the output of the following Python code?
m = re.search('a', 'The blue umbrella') m.re.pattern
*
1 point
9. What will be the output of the following Python code?
re.sub('Y', 'X', 'AAAAAA', count=2)
*
1 point
10.   The function of re.search is __________ *
1 point
Submit
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy