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
When would a one way flag variable be used
Tamiku [17]
A one-way flag<span> can also be </span>used<span>, for example, to watch errors occuring in input data so that the program </span>could<span> ask the inputs again. A </span>variable<span> is a temporary if its value is always needed only for a very short period.</span>
7 0
3 years ago
Create a base class named rectangle that contains lenght and width data members.
kumpel [21]

Answer:

class Rectangle:  

   

   def __init__(self, length, width):

       self.length = length

       self.width = width

       

   

   def area(self):

       area = self.length*self.width

       return area

   

   

class Box (Rectangle):

   

   def __init__(self, length, width, height):

       super().__init__(length, width)

       self.height = height

       

   def volume(self):

       volume = self.length * self.width * self.height

       return volume

   

   def area(self):

       area = 2*(self.length*self.width) + 2*(self.length*self.height) + 2*(self.width*self.height)

       return area

rec_1 = Rectangle(2,4)

box_1 = Box(2,2,6)

print(box_1.length)

print(box_1.area())

   

print(rec_1.length)

print(rec_1.area())

Explanation:

The programming language used is python.

class Rectangle

The class Rectangle is created with attributes length and width.

The class attributes are initialized using the __init__ constructor.

In the rectangle class, a method/function is declared to return the area of the rectangle.

class Box

This class is a child of rectangle and it inherits all its attributes and methods,

It has an additional attribute of depth and its constructor is used to initialize it.

The class contains a volume function, that returns the volume and an override function 'area()' that displaces the area from the parent class.

Finally, some instances of both classes are created.

4 0
3 years ago
Define latency and jitter for service flow in a fixed wireless system.
Marianna [84]

Answer:

Jitter refers to deviations in displacement of or deviation in the signal pulses in a HF digital signal. Latency  refers to the time interval between the response and stimulation or the basic delay between the effect and cause in service flow.

Explanation:

4 0
3 years ago
Read 2 more answers
What is a PivotTable?
professor190 [17]

Answer:

d

Explanation:

6 0
3 years ago
Read 2 more answers
"what command can be used on most linux distributions to find the directories where the man pages are kept"
BartSMP [9]

Answer:

Base name or -b command is used to locate only match directory in Linux.

Explanation:

base name can   primarily be used in shell script.

As we know that base name can be described  as a standard UNIX computer program. When we give a path name to any base then it  deletes each and every  prefix up to the last slash character and give back the result. base name can be defined in the Single UNIX Specification


6 0
3 years ago
Other questions:
  • What two images did you have to add to the wds server to handle the windows installation?
    7·1 answer
  • A patent facilitates a government-approved technological monopoly by
    5·1 answer
  • (I made this up teehee) what anime is katski bakugo from
    15·2 answers
  • Most hand sewing begins and ends with
    5·1 answer
  • Describe how a cell’s content and format attributes are related.
    13·2 answers
  • Using the Impress program, you can add multimedia files, including audio, image, and video files, to the presentation
    13·2 answers
  • I don't get the width and height part (PLEASE HELP WILL GIVE BRAINLIEST ANSWER)
    12·1 answer
  • Gps has fostered many benefits in our society, but have also added some risks. What is a risk of gps?
    15·1 answer
  • The principle of ________ strongly suggests that programs should execute with the least amount of privileges needed to complete
    13·1 answer
  • which filename refers to a 16-bit real-mode program that queries the system for device and configuration data, and then passes i
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!