Tcs Pa Python Mcqs
Tcs Pa Python Mcqs
Python Tutorials Home Python Database Web Development TCS Campus Placement Follow
Udem
SUBSC
1. What gets printed
foo = {}
print type(foo)
<class ‘dict’>
Popula
TCS PA O
MCQs an
2. Type of error in ‘st’+1
Type error
TCS Proc
Question
3. Python supports regular expressions
True
TCS Proc
MCQs Qu
4. Like the else, the elif statement is optional.
True
5. What gets printed?
numberGames={}
numberGames[(1,2,3)]=8
numberGames[(4,2,1)]=10 Ta
numberGames[(1,2)]=12
sum=0 Basic Logical Programs
9. What is the di erence between a class and an object in python? TCS NQT
Question
Objects are created from class
TCS NQT
10. Raw_input() returns
Coding Q
String
This study source was downloaded by 100000796410834 from CourseHero.com on 01-20-2022 10:56:13 GMT -06:00
https://pythonvenue.blogspot.com/2020/05/tcs-pa-python-mcqs.html 1/6
https://www.coursehero.com/file/102655435/TCS-PA-Python-MCQspdf/
10/13/2020 TCS PA Python MCQs
print(x)
print(si[0:1],si[5:7])
4(‘s’,’nd’)
Follow b
12. Which method is used to delete an object created by initializing constructor.
Get all latest conten
Destructor to your
Email Address
Compiler Construction Pr
20. Str1=’helloworld’
Str1[::-1]
dlrowolleh Feature
TCS NQT
21. 2.0+2
4.0
TCS NQT
Question
22. E=’hello’ print E. nd(‘e’)
1
TCS NQT
23. What arithmetic operator can not be used with strings?
Coding Q
**,-
This study source was downloaded by 100000796410834 from CourseHero.com on 01-20-2022 10:56:13 GMT -06:00
https://pythonvenue.blogspot.com/2020/05/tcs-pa-python-mcqs.html 2/6
https://www.coursehero.com/file/102655435/TCS-PA-Python-MCQspdf/
10/13/2020 TCS PA Python MCQs
24. Foo={1:’1’,2:’2’,3:’3’}
Foo={} Total Pag
Follow
Print len(Foo)
0 132424
25. Print ‘new’’line’
newline
26. Python is not suited for fast and memory intensive tasks Follow b
Get all latest conten
ANS: True to your
Email Address
28. Which of the following are immutable built-in types of python Popula
numbers,strings,tuples
TCS PA O
MCQs an
29. The format function returns:
str
TCS Proc
Question
Conceptual Questions
36. names=['Amir','Barry','Chales','Dao']
TCS NQT
print names[-1][-1]
Question
o
https://pythonvenue.blogspot.com/2020/05/tcs-pa-python-mcqs.html 3/6
https://www.coursehero.com/file/102655435/TCS-PA-Python-MCQspdf/
10/13/2020 TCS PA Python MCQs
3.yes
4.false
Follow b
39. Sets={3,4,5,6}
Get all latest conten
sets.update([1,2,3]) to your
print(sets)
what is the output from the above snippet? Email Address
1.{1,2,3,3,4,5,6}
SUBSC
2.{1,2,3,4,5,6}
3.{1,2,4,5,6}
4.{1,2,3,4,5}
Popula
TCS PA O
40. variable 'a' is de ned as MCQs an
a='gOOd moRning'
Select the statement which will convert the 'a' from 'gOOd moRning' to 'Good Morning'?
1.a.upper() TCS Proc
2.a.string() Question
3.a.title()
4.a.lower()
TCS Proc
MCQs Qu
41. Mylist=['a','a',b','b','b','c','c','d','e']
Mylist.index('b')What is the output of the above code?
1. 2
2.3 Ta
3.4
4.5 Basic Logical Programs
CAMPUS PLACEMENT
Compiler Construction Pr
Feature
43. import math
print(math. oor(5.5)) TCS NQT
what is the output from the above code?
1.5.5
2.6
TCS NQT
3. 5
Question
4.0
TCS NQT
44.in the python the below statement represents X=a+5-b
Coding Q
1.alphabets
2.operands
This study source was downloaded by 100000796410834 from CourseHero.com on 01-20-2022 10:56:13 GMT -06:00
https://pythonvenue.blogspot.com/2020/05/tcs-pa-python-mcqs.html 4/6
https://www.coursehero.com/file/102655435/TCS-PA-Python-MCQspdf/
10/13/2020 TCS PA Python MCQs
3. None of these
4.Terms Total Pag
Follow
132424
SUBSC
TCS Proc
MCQs Qu
CAMPUS PLACEMENT
Compiler Construction Pr
48. What is the output of below python code?
s='TCS' Conceptual Questions
Feature
49. my_tuple=(1,,5,3,9)
my_tuple.append((8,6,7)) TCS NQT
print(len(my_tuple))
what is the output from the above code?
1.An exception is thrown
TCS NQT
2.1
Question
3.2
4.5
TCS NQT
MCQs TCS OPA TCS PA
Coding Q
This study source was downloaded by 100000796410834 from CourseHero.com on 01-20-2022 10:56:13 GMT -06:00
https://pythonvenue.blogspot.com/2020/05/tcs-pa-python-mcqs.html 5/6
https://www.coursehero.com/file/102655435/TCS-PA-Python-MCQspdf/
10/13/2020 TCS PA Python MCQs
Total Pag
Follow
132424
OLDER NEWER
TCS OPA MCQs 15 MAY TCS PA Java MCQs
Email Address
SUBSC
TCS PA Unix MCQs TCS PA PLSQL MCQs TCS PA RiO MCQs
0 Comments TCS PA O
MCQs an
TCS Proc
HOME CONTACT US MCQs Qu
Ta
CAMPUS PLACEMENT
Compiler Construction Pr
Conceptual Questions
PLACEMENT MATERIALS
Feature
TCS NQT
TCS NQT
Question
TCS NQT
Coding Q
This study source was downloaded by 100000796410834 from CourseHero.com on 01-20-2022 10:56:13 GMT -06:00
https://pythonvenue.blogspot.com/2020/05/tcs-pa-python-mcqs.html 6/6
https://www.coursehero.com/file/102655435/TCS-PA-Python-MCQspdf/
Powered by TCPDF (www.tcpdf.org)