Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is a python3 program please answer these questions with comments on how the code works. (a) Use a while loop to count how many

this is a python3 program please answer these questions with comments on how the code works. image text in transcribed
image text in transcribed
(a) Use a while loop to count how many integers between and 2 are divisible QUESTION 3 Loor by m, where n and m are both integers entered by should print the result to screen. An example run is as follows: The pram (Find the primes) A prime number is a number that is only divisible by 1 (12 marks) and itself. Write a program that asks the user to enter an integer n and prints all of the prime numbers between 1 and this number in reverse order. An example run is as follows: (a) Disariam Numbera) A aumber is said to be Diwirium if the wam of ith digits raised to their respective poritides is the number itself, For enumple. determaines whether a nurnher is a Disarium integer arrument a and return a Boolean object. Provide brome ende to not. The functise should (b) Wrife a sccond function called Disariume(m,n) that thikes in two integers m. n and returns all of the integers in the range from n to m that are Disariams. These numbers should be returned as a list. Provide some code 10 call and fest this function. An example run is as follows

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Explain the development of human resource management (HRM)

Answered: 1 week ago