gs gs109 Python Modules - Python Sys Module - Quiz No.1
gs gs109 Python Quiz
This quiz belongs to book/course code gs gs109 Python of gs organization. We have 134 quizzes available related to the book/course Python. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Python Modules. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: Which of the following functions can help us to find the version of python that we are currently working on?
sys.version
sys.version()
sys.version(0)
sys.version(1)
Question 2: Which of the following functions is not defined under the sys module?
sys.platform
sys.path
sys.readline
sys.argv
Question 5: What will be the output of the following Python code, if the sys module has already been imported?
sys.stdout.write("hello world")
helloworld
hello world10
hello world11
error
Question 6: What will be the output of the following Python code?
import sys sys.stdin.readline() NVAEducation
‘NVAEducation\n’
‘NVAEducation’
‘NVAEducation10’
Error
Question 7: What will be the output of the following Python code?
import sys eval(sys.stdin.readline()) "India"
India5
India
‘India\n’
‘India’
Question 8: What will be the output of the following Python code?
import sys eval(sys.stdin.readline()) Computer
Error
‘Computer\n’
Computer8
Computer
Question 9: What will be the output of the following Python code?
import sys sys.argv[0]
Junk value
‘ ‘
No output
Error
Question 10: What will be the output of the following Python code?
import sys sys.stderr.write(“hello”)
‘hello’
‘hello\n’
hello
hello5