integrates the explication by Abdellah and fixes the empty answer mentioned by David

This commit is contained in:
waldek 2021-06-08 21:50:59 +02:00
parent 44ba78411e
commit d37c96daea
2 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
LEVEL,ANSWER,QUESTION,1,2,3,4,5,6,,, LEVEL,ANSWER,QUESTION,1,2,3,4,5,EXPLICATION,,,
010-160,3,Which of the following is **not** a function of the Linux kernel?,Allocating memory for use by programs,Allocating CPU time for use by programs,Creating menus in GUI programs,Controlling access to the hard disk,Enabling programs to use a network,"GUI programs create menus with the help of a library that's designed for this purpose; this is not a function of the Linux kernel. Thus, option 3 is a non-kernel function, and is correct. The kernel allocates memory and CPU time, and it also controls access to disk and network hardware, so options 1, 2, 4, and 5 all describe kernel functions and are incorrect.",,, 010-160,3,Which of the following is **not** a function of the Linux kernel?,Allocating memory for use by programs,Allocating CPU time for use by programs,Creating menus in GUI programs,Controlling access to the hard disk,Enabling programs to use a network,"GUI programs create menus with the help of a library that's designed for this purpose; this is not a function of the Linux kernel. Thus, option 3 is a non-kernel function, and is correct. The kernel allocates memory and CPU time, and it also controls access to disk and network hardware, so options 1, 2, 4, and 5 all describe kernel functions and are incorrect.",,,
010-160,1,Which of the following is an example of an embedded Linux OS?,Android,SUSE,CentOS,Debian,Fedora,"Android is used on cell phones and other small portable devices, and as such it qualifies as an embedded OS, making option 1 correct. SUSE, CentOS, Debian, and Fedora are all examples of distributions intended mainly for use on desktop, laptop, and server computers; these do not qualify as embedded OSs, so options 2, 3, 4, and 5 are all incorrect.",,, 010-160,1,Which of the following is an example of an embedded Linux OS?,Android,SUSE,CentOS,Debian,Fedora,"Android is used on cell phones and other small portable devices, and as such it qualifies as an embedded OS, making option 1 correct. SUSE, CentOS, Debian, and Fedora are all examples of distributions intended mainly for use on desktop, laptop, and server computers; these do not qualify as embedded OSs, so options 2, 3, 4, and 5 are all incorrect.",,,
010-160,2,Which of the following is a notable difference between Linux and Mac OS X? ,Linux can run common GNU programs whereas OS X cannot.,Linux's GUI is based on the X Window System whereas OS X's is not.,Linux cannot run on Apple Macintosh hardware whereas OS X can run only on Apple hardware.,Linux relies heavily on BSD software whereas OS X uses no BSD software.,Linux supports text-mode commands but OS X is a GUI-only OS.,"Linux's GUI is based on the X Window System. Although OS X provides an X implementation, its primary GUI is Apple's proprietary product. Thus, option 2 is correct. Option 1 is incorrect because both Linux and OS X can run most GNU programs. Option 3 is incorrect because Linux can run on both Apple Macintosh and commodity PC hardware. Option 4 is incorrect because OS X includes many BSD utilities in its standard form. Furthermore, most Linux distributions use GNU utilities rather than their BSD equivalents, although you can use BSD utilities in Linux if you prefer. Option 5 is incorrect because both Linux and OS X support text-mode commands, although OS X makes it hard to use these commands in anything but its GUI Terminal application.",,, 010-160,2,Which of the following is a notable difference between Linux and Mac OS X? ,Linux can run common GNU programs whereas OS X cannot.,Linux's GUI is based on the X Window System whereas OS X's is not.,Linux cannot run on Apple Macintosh hardware whereas OS X can run only on Apple hardware.,Linux relies heavily on BSD software whereas OS X uses no BSD software.,Linux supports text-mode commands but OS X is a GUI-only OS.,"Linux's GUI is based on the X Window System. Although OS X provides an X implementation, its primary GUI is Apple's proprietary product. Thus, option 2 is correct. Option 1 is incorrect because both Linux and OS X can run most GNU programs. Option 3 is incorrect because Linux can run on both Apple Macintosh and commodity PC hardware. Option 4 is incorrect because OS X includes many BSD utilities in its standard form. Furthermore, most Linux distributions use GNU utilities rather than their BSD equivalents, although you can use BSD utilities in Linux if you prefer. Option 5 is incorrect because both Linux and OS X support text-mode commands, although OS X makes it hard to use these commands in anything but its GUI Terminal application.",,,

1 LEVEL ANSWER QUESTION 1 2 3 4 5 6 EXPLICATION
2 010-160 3 Which of the following is **not** a function of the Linux kernel? Allocating memory for use by programs Allocating CPU time for use by programs Creating menus in GUI programs Controlling access to the hard disk Enabling programs to use a network GUI programs create menus with the help of a library that's designed for this purpose; this is not a function of the Linux kernel. Thus, option 3 is a non-kernel function, and is correct. The kernel allocates memory and CPU time, and it also controls access to disk and network hardware, so options 1, 2, 4, and 5 all describe kernel functions and are incorrect.
3 010-160 1 Which of the following is an example of an embedded Linux OS? Android SUSE CentOS Debian Fedora Android is used on cell phones and other small portable devices, and as such it qualifies as an embedded OS, making option 1 correct. SUSE, CentOS, Debian, and Fedora are all examples of distributions intended mainly for use on desktop, laptop, and server computers; these do not qualify as embedded OSs, so options 2, 3, 4, and 5 are all incorrect.
4 010-160 2 Which of the following is a notable difference between Linux and Mac OS X? Linux can run common GNU programs whereas OS X cannot. Linux's GUI is based on the X Window System whereas OS X's is not. Linux cannot run on Apple Macintosh hardware whereas OS X can run only on Apple hardware. Linux relies heavily on BSD software whereas OS X uses no BSD software. Linux supports text-mode commands but OS X is a GUI-only OS. Linux's GUI is based on the X Window System. Although OS X provides an X implementation, its primary GUI is Apple's proprietary product. Thus, option 2 is correct. Option 1 is incorrect because both Linux and OS X can run most GNU programs. Option 3 is incorrect because Linux can run on both Apple Macintosh and commodity PC hardware. Option 4 is incorrect because OS X includes many BSD utilities in its standard form. Furthermore, most Linux distributions use GNU utilities rather than their BSD equivalents, although you can use BSD utilities in Linux if you prefer. Option 5 is incorrect because both Linux and OS X support text-mode commands, although OS X makes it hard to use these commands in anything but its GUI Terminal application.

View File

@ -43,11 +43,22 @@ def print_random_question(data):
def _test_question(data): def _test_question(data):
result = input("What's your answer? ") result = input("What's your answer? ")
if len(result) == 0:
return False
if result in data["ANSWER"]: if result in data["ANSWER"]:
return True return True
else: else:
return False return False
def print_explication(data):
if not "EXPLICATION" in data.keys():
return False
c = Console()
explication = "# {}".format(data["EXPLICATION"])
explication = Markdown(explication)
c.print(explication)
def _print_succes(status): def _print_succes(status):
c = Console() c = Console()
if status: if status:
@ -74,6 +85,8 @@ if __name__ == "__main__":
status = _test_question(question) status = _test_question(question)
counter.append(status) counter.append(status)
_print_succes(status) _print_succes(status)
if not status:
print_explication(question)
print_stats(counter) print_stats(counter)
except KeyboardInterrupt: except KeyboardInterrupt:
print("byebye") print("byebye")