Python Programming Quiz – 3rd
Week Quiz Solution
Important Notes:-
Hello Dosto Please Subscribe Our Youtube channel Because Copyright Problem In this post ( python / css / Al / nptel ) So please i humble Request Subscribe Our channel or social Networks ( than we are all are connect To each and every person ) These are Our youtube channel My Youtube Channel .. only 321 subscribe in my youtube channel .( channel ko subscribe kar lo kyuki kabhi bhi website band ho sakti hai sar post 2019 se ho rhe hai or answer sare senior ke dwara batye hue hai ) . youtube channel ko jaldi se share karo tak jada subscribe ho jaye to copyright ka koi problem na ho .. thanks
[1] If A=set(‘python’) and B=set(‘programming’) What is the output of A-B ?
(a): {‘m’, ‘r’, ‘i’}
(b): {‘m’, ‘r’, ‘g’, ‘a’, ‘i’}
(c): {‘h’, ‘y’, ‘t’}
(d): {‘y’, ‘h’, ‘t’, ‘a’}
Answer: (c) {‘h’, ‘y’, ‘t’}
Reason :- A = set and B = set so the output of A-B is {‘h’, ‘y’, ‘t’}.
[2] What should be the outcome of the following? count=40 count>=30 and count<39
(a): True
(b): False
(c): Error
(d): None of above
Answer: (b) False
Reason :- count=40 count>=30 and count<39 is False be the outcome of this following .
[3] If names=[‘abhay’, ‘mahesh’, ‘prashant’, ‘sandeep’] , what does the following statement do: ‘rakesh’ in names
(a): checks if ‘rakesh’ is there in names
(b): deletes ‘rakesh’ from names
(c): add ‘raksesh’ to names
(d): append names with ‘rakesh’
Answer: (a) checks if ‘rakesh’ is there in names
Reason :- if names the following statement do "rakesh’ in names of checks if ‘rakesh’ is there in names to print do statement .
[4] What will be the output of the following? (3 < 1) and (4/0 > 1)
(a): False
(b): True
(c): Run-time error
(d): None of the above
Answer: (a) False
Reason :- the output of the following? (3 < 1) and (4/0 > 1) is false .
[5] In Python ‘And’ and ‘Or’ operators are also called:
(a): Short circuit operators
(b): Logical operators
(c): Both A and B
(d): None of the above
Answer: (c) Both A and B
Reason :- In Python ‘And’ and ‘Or’ operators are also called Short circuit operators & Logical operators .
8 Comments
Thank you bhai .... u are doing great work .... appericiated
ReplyDeleteThankyou for supporting..
DeleteBhai week 4 update kr do with reasons
DeleteThanks alot ,Bruh!
ReplyDeletethank u
ReplyDeleteQuiz 4 answer with explanation please bhai
ReplyDeleteQUIZ 4 SIR plzzz
ReplyDeleteQuiz 4
ReplyDelete