Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi. I busy going through practice problem sets my teacher gave me... for some re

ID: 649327 • Letter: H

Question

Hi. I busy going through practice problem sets my teacher gave me... for some reason I'm really struggling with these two questions... Thanks:

Write a Python module called 'bukiyip.py' with the following functions for simple Bukiyip arithmetic, assuming that all values have at most 3 digits.

? bukiyip_to_decimal(a) Convert a Bukiyip number to decimal.

? decimal_to_bukiyip(a) Convert a decimal number to Bukiyip.

? bukiyip_add(a, b) Add two Bukiyip numbers.

? bukiyip_multiply(a, b) Multiply two Bukiyip numbers.

Sample I/O:

**** Bukiyip test program ****

Available commands: d : convert given decimal number to base-3.

b : convert given base-3 number to decimal.

a : add the given base-3 numbers.

m : multiply the given base-3 numbers.

q : quit

Enter a command: d 12 110

Enter a command: b 20 6

Enter a command: a 12 11 100

Enter a command: m 12 11 202

Enter a command: q

Explanation / Answer

hope this may helps you...

print("Enter two Numbers ")
a = int(raw_input('A='))
b = int(raw_input('B='))
c=a+b
print ('C= %s' %c)
raw_input() # waits for you to press enter

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote