A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
Add more trivia questions. Format is `- question - 'answer' or 'answer2' (note)
Science
How much obsidian is required to craft an enchantment table? - '4'
CS
Which Turing Award winner created a typesetting language based on Tex? - 'Lamport' or 'Leslie Lamport'
What letter is used to separate date and time in ISO 8601? - 'T'
HTTP/3 is built on which Transport Layer Protocol? - 'UDP'
What algorithm yields accurate RTT measurements in TCP? - 'Karn' or 'Karn-Partridge'
What standard provides the basis for Wi-Fi networks? - '802.11' or 'IEEE 802.11'
A database index that reorders the data to match the index is called a ____ index. - 'Clustered'
What does the 'B' in 'B-Tree' stand for? - 'Nothing' or 'Unknown'
The name server with the original zone records for a domain is called the ____ name server. - 'Authoritative'
What is the name of the memory cache that stores recent mappings from virtual memory to physical memory? - 'TLB' or 'Translation lookaside buffer'
The process of moving unused page tables out of memory is called? - 'Swapping'
A failing page table lookup is known as? - 'Page fault'
What is the nickname for the textbook 'Compilers: Principles, Techniques, and Tools'? - 'Dragon Book'
In functional programming, a function with identical return values for identical arguments and no side effects is called? - 'Pure function'
On Linux systems, the fork system call returns what value in the parent process? - 'PID' or 'child PID'
Python
What standard library module implements a topological sort function? - 'graphlib'
Fstrings, str.format, and % style formatting all perform what operation? - 'string interpolation' or 'interpolation' (kinda iffy on the wording for this one)
What built-in function is the asynchronous version of a function that returns the next value of an iterator? - 'anext'
What module should be used for extended precision floating point values? - 'decimal'
What function can be used to increase the length limit for string to integer conversion? - 'sys.set_int_max_str_digits'
What is the default length limit for converting strs to ints in CPython 3.11+? - '4300'
What is the minimum length limit for converting strs to ints in CPython 3.11+? - '640'
What environment variable configures the length limit for converting strs to ints in CPython 3.11+? - 'PYTHONINTMAXSTRDIGITS'
An instance of what type is returned when indexing into an instance of bytes? - 'int'
What is hash(float('iNf'))? - '314159'
What kind of regex quantifiers were added in Python 3.11? - 'possessive'
Who invented Tim Sort? - 'Tim Peters' (Do not accept 'tim')
What is the size of the re module's internal cache? - '512'
What is the minimum number of comparison methods a class must implement to support total ordering? - '2'
What is pow(0, 0)? - '1'
What is the max value of hash(x) if x is an int on 32-bit machines? - '2^31 - 2' or '2**31 - 2'
What common operation does this function implement?
def mystery(x: float):
return x + 2**52 - 2**52
'round'
What common operation does this function implement?
def mystery(x: int):
return (x>>1<<1)^x
'is odd'
Reasoning
Currently, there are so few questions that frequent users can memorize all the answers. Adding more questions will help alleviate this problem. (And now I will know all the answers evil laugh)
Proposed Implementation
Modify sir-lancebot/bot/resources/fun/trivia_quiz.json with the new questions.
Description
Add more trivia questions. Format is `- question - 'answer' or 'answer2' (note)
Science
CS
fork
system call returns what value in the parent process? - 'PID' or 'child PID'Python
str.format
, and%
style formatting all perform what operation? - 'string interpolation' or 'interpolation' (kinda iffy on the wording for this one)sys.set_int_max_str_digits
'str
s toint
s in CPython 3.11+? - '4300'str
s toint
s in CPython 3.11+? - '640'str
s toint
s in CPython 3.11+? - 'PYTHONINTMAXSTRDIGITS'bytes
? - 'int'hash(float('iNf'))
? - '314159're
module's internal cache? - '512'pow(0, 0)
? - '1'hash(x)
ifx
is anint
on 32-bit machines? - '2^31 - 2' or '2**31 - 2''round'
'is odd'
Reasoning
Currently, there are so few questions that frequent users can memorize all the answers. Adding more questions will help alleviate this problem. (And now I will know all the answers evil laugh)
Proposed Implementation
Modify
sir-lancebot/bot/resources/fun/trivia_quiz.json
with the new questions.Additional Details
Would you like to implement this yourself?