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
Write a Python 3 program that will compute the total cost of an amazon purchase. The program should ask the user to enter the am
valentina_108 [34]

Answer:

price = float(input("Enter amount of a purchase: "))

shipping_price = 0.12* price

NJ_sales_Tax = 0.07*price

print('The price of item is {}'.format(price))

print('The Cost of Shipping is {}'.format(shipping_price) )

print('New Jessey Sales Tax is {}'.format(NJ_sales_Tax))

total_bill = shipping_price+NJ_sales_Tax+price

print('Total Bill {} ' .format(total_bill))

Explanation:

  • Prompt User for input of the amount of purchase
  • Calculate the shipping cost (12% of purchase price)
  • Calculate the tax (7% of the purchase price)
  • Use python's .format method to output an itemized bill

3 0
3 years ago
Join Viber Creations on Viber https://invite.viber.com/?g2=AQAboWGw5hKZN009gOjCULc4cbWKWg42%2BIFmJoPC93MPlt9kstcpJyU6yagPh050 |
Dovator [93]
Hmmmm
I have to say the step mom in Cinderella
7 0
3 years ago
A(n) _____ measures the ability to juggle a variety of demands, as in a manager's job where the candidate is presented with simu
Tju [1.3M]

Answer: in-basket test

Explanation:

An in-basket test or an in-basket exercise is a test used by firms or governments in recruiting and promoting employees. During the test, job applicants receive some mails, telephone calls, documents and memos.

3 0
4 years ago
Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing the application, a banner appears on t
Artemon [7]

Answer:

online display advertisement

Explanation:

Q:

Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing …

A. online display advertisement

B. contextual advertisement...

A:

A

6 0
2 years ago
Can someone help me with the 2.4 code practice question 2 on Edhesive???
Law Incorporation [45]

Answer:

sure, just show me the problem

5 0
4 years ago
Other questions:
  • Write a method called all Less that accepts two arrays of integers and returns true if each element in the first array is less t
    12·1 answer
  • Jamie posted all the journal entries into ledgers. After the postings, Jamie realizes that the debit side of the travel account
    10·1 answer
  • Derived Classes Warrior Stores the warrior's allegiance as a string. The warrior does not attack warriors that have the same all
    14·1 answer
  • write a Program which displays at least 5 different sentences that explain how technology has been used to win souls to Christ.
    6·1 answer
  • write a function that given an integer Y and 3 non-empty string A,B,W, denotingthe year of vacations, the beginning month, the e
    5·1 answer
  • A project manager types a document and prints it. He is using _____. hardware software hardware and software
    12·2 answers
  • What is a central idea for 3 Despite this lack of precision, Galileo had constructed a wonderful invention. Yet, he considered i
    5·1 answer
  • Heya! I’m quite lonely, so here are some points. I want to play some mc with others but the only version I’m able to play is edu
    11·2 answers
  • Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a fil
    11·1 answer
  • ((Sorry for the self promo btw) Can you guys help me try and get affiliate on twitch? I am currently at 20 followers and it woul
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!