Quiz Space

Modern Application Development I · Quiz 2 · 4 Aug 2024 · May 2024 term

Question 14: Consider the following Python code snippet. Filename: co…

Question 14

+4.5 marksOne correct option

Consider the following Python code snippet.

Filename: code.py

python
import logging
import sys
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
logging.warning('This is only for testing.')
if sys.argv[1] == 'info':
logging.info('This code is working as expected.')
if sys.argv[1] == 'debug':
logging.debug('This code may have issues, debugging...')
logging.warning('code execution complete!')

What will be output on the terminal is the above code snippet is run on the terminal using command: python code.py debug

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 14 of 16 in the IIT Madras BS Modern Application Development I (MAD 1) Quiz 2 paper sat on 4 Aug 2024, in the May 2024 term (IIT M DIPLOMA AN EXAM QDD2 4 Aug 2024). It carries 4.5 marks.

More questions from this paper

  1. Q1Read the statements given below carefully and select the correct option.\ Statement 1: The GET method is the same as th…
  2. Q2Consider the below flask_sqlalchemy data models “Product”, “Supplier” and “Supply” given in the code below. What will b…
  3. Q3A certain video on the web occupies 3 gigabytes of memory of the server. If the number of viewers of the video over tim…
  4. Q4Consider the following Python code. app.py Using MaxScores data model in the above “app.py”. What is the correct sequen…
  5. Q5Consider the following Python code snippet, and select the correct output list if the code is run on the terminal.
  6. Q6Consider the following flask application. If the application is running locally on http://127.0.0.1:5000 then which of …
  7. Q7Consider the following code. Assume that the above flask code is running locally on http://127.0.0.1:5000/ . Which of t…
  8. Q8Consider the following flask application running locally on http://127.0.0.1:5000 app.py Based on the above data, answe…
  9. Q9Consider the following flask application running locally on http://127.0.0.1:5000 app.py Based on the above data, answe…
  10. Q10If the flask application is running locally on URL http://127.0.0.1:5000. Select the appropriate options for the given …
  11. Q11If the flask application is running locally on URL http://127.0.0.1:5000. Select the appropriate options for the given …
  12. Q12You have a DRAM module with bus width of 64 bits, clock speed of 400 MHz, and operating in DDR (double-data-rate or two…
  13. Q13Figure question
  14. Q15Consider the following flask application. app.py Which of the following statements is/are true if the application is ru…
  15. Q16Consider the following HTML Document and select the correct statement(s) from the following if a user types the passwor…