1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ymorist [56]
3 years ago
10

Write a function named ​isDivisible​ that takes two parameters

Computers and Technology
1 answer:
nirvana33 [79]3 years ago
3 0

Answer:

def isdivisible():

   maxint=input("Enter the Max Int")

   int1=0

   int2=0

   int1=input("Enter the first Integer")

   int2=input("Enter the second Integer")

   tup1=(int1, int2)

   print(tup1)

   i = 1

   for i in range(1, int(maxint)-1):

       if int(tup1[0])%i==0 & int(tup1[1])%i==0:

           print(i)

       else:

           continue

       

   

isdivisible()    

1.2 Outputs

First test case:

Enter the Max Int6                                                                                                            

Enter the first Integer2                                                                                                      

Enter the second Integer8                                                                                                      

('2', '8')                                                                                                                    

1                                                                                                                              

2      

Second test case: returning empty list

Enter the Max Int2                                                                                                            

Enter the first Integer13                                                                                                      

Enter the second Integer27                                                                                                    

('13', '27')

Test case 3:

Enter the Max Int4                                                                                                            

Enter the first Integer8                                                                                                      

Enter the second Integer10                                                                                                    

('8', '10')                                                                                                                    

1                                                                                                                              

2        

Explanation:

The program is as above, and the three test cases are also mentioned. We have created a tuple out of two input integer, and performed the output as required.

You might be interested in
Jason wants to open a program with the command prompt window. Which command should he type in the Run dialog box to open the com
Montano1993 [528]
<span>1. Tap or click the Start button, followed by All apps.

If you're not using the Desktop in Windows 10, tap the All apps button on the bottom-left of your screen instead. It's the icon that looks like the small list of items.

Tip: The Power User Menu is a much faster way to get to Command Prompt in Windows 10 but only if you're using a keyboard or mouse. Just choose Command Prompt from the menu that appears after pressing WIN+X or right-clicking on the Start button. </span><span><span>Find the Windows System folder from the list of apps and tap or click it. </span><span>Under the Windows System folder, click or tap Command Prompt.

Command Prompt should open immediately. </span><span>You can now execute whatever commands in Windows 10 you'd like to run.</span></span>
4 0
3 years ago
Marie has never used a word processor. In 3 to 4 sentences, describe how she could benefit from using a word processor to comple
pychu [463]
She could be able to present her information in a legible way. She will be able to type quicker than writing, and be more thorough about her writing. She can also benefit by becoming more familiar with different technologies. She can benefit by being able to add information that broadens her knowledge on the subject.

Hope this helps!!
6 0
3 years ago
Read 2 more answers
Write a program that keeps track of a simple inventory for a store. While there are still items left in the inventory, ask the u
MissTica

Answer:no

Explanation:

3 0
3 years ago
Read 2 more answers
Given an int as the input, print all the factors of that number, one in each line. For example, if the input is 15 The output wi
trapecia [35]

Answer:

The program to calculate factor can be given as:

Program:

#include <stdio.h> //include header file

int main() //defining main function

{

   int a,i; //defining integer variable

   printf("Enter any number: "); //print message

   scanf("%d",&a); //input value from user end

   for(i=1;i<=a;i++) //loop for calculate factor values

   {

       if(a%i==0) //define condition for factor

       {

           printf("%d\n",i); //print values

       }

   }

   return 0;

}

Output:

Enter any number: 15

1

3

5

15

Explanation:

In the above C language program the header file is include that provide the use of basic function, in the next line the main method is defined, inside this method two integer variable "a and i" is defined in which variable a is used to take value from user end and variable i is used in loop and conditional statement.

  • In the next step, for loop is declare, that start from 1 and end with value of variable a, inside a loop, if block is used that checks (a%i==0), in this if variable i value modeler value equal to 0.  
  • The loop will use the print function that prints variable "i" element in a new line, which is the factor the values.  

4 0
3 years ago
Read 2 more answers
Which of the following is NOT necessary for organizing data to make it easier to sort?
Elenna [48]

Answer:

All the data must be the same font and font size is not necessary for data sorting.

Explanation:

The most easier and frequently used tool for data organizing and sorting is Microsoft's excel or google spreadsheet. Sorting deals with arrangement of  data values in a particular sequence or order according to defined rules. For example data can be sort in ascending or descending order as per values or names in list.

7 0
3 years ago
Other questions:
  • Write a MIPS assembly language program that prompts for a user to enter how many floating point numbers to enter, then prompts t
    10·1 answer
  • How people have contributed to the advancement of science
    7·1 answer
  • How does the access point know whether a wireless data packet is intended for its network?
    14·1 answer
  • Match the terms with their definitions.
    5·2 answers
  • Victor works for a telemarketing company that is on a very tight budget. He has been tasked with finding a method for the compan
    7·2 answers
  • Audiovisual means that a presentation combines film and photos.<br> true or false?
    6·2 answers
  • How can she change that value so it is reflected in the chart in her presentation?
    5·2 answers
  • What is Utility Software ? Name any two utility programs. <br>​
    15·2 answers
  • What information is necessary to review in order to be considered familiar with the Safety Data Sheet (SDS) of a substance
    7·1 answer
  • Write the following short piece of code in python:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!