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
Kay [80]
3 years ago
15

"Do Exercise 6.4 from your textbook using recursion and the is_divisible function from Section 6.4. Your program may assume that

both arguments to is_power are positive integers. Note that the only positive integer that is a power of "1" is "1" itself. After writing your is_power function, include the following test cases in your script to exercise the function and print the results: print("is_power(10, 2) returns: ", is_power(10, 2)) print("is_power(27, 3) returns: ", is_power(27, 3)) print("is_power(1, 1) returns: ", is_power(1, 1)) print("is_power(10, 1) returns: ", is_power(10, 1)) print("is_power(3, 3) returns: ", is_power(3, 3)) You should submit a script file and a plain text output file (.txt) that contains the test output. Multiple file uploads are permitted. Don’t forget to include descriptive comments in your Python code. Your submission will be assessed using the following Aspects. A. Does the submission include the is_divisible function from Section 6.4 of the textbook? B. Does the submission implement an is_power function that takes two arguments? C. Does the is_power function call is_divisible? Does the is_power function call itself recursively? D. Does the is_power function include code for the base case of the two arguments being equal? E. Does the is_power function include code for the base case of the second argument being "1"? F. Does the submission include correct output for the five test cases"

Arts
1 answer:
statuscvo [17]3 years ago
7 0

Answer:

The explanation of this program is written below in explanation section

Explanation:

def Is_Power(x,y):#defining power function

   print(pow(x,y));#using built-in "pow(base,exp)" function

Is_Power(10,2)#checking 10 raise to power 2  

Is_Power(27,3)#checking 27 raise to power 3  

Is_Power(1,1)#checking 1 raise to power 1

Is_Power(10,1)#checking 10 raise to power 1

Is_Power(3,3)#checking 3 raise to power 3

# however, it is noted that this symbol is used for comments

# Is_Power(10,2) is equal to 100  

# Is_Power(27,3) is equal to 19683

# Is_Power(1,1) is equal to 1

# Is_Power(10,1) is equal to 10

# Is_Power(3,3) is equal to 27

You might be interested in
5. The vanishing point in paintings often points to an area where artists want the viewer to focus
Black_prince [1.1K]

Answer:

Answers for the test

1. A: ariel

2. B: bulidings

3. D: two-point perspective

4. A: the eye level of people

5. true

6. true

7. false

8. false

9. B: where the street meets the sky

10. A: the sky at the very center of the image

you're welcome :)

;) so you can get here faster the questions are:

1. Which of the following has the same meaning as "atmospheric perspective?

2. Jesse is drawing a scene of a bridge over a river with buildings of a city in the background. He drew a ship between the bridge and the buildings. Which part of the drawing will closely match the hue of the sky?

3. In which type of perspective are the sides of the object at an angle to the picture plane?

4. To make landscapes appear realistically proportioned, where should the artist place the horizon line in any artwork?

5. The vanishing point in paintings often points to an area where artists want the viewer to focus. (true or false)

6. Artists control a sense of distance in a drawing by blurring objects in the background. (true or false)

7. In a one point perspective, there can only be one line directed toward a single vanishing point. (true or false)

8. If an artist uses both atmospheric and linear perspectives in the same artwork, realistic perspective cannot be achieved. (true or false)

9. Where is the vanishing point in this photograph?

10. Where is the vanishing point in this photograph?

Explanation:

https://www.jiskha.com/questions/1807413/the-vanishing-point-in-paintings-often-points-to-an-area-where-artist-want-the-viewer-to

Hope this helps.

8 0
2 years ago
Which of the following terms is defined as "words that sound alike"?
nlexa [21]
The answer is b.... ....................... . ......................
7 0
3 years ago
Read 2 more answers
How to draw a really detailed mickey mouse
Effectus [21]
Find the basic shapes in the character and pan out from there,make sure to shade but don't over blend
5 0
3 years ago
Tickets to the County Fair cost $12 for each adult and $7 for each child. Write and evaluate an expression to find the cost for
scoray [572]

Answer:

$36 children

$42 adult

$78 together                

Explanation:

c*a=12*3=             c=cost

c*ch=7*6=            a=adult

                            ch=children

please mark brainliest

4 0
3 years ago
Read 2 more answers
Complete
sweet [91]

Answer:

which language is this

Explanation:

tell me so that I can help you

5 0
3 years ago
Read 2 more answers
Other questions:
  • What major contribution did the ancient Greeks make to art?
    11·1 answer
  • Is this statement true or false?
    6·2 answers
  • 1.
    9·1 answer
  • What is a whole note? how Many beats does it get? what does it look like?​
    13·2 answers
  • I want to see a Oc girl with a buzz cut haircut thank you or she cold have a Mohawk​
    14·1 answer
  • Please help identify the interval. Brainliest to CORRECT answer. tyy
    7·1 answer
  • QUICK PLEASE! How long does a game of monopoly sore losers take? Does it take as long as a regular monopoly?
    12·1 answer
  • A note is a shorthand word musicians use to refer to a specific written duration.
    12·2 answers
  • All I am asking for is a good grade and please don't copy off anything thank you have a nice day
    15·1 answer
  • Sandra is setting up her makeup station. Where should the brightest light be coming from?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!