Home / Programming Questions / Page 5
Q. What is the output of the following code? def foo(fname, val): print(fname(val)) foo(max, [1, 2, 3]) foo(min, [1, 2, 3])
Q. What is the output of the following? elements = [0, 1, 2] def incr(x): return x+1 print(list(map(elements, incr)))
Q. What is the output of the following? elements = [0, 1, 2] def incr(x): return x+1 print(list(map(incr, elements)))
Q. What is the output of the following? def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))
Q. What is the output of the following? x = ['ab', 'cd'] print(len(list(map(list, x))))
Q. What is the output of the following piece of code? #mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
Q. What is the output of the following program? tday=datetime.date.today() print(tday.month())
Q. Which of the following formatting options can be used in order to add „n‟ blank spaces after a given string „S‟?
....
Jump to Go
Bootstrap MCQs
C # MCQs
C ++ MCQs
C Programming MCQs
CSS MCQs
HTML MCQs
JAVA MCQs
Javascript MCQs
Linux MCQs
Microsoft Access MCQs
Microsoft Excel MCQs
Microsoft Power Point MCQs
Microsoft Word MCQs
MS Dos MCQs
MySQL MCQs
Perl MCQs
PHP MCQs
Python MCQs
Ruby MCQs
SQL Server MCQs
Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.
Menu
Donate Us
Quiz
Forum
Hindi MCQs
Topics
Test Series
Programming Questions
Advance Search
Shop
Duo Test
Login
Sign Up