1. 2. Given a sequence of integers in the range from 0 to N. For each number in the sequence, find the number of its divisors. Number N= 5 + number of your variant Given a sequence of integers 1N, 12N, 123N, 1234N, 1235N. Find the sum of the even digits in each number. Where N is the number of your variant
1. 2. Given a sequence of integers in the range from 0 to N. For each number in the sequence, find the number of its divisors. Number N= 5 + number of your variant Given a sequence of integers 1N, 12N, 123N, 1234N, 1235N. Find the sum of the even digits in each number. Where N is the number of your variant
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
1. number of divisors
Python program:
def findDevisor(v):
for i in range(1, v+5):
c = 0
for j in range(1,i+1):
if(i%j==0):
c = c+1
print('Number of devisors of '+str(i)+': '+str(c))
findDevisor(21)
Output:
Number of devisors of 1: 1
Number of devisors of 2: 2
Number of devisors of 3: 2
Number of devisors of 4: 3
Number of devisors of 5: 2
Number of devisors of 6: 4
Number of devisors of 7: 2
Number of devisors of 8: 4
Number of devisors of 9: 3
Number of devisors of 10: 4
Number of devisors of 11: 2
Number of devisors of 12: 6
Number of devisors of 13: 2
Number of devisors of 14: 4
Number of devisors of 15: 4
Number of devisors of 16: 5
Number of devisors of 17: 2
Number of devisors of 18: 6
Number of devisors of 19: 2
Number of devisors of 20: 6
Number of devisors of 21: 4
Number of devisors of 22: 4
Number of devisors of 23: 2
Number of devisors of 24: 8
Number of devisors of 25: 3
Number of devisors of 2: 2
Number of devisors of 3: 2
Number of devisors of 4: 3
Number of devisors of 5: 2
Number of devisors of 6: 4
Number of devisors of 7: 2
Number of devisors of 8: 4
Number of devisors of 9: 3
Number of devisors of 10: 4
Number of devisors of 11: 2
Number of devisors of 12: 6
Number of devisors of 13: 2
Number of devisors of 14: 4
Number of devisors of 15: 4
Number of devisors of 16: 5
Number of devisors of 17: 2
Number of devisors of 18: 6
Number of devisors of 19: 2
Number of devisors of 20: 6
Number of devisors of 21: 4
Number of devisors of 22: 4
Number of devisors of 23: 2
Number of devisors of 24: 8
Number of devisors of 25: 3
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY