Maha - Python One Mark QP
Maha - Python One Mark QP
18BELE22 - Python programming quiz questions with answers for unit 3,4&5.
A. Interpreter
B. Translator
C. Compiler
Answer: Option A
A. function myfunction():
B. create myFunction():
C. def myFunction():
D. Fn functions
Answer : Option C
A.str = “demo666”
B.str = “666”
D.str = “$$$666”
Answer : A
4)Which of the following represents a distinctly identifiable entity in the real world?
A.. A class
B. An object
C. A method
D. A data field
Answer. B
A. A constructor
B. A class
C. A value-returning method
D. A None method
Answer. A
Answer: b
7)To read two characters from a file object infile, we use ____________
a) infile.read(2)
b) infile.read()
c) infile.readline()
d) infile.readlines
Answer: a
8) To read the entire remaining contents of the file as a string from a file object infile, we use
____________
a) infile.read(2)
b) infile.read()
c) infile.readline()
d)rd()
Answer :c
F = None
If I > 2:
Break
Print(f.closed)
a) True
b) False
c) None
d) Error
Answer: a
10)HTML(Hypertext Markup Language) has language elements which permit certain actions other than
describing the structure of the web document. Which one of the following actions is NOT supported by
pure HTML (without any server or client side scripting)pages?
A.Embed web objects from different sites into the same page
Answer.d
11) Which of the following is an advantage of putting presentation information in a separate CSS file
rather than in HTML itself?A.The content becomes easy to manage
B.Becomes easy to make site for different devices like mobile by making separate CSS files
C.CSS Files are generally cached and therefore decrease server load and network traffic.
Answer.d
12) In a web server, ten WebPages are stored with the URLs of the form
http://www.yourname.com/var.html; where, var is a different number from 1 to 10 for each Webpage.
Suppose, the client stores the Webpage with var = 1 (say W1) in local machine, edits and then tests. Rest
of the WebPages remains on the web server. W1 contains several relative URLs of the form “var.html”
referring to the other WebPages. Which one of the following statements needs to be added in W1, so
that all the relative URLs in W1 refer to the appropriate WebPages on the web server?
C.<a.href: “http://www.yourname.com/”>
Answer. b
13) Consider the three commands : PROMPT, HEAD and RCPT. Which of the following options indicate a
correct association of these commands with protocols where these are used?
SMTP, HTTP, FT
Answer.b
14) Which of the following is TRUE only of XML but NOT HTML?
Answer.c
A.XSL document
B.XML document
C.XHTML document
D.XQuery document
Answer.b