What does the following statements do? from datetime import * print(datetime.today().strftime(‘%x’)) a. Displays the time appropriate for locale b. Displays the current year as 00 to 99 c. Displays the current year as 0001 to 9999 d. Displays the date appropriate for locale
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%X’)) a. Displays the current year as 0001 to 9999 b. Displays the timezone name c. Displays the time appropriate for locale d. Displays the current year as 00 to 99
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%y’)) a. Displays the current year as 00 to 99 b. Displays the current year as 0001 to 9999 c. Displays the timezone name d. Displays the timezone offset from UTC as +HHMM or -HHMM
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%Y’)) a. Displays the current year as 0001 to 9999 b. Displays the timezone name c. Displays the timezone offset from UTC as +HHMM or -HHMM d. Displays the full month name
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%Z’)) a. Displays the timezone offset from UTC as +HHMM or -HHMM b. Displays the timezone name c. Displays the abbreviated month name d. Displays the full month name
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%z’)) a. Displays the full month name b. Displays the abbreviated month name c. Displays the abbreviated day name d. Displays the timezone offset from UTC as +HHMM or -HHMM
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%a’)) a. Displays the full month name b. Displays the full day name c. Displays the abbreviated day name d. Displays the abbreviated month name
What does the following statements do? from datetime import * print(datetime.today().strftime(‘%b’)) a. Displays the full month name b. Displays the abbreviated month name c. Displays the full day name d. Displays the abbreviated day name
What does the following statements do? from time import * print(time()) a. Displays the current time in seconds since the Epoch as a floating point number b. Displays the current time in minutes since the Epoch as a floating point number c. Displays the current time in seconds since the Epoch as an integer d. Displays the current time in minutes since the Epoch as an integer
What does the following statements do? from time import * sleep(3) a. Pauses the execution of the program by 3 minutes b. Pauses the execution of the program by 3 seconds c. Displays the current time in seconds since the Epoch as an integer d. Displays the current time in minutes since the Epoch as an integer
What will be the output after the following statements? x = ‘Python’ y = ‘MCQ’ print(x + y) a. Python Python b. MCQ MCQ c. Python MCQ d. PythonMCQ
What will be the output after the following statements? x = ‘Python ‘ print(x*3) a. Pyt Pyt Pyt b. t c. Python Python Python d. PythonPythonPython
What will be the output after the following statements? x = ‘Python ‘ print(x[4]) a. h b. t c. Python Python Python Python d. o
What will be the output after the following statements? x = ‘Python’ print(x[2:4]) a. Pyth b. th c. tho d. thon
What will be the output after the following statements? x = ‘Python’ print(x[:]) a. yth b. Pn c. Python d. PythonPythonPython
What will be the output after the following statements? x = ‘Python’ print(‘y’ in x) a. y b. Y c. Python d. True
What will be the output after the following statements? x = ‘Python’ print(‘p’ not in x) a. p b. P c. True d. False
What will be the output after the following statements? x = ‘{} 3 {}’.format(‘Python’, ‘Test’) print(x) a. Python 3 Test b. Python Test c. Test 3 Python d. Test Python
What will be the output after the following statements? x = ‘{1} for {0}’.format(‘Python’, ‘Questions’) print(x) a. Python for Questions b. Questions for Python c. 1 for 0 d. Python 1 for 0 Questions
What will be the output after the following statements? x = ‘%s MCQ %s’ %(‘Python’, ‘Test’) print(x) a. Python MCQ b. MCQ Test c. Test MCQ Python d. Python MCQ Test
What will be the output after the following statements? x = ‘Python %d Version’ %(3) print(x) a. Python 3 b. 3 Version c. Python 3 Version d. Python Version 3
What will be the output after the following statements? x = ‘Python %c or Python %c’ %(‘2’, ‘3’) print(x) a. Python 3 or Python 2 b. Python 2 or Python 3 c. Python 2 or Python 2 d. Python 23
What will be the output after the following statements? x = ‘Python %.1f or Python %.2f’ %(2.7, 3.51) print(x) a. Python 3.51 or Python 2.7 b. Python 2 or Python 3 c. Python 2.7 or Python 3.5 d. Python 2.7 or Python 3.51
What will be the output after the following statements? x = ‘Python’ print(x.capitalize()) a. Python b. Python.capitalize c. PYTHON d. pYTHON
What will be the output after the following statements? x = ‘python job interview’ print(x.title()) a. python job interview b. Python job interview c. Python Job Interview d. Python job Interview
What will be the output after the following statements? x = ‘python jobs’ print(x.upper()) a. PYTHON JOBS b. Python jobs c. Python Jobs d. python jobs
What will be the output after the following statements? x = ‘python jobs’ print(x.lower()) a. PYTHON JOBS b. Python jobs c. Python Jobs d. python jobs
What will be the output after the following statements? x = ‘Python Jobs’ print(x.swapcase()) a. PYTHON JOBS b. pYTHON jOBS c. Python Jobs d. python jobs
What will be the output after the following statements? x = ‘Python’ print(x.join(’33’)) a. Python33 b. 3Python3 c. Python3 d. Python 33
What will be the output after the following statements? x = ‘Python Test’ print(x.join(’33’)) a. 3Python Test3 b. 3Python3Test c. Python3Test3 d. Python Test33
What will be the output after the following statements? x = ‘ Python ‘ y = ‘3’ print(x.lstrip()+y.lstrip()) a. Python 3 b. 3Python3 c. Python3 d. Python+3
What will be the output after the following statements? x = ‘Python ‘ y = ‘3 ‘ print(x.rstrip()+y.rstrip()) a. Python 3 b. 3Python3 c. Python3 d. Python+3
What will be the output after the following statements? x = ‘ Python ‘ y = ‘ 3 ‘ z = ‘ Questions ‘ print(x.strip()+y.strip()+z.strip()) a. Python 3 Questions b. Python3Questions c. Python3 Questions d. Python 3Questions
What will be the output after the following statements? x = ‘Interview’ print(x.replace(‘e’,’ ‘)) a. Interview b. Intrviw c. I n t e r v i e w d. Int rvi w
What will be the output after the following statements? x = ‘MCQs’ print(x.ljust(10,’*’)) a. MCQs****** b. M C Q S c. ******MCQs d. M C Q s
What will be the output after the following statements? x = ‘MCQs’ print(x.rjust(10,’*’)) a. MCQs****** b. M C Q S c. ******MCQs d. M C Q s
What will be the output after the following statements? x = ‘MCQs’ print(x.center(10,’*’)) a. MCQs****** b. ***MCQs*** c. ******MCQs d. M C Q s
What will be the output after the following statements? x = ‘Python Pi Py Pip’ print(x.count(‘p’)) a. 1 b. 0 c. 4 d. 5
What will be the output after the following statements? x = ‘Python Pi Py’ print(x.find(‘p’)) a. -1 b. 0 c. 1 d. 3
What will be the output after the following statements? x = ‘Python Pi Py’ print(x.find(‘P’)) a. -1 b. 0 c. 1 d. 3
What will be the output after the following statements? x = ‘Pi Py Python’ print(x.startswith(‘p’)) a. 1 b. 0 c. True d. False
What will be the output after the following statements? x = ‘Pi Py Python’ print(x.endswith(‘n’)) a. 1 b. 0 c. True d. False
What will be the output after the following statements? x = ‘Python’ print(x.isalpha()) a. 1 b. 0 c. True d. False
What will be the output after the following statements? x = ‘Python 3’ print(x.isnumeric()) a. 1 b. 0 c. True d. False
What will be the output after the following statements? x = ‘Python 3 MCQ’ print(x.isalnum()) a. 1 b. 0 c. True d. False
What will be the output after the following statements? x = ‘Python 3 MCQ’ print(x.islower()) a. True b. False c. 1 d. 0
What will be the output after the following statements? x = ‘Python 3 MCQ’ print(x.istitle()) a. True b. False c. 1 d. 0
What will be the output after the following statements? x = ‘MCQ’ print(x.isupper()) a. True b. False c. 1 d. 0
What will be the output after the following statements? x = ‘\n’ print(x.isspace()) a. True b. False c. 1 d. 0
What will be the output after the following statements? x = ‘2000’ print(x.isdigit()) a. True b. False c. 1 d. 0