I just received my answer for my computer science assignment and it needed to be copied on Python 3.5 but I have the software interface of Python 3.9.  The code solution didn't implement on the Idle script from my Idle Shell.  I will include the code that was answered by the author with Bartleby. I need someone to help me implement on the 3.9 software interface for Python's Idle.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I just received my answer for my computer science assignment and it needed to be copied on Python 3.5 but I have the software interface of Python 3.9.  The code solution didn't implement on the Idle script from my Idle Shell.  I will include the code that was answered by the author with Bartleby. I need someone to help me implement on the 3.9 software interface for Python's Idle.

 

 

AutoSave
draft assignment CS programming - Saved to this PC -
O Search
ff
Maria Caudle
File
Home
Insert
Design
Layout
References
Mailings
Review
View
Help
8 Share
P Comments
O Find
e Replace
X Cut
- Ap
-
A A Aa v
AaBbCcDc AaBbCcDc AaBbC AaBbCcC AaB
I No Spac. Heading 1 Heading 2
Calibri (Body)
v 11
B Copy
Paste
BIU - ab x,
三。
Dictate
x A
- v A -
E E E 1=v
I Normal
Title
A Select v
Editor
S Format Painter
Clipboard
Font
Paragraph
Styles
Editing
Voice
Editor
Do Exercise 6.4 from your textbook using recursion and the is divisiblefunction 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(bxt) that contains the test output. Multiple file uploads are permitted. Don't forget to
include descriptive comments in your Python code.
Page 1 of 1
O words
O Focus
+ 100%
3:17 AM
P Type here to search
5/5/2021
9.
Transcribed Image Text:AutoSave draft assignment CS programming - Saved to this PC - O Search ff Maria Caudle File Home Insert Design Layout References Mailings Review View Help 8 Share P Comments O Find e Replace X Cut - Ap - A A Aa v AaBbCcDc AaBbCcDc AaBbC AaBbCcC AaB I No Spac. Heading 1 Heading 2 Calibri (Body) v 11 B Copy Paste BIU - ab x, 三。 Dictate x A - v A - E E E 1=v I Normal Title A Select v Editor S Format Painter Clipboard Font Paragraph Styles Editing Voice Editor Do Exercise 6.4 from your textbook using recursion and the is divisiblefunction 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(bxt) that contains the test output. Multiple file uploads are permitted. Don't forget to include descriptive comments in your Python code. Page 1 of 1 O words O Focus + 100% 3:17 AM P Type here to search 5/5/2021 9.
P is divisible.py - H:/CS Programming Fundamentals/is_divisible.py (3.9.4)*
File Edit Format Run Options Window Help
def is divisible (x, y) :
#check the condition.
if(x%y==0) :
#check the condition.
if(xty=-0) :
#return the value.
return True;
else:
#return value.
return False;
#definition of the method.
def is_power (x, y) :
#check the condition.
if (x==1):
#return value.
return True;
#check the condition
if (y==1) :
#return value.
return False;
#check condition.
if (is divisible (x, y) ==False):
#return value.
return False;
#return value.
return is power (x//y,y) ;
#Call the functions.
print ("is_power (10,2) returns:",is_power (10,2))
print ("is power (27,3) returns:",is power (27,3))
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))
Ln: 32 Col: 58
11:13 AM
P Type here to search
f
A + G 4)
民
Hi
99+
5/5/2021
Transcribed Image Text:P is divisible.py - H:/CS Programming Fundamentals/is_divisible.py (3.9.4)* File Edit Format Run Options Window Help def is divisible (x, y) : #check the condition. if(x%y==0) : #check the condition. if(xty=-0) : #return the value. return True; else: #return value. return False; #definition of the method. def is_power (x, y) : #check the condition. if (x==1): #return value. return True; #check the condition if (y==1) : #return value. return False; #check condition. if (is divisible (x, y) ==False): #return value. return False; #return value. return is power (x//y,y) ; #Call the functions. print ("is_power (10,2) returns:",is_power (10,2)) print ("is power (27,3) returns:",is power (27,3)) 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)) Ln: 32 Col: 58 11:13 AM P Type here to search f A + G 4) 民 Hi 99+ 5/5/2021
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education