Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python project Write a program that finds out how many numbers between 1 and 10,000 (inclusive) are divisible by any of the unique non-zero digits

Python project

Write a program that finds out how many numbers between 1 and 10,000 (inclusive) are divisible by any of the unique non-zero digits of K, where K = (your 5 digit number) x 19 Here is an example of what Jane, whose 5 digit number is 12340 should do: For Jane, K = 234460, and her unique non-zero digits are: 2, 3, 4, and 6. Therefore, Jane needs to write a program that calculates how many (count) of numbers between 1 and 10,000 are divisible by 2, 3, 4, or 6 Your program should display only one numeric answer (the count) Here is some sample code to help you get started:

count = 0 # count all the numbers between 1 and 10,000 (inclusive) that are even (divisible by 2) for n in range(1,10_000+1): if n % 2 == 0: count += 1 print(count)

make sure run the Program

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

n=10;

Answered: 1 week ago

Question

2. Outline the business case for a diverse workforce.

Answered: 1 week ago