The Joy of Computing Using Python NPTEL Week 11 Answers

Are you looking for The Joy of Computing Using Python NPTEL Week 11 Answers? You’ve come to the right place! Access the latest and most accurate solutions for your Assignment 11 in The Joy of Computing Using Python course



The Joy of Computing Using Python NPTEL Week 11 Answers (Jan-Apr 2025)

Course Link: Click Here


1. In Selenium, what is the purpose of WebDriver, such as webdriver.Chrome()?

a) It is used to interact with web elements like buttons and text fields.
b) It launches and controls a web browser session for automation.
c) It is used to write test cases in Selenium.
d) It provides built-in methods to handle databases in web applications.

View Answer


2. Which of the following is the best locator strategy in Selenium in terms of performance?

a) find_element_by_name()
b) find_element_by_id()
c) find_element_by_class_name()
d) find_element_by_xpath()

View Answer


3. Selenium WebDriver can be used to automate both web and native mobile applications on Android and iOS.

a) True
b) False

View Answer


4. What is the output of the following Python code?

a) (0, 0) (0, 1) (1, 0) (1, 1) (2, 0) (2, 1) (4, 0) (4, 1)
b) (0, 0) (0, 1) (1, 0) (1, 1) (2, 0) (2, 1) (3, 0) (3, 1) (4, 0) (4, 1)
c) (0, 0) (0, 1) (1, 0) (1, 1) (2, 0) (2, 1) (3, 0) (3, 1) (3, 2) (4, 0) (4, 1)
d) (0, 0) (0, 1) (1, 0) (1, 1) (2, 0) (2, 1) (3, 0) (4, 0) (4, 1) (4, 2)

View Answer


5. What will be the output of the following Python code, which performs a modified linear search?

a) Checking 3 Checking 8 Checking 1 Found at index 3
b) Checking 3 Checking 1 Found at index 3
c) Checking 3 Checking 8 Checking 1 Checking 7 Found at index 3
d) Found at index 3

View Answer


The Joy of Computing Using Python NPTEL Week 11 Answers


6. What does calendar.isleap(2100) return?

a) False
b) True
c) None
d) 1

View Answer


7. What is the output of datetime.date(2024, 2, 29) + datetime.timedelta(days=1)?

a) 2024-02-30
b) 2024-03-01
c) ValueError
d) 2024-02-29

View Answer


8. Which function is used to get the current local time in Python?

a) time.localtime()
b) datetime.now()
c) time.time()
d) datetime.utcnow()

View Answer


9. What happens when you apply .astimezone() to a naive datetime object?

a) It changes to UTC
b) It raises an error
c) It assumes local timezone
d) It converts to IST

View Answer


10. What is the output of the following Python code?

a) 2024-02-29 12:00:00 IST
b) 2024-02-29 06:30:00 UTC
c) 2024-02-29 12:00:00 UTC
d) Error

View Answer


These are The Joy of Computing Using Python NPTEL Week 11 Answers

All Weeks of The Joy of Computing Using Python: Click here

For answers to additional Nptel courses, please refer to this link: NPTEL Assignment Answers