gs gs109 Python Modules - Python Operating System - 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: What does os.name contain?
the name of the operating system dependent module imported
the address of the module os
error, it should’ve been os.name()
none of the mentioned
Question 2: What does print(os.geteuid()) print?
the group id of the current process
the user id of the current process
both the group id and the user of the current process
none of the mentioned
Question 3: What does os.getlogin() return?
name of the current user logged in
name of the superuser
gets a form to login as a different user
all of the mentioned
Question 4: What does os.close(f) do?
terminate the process f
terminate the process f if f is not responding
close the file descriptor f
return an integer telling how close the file pointer is to the end of file
Question 5: What does os.fchmod(fd, mode) do?
change permission bits of the file
change permission bits of the directory
change permission bits of either the file or the directory
none of the mentioned
Question 6: Which of the following functions can be used to read data from a file using a file descriptor?
os.reader()
os.read()
os.quick_read()
os.scan()
Question 7: Which of the following returns a string that represents the present working directory?
os.getcwd()
os.cwd()
os.getpwd()
os.pwd()
Question 8: What does os.link() do?
create a symbolic link
create a hard link
create a soft link
none of the mentioned
Question 9: Which of the following can be used to create a directory?
os.mkdir()
os.creat_dir()
os.create_dir()
os.make_dir()
Question 10: Which of the following can be used to create a symbolic link?
os.symlink()
os.symb_link()
os.symblin()
os.ln()