Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python please, ... need to be working on pycharm Question: Greatest Common Factor In mathematics, the greatest common factor (GCF), also known as the

using python please, ... need to be working on pycharm

image text in transcribed

Question: Greatest Common Factor In mathematics, the greatest common factor (GCF), also known as the greatest common divisor, of two (or more) non-zero integers a and b, is the largest positive integer by which both integers can be divided. It is commonly denoted as GCF(a,b). For example GCF(12,16)=4. Factors of 12:12 3, 6, 12 Factors of 16: 124 48, 16 Common Factors 4 is the Greatest Common Factor Write a Python program that will get two numbers from the user (a, b), find and display all the factors for both numbers, find and display the GCF of the two numbers. You should use loops to find the GCF (do not user built-in functions). Sample Input: a = 12 b=30 Sample Output: Factors of 12: 1, 2, 3, 4, 6, 12 Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30 Greatest Common Factor: 6

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_2

Step: 3

blur-text-image_3

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

The Analysis Of Biological Data

Authors: Michael C. Whitlock, Dolph Schluter

3rd Edition

131922623X, 978-1319226237

More Books

Students also viewed these Programming questions

Question

LG2 Explain the initial public offering (IPO) process.

Answered: 1 week ago