Hey!! How are you doing, the answers are ready! This Week NPTEL Joy Of Computing Using Python Week 11 Assignment 2025. All of the questions were solved and their proofs were. Also, the previous assignment of Week 10 Assignment is available now.
Also Read: NPTEL Joy Of Computing Using Python Week 10 Assignment 2025
Q1. 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.
Answer: [ B ] It launches and controls a web browser session for automation.
Q2. 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()
Answer: [ B ] find_element_by_id()
Q3. Selenium WebDriver can be used to automate both web and native mobile applications on Android and iOS.
A. True
B. False
Answer: [ B ] False
Q4. 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)
Answer: [ A ] (0, 0) (0, 1) (1, 0) (1, 1) (2, 0) (2, 1) (4, 0) (4, 1)
Q7. 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
Answer: [ B ]Â 2024-03-01Â
Q8. Which function is used to get the current local time in Python?
A. time.localtime()
B. datetime.now()
C. time.time()
D. datetime.utcnow()
Answer: [ B ]Â datetime.now()
Q9. 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
Answer: [ B ] It raise an error
Q10. 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
Also Read: NPTEL Joy Of Computing Using Python Week 10 Assignment 2025
Join us on Telegram 👉 CLICK HERE Â
NPTEL Joy Of Computing Using Python Week 11 Assignment 2025
In this week, the following topics were discussed:
- Browser Automation using Watsapp
- Fun with Calender
Last Date: 2025-04-09Â
Q1. 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.
Answer: [ B ] It launches and controls a web browser session for automation.
Q2. 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()
Answer: [ B ] find_element_by_id()
Q3. Selenium WebDriver can be used to automate both web and native mobile applications on Android and iOS.
A. True
B. False
Answer: [ B ] False
Q4. What is the output of the following Python code?
for i in range(5):  for j in range(5):    if j==2:      break    if i==3:      continue    print(f"({i}, {j})", end=" ") {codeBox}
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)
Answer: [ A ] (0, 0) (0, 1) (1, 0) (1, 1) (2, 0) (2, 1) (4, 0) (4, 1)
Q5. What will be the output of the following Python code, which performs a modified linear search?
A. Checking 3
   Checking 8
arr=[3, 8, 1, 7, 9, 2]key = 7for i in range(len(arr)):  if arr[i]==key:    print(f"Found at index {i}")    break  if arr[i] % 2 ==0:    continue  print(f"Checking{arr[i]}") {codeBox}
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
   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
   Checking 7
   Found at index 3
D. Found at index 3
Answer: [ B ]Â
Checking 3
Checking 1
Found at index 3
Checking 1
Found at index 3
Q6. What does calendar.isleap(2100) return?
A. False
B. True
C. None
D. 1
Answer: [ A ] False
A. False
B. True
C. None
D. 1
Answer: [ A ] False
Q7. 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
Answer: [ B ]Â 2024-03-01Â
Q8. Which function is used to get the current local time in Python?
A. time.localtime()
B. datetime.now()
C. time.time()
D. datetime.utcnow()
Answer: [ B ]Â datetime.now()
Q9. 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
Answer: [ B ] It raise an error
Q10. What is the output of the following Python code?
from datetime import datetimeimport pytzdt_naive = datetime(2024, 2, 29, 12, 0, 0)tz_ist = pytz.timezone('Asia/Kolkata')dt_aware = tz_ist.localize(dt_naive)print(dt_aware.strftime("%Y-%m-%d %H:%M:%S %Z")) {codeBox}
B. 2024-02-29 06:30:00 UTC
C. 2024-02-29 12:00:00 UTC
D. Error
Answer: [ A ] 2024-02-29 12:00:00 IST
Conclusion
Join us on Telegram 👉 CLICK HERE