The Joy of Computing using Python | Week 11 NPTEL Assignment Answers 2024

  These are the Joy of Computing using Python Assignment 11 Answers Q1. Select the correct statement regarding selenium library Selenium is ...

 
The Joy of Computing using Python | Week 11 NPTEL Assignment Answers 2024


These are the Joy of Computing using Python Assignment 11 Answers

Q1. Select the correct statement regarding selenium library

Selenium is primarily used for web browser automation

The web driver in selenium allows a way to interact with web browsers

The Keys Class provides a set of special keys that can be used for keyboard interaction

All of the above

Answer: All of the above


Q2. Which of the following tasks in WhatsApp can be automated using selenium?

Sending Media Files

Reading Messages

Creating and Managing Groups

Updating Profile Information


Answer: a), b), c), d)


For answers or latest updates join our telegram channel: Click here to join


These are the Joy of Computing using Python Assignment 11 Answers


Q3. Read the given code and identify the correct statement.

does_something returns a list of all time zones in Asia

the above code prints all time zones in Asia

The output of the code can change depending on the version of pytz used

All of the above


Answer: All of the above


Q4. Read the given code. What is the output of does_something(2022,2,29).(NAT)


Answer: 0


For answers or latest updates join our telegram channel: Click here to join


These are the Joy of Computing using Python Assignment 11 Answers


Q5. Read the given code.

Assume the file years.txt contains the following data.

What is the output of the code (NAT)


Answer: 2


Q6. Read the given code.

Enter the value of int(count_something(1996)==count_something(2024))


Answer: 1


For answers or latest updates join our telegram channel: Click here to join


These are the Joy of Computing using Python Assignment 11 Answers


Q7. Read the given code.

Enter the value returned by count_(1990,2024)


Answer: 9


Q8. In addition to the first birthday celebration, Koreans often celebrate “MiSeDol,” which marks the completion of the 100th day after a baby’s birth. This is considered another significant milestone. Given an input birthdate, the following code tries to calculate the date of “MiSeDol”, but the code might contain errors. Identify the line number corresponding to the error. In the absence of an error answer -1.


Answer: -1


For answers or latest updates join our telegram channel: Click here to join


These are the Joy of Computing using Python Assignment 11 Answers


Q9. Read the given code.

Find the value returned by finds_something (2000,12)


Answer: 5


Q10. Read the following code. What does count_something(2024,1) return ?


Answer: 23


For answers or latest updates join our telegram channel: Click here to join


These are the Joy of Computing using Python Assignment 11 Answers


The Joy of Computing using Python Programming Assignment

Question 1


Write the following functions:

(1) factors: accept a positive integer n as argument. Return the set of all factors of n.

(2) common_factors: accept two positive integers a and b as arguments. Return the set of common factors of the two numbers. This function must make use of factors.

(3) factors_upto: accept a positive integer n as argument. Return a dict D, whose keys are integers and values are sets. Each integer in the range [1,n], endpoints inclusive, is a key of D. The value corresponding to a key, is the set of all factors of key. This function must make use of factors.


The idea we are trying to bring out here is to make use of pre-defined functions whenever needed.


Solution:


def factors(n):

    factor_set = set()

    for ips in range(1, n + 1):

        if n % ips == 0:

            factor_set.add(ips)

    return factor_set



def common_factors(a, b):

    factors_a = factors(a)

    factors_b = factors(b)

    return factors_a.intersection(factors_b)


def factors_upto(n):

    factors_dict = {}

    for i in range(1, n + 1):

        factors_dict[i] = factors(i)

    return (factors_dict)

COMMENTS

Name

1sem,1,1st Sem,33,1st year,2,2 sem,1,2nd Sem,29,2sem,1,3rd Sem,40,4th sem,9,5th sem,28,6th sem,19,7th sem,8,8th sem,6,About BEU,1,ABOUT MAKAUT,1,aku civil Notes,15,Aku EE/EC Notes,14,aku ME Notes,14,aku notes,45,aku papers,11,aku syllabus,6,All Branch,2,all semester,19,B pharm,1,BAU Question Papers,1,BCA Notes,1,BEU Collage,12,BEU Model Paper Question,3,BEU Notes,10,BEU Organizer,31,BEU Previous Year Questions,2,Beu pyq,4,BEU PYQ Ans,5,BEU syllabus,8,Blogs,1,Btech results,1,Civil Branch,2,Civil Engineering,8,CS Engineering,8,CSE Branch,1,CSE Notes,19,Developing Soft Skills And Personality,13,EC Engineering,10,EE Branch,2,EE Engineering,9,engineering chemistry,5,Gate,1,internship,3,Introduction To Internet Of Things,21,Introduction To Machine Learning,2,iot,1,MAKAUT CE Organizer,6,MAKAUT CSE Organizer,5,MAKAUT ECE Organizer,3,MAKAUT EE Organizer,2,MAKAUT ME Organizer,4,MAKAUT Notes,5,MAKAUT Organizer,8,MAKAUT Question Paper,1,MAKAUT Syllabus,1,make money,6,ME Engineering,19,NPTEL,92,NPTEL COURSE,91,Programming Tutorial,12,Public Speaking,22,PYQ Solution,4,Question Bank,19,Soft Skills,33,Traffic & SEO,9,week 1,7,week 10,3,week 11,3,week 12,3,week 2,10,week 3,6,week 4,7,week 5,5,week 6,4,week 7,4,week 8,4,week 9,3,WEEK1,4,WEEK10,3,WEEK11,3,WEEK12,3,WEEK2,5,WEEK3,6,WEEK4,6,WEEK5,5,WEEK6,3,WEEK7,4,WEEK9,1,ztest,6,
ltr
item
BEU BIHAR : BEU PYQ , Beu previous year question All Courses All Semester Solutions: The Joy of Computing using Python | Week 11 NPTEL Assignment Answers 2024
The Joy of Computing using Python | Week 11 NPTEL Assignment Answers 2024
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLGGq9YjEDXmibbTK_8bmfrgF-opo9STYhMCRT6Wb5T-YQO2tAhtthhTFwNz3PP-NqFU-9Ea0cmHNZWJMYHCFII66A98dcKXVfBK1v0qJIA2fdnyz3yHdDNA3GtiIyJffC5LndCWbODRbklYLbwg1ODQmR_KGAeOM6iLyYWC7CILqYLGa0JuYLveDh7Zg/w640-h426/Default_The_Joy_of_Computing_using_Python_3.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLGGq9YjEDXmibbTK_8bmfrgF-opo9STYhMCRT6Wb5T-YQO2tAhtthhTFwNz3PP-NqFU-9Ea0cmHNZWJMYHCFII66A98dcKXVfBK1v0qJIA2fdnyz3yHdDNA3GtiIyJffC5LndCWbODRbklYLbwg1ODQmR_KGAeOM6iLyYWC7CILqYLGa0JuYLveDh7Zg/s72-w640-c-h426/Default_The_Joy_of_Computing_using_Python_3.jpg
BEU BIHAR : BEU PYQ , Beu previous year question All Courses All Semester Solutions
https://www.beubihar.org.in/2024/04/the-joy-of-computing-using-python-week.html
https://www.beubihar.org.in/
https://www.beubihar.org.in/
https://www.beubihar.org.in/2024/04/the-joy-of-computing-using-python-week.html
true
8161375692651428750
UTF-8
Loaded All Posts Not found any posts VIEW ALL Read More Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content
×