Can you help me do Wrapper and Exception for 2 code below:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Can you help me do Wrapper and Exception for 2 code below:

Post by answerhappygod »

Can you help me do Wrapper and Exception for 2 code below:
Can You Help Me Do Wrapper And Exception For 2 Code Below 1
Can You Help Me Do Wrapper And Exception For 2 Code Below 1 (58.84 KiB) Viewed 38 times
def gcdRecursion(a,b): if b == 0: return a if a == 1 or b == 1: return 1 return gcdRecursion(b, a%b)
1- def dec_to_base(num, base): #Maximum base 36 2 H~34567 898 base_num #empty string while num>0: #extract each digit of number = int(num%base) PAR || || dig if dig<10: base_num += str(dig) else: base_num += chr(ord('A')+dig-10) #Using uppercase letters num //= base 10 11 12 base_num base_num[::-1 -1] #To reverse the string return base_num 13 print (dec_to_base(15,2)) #calling function for base 2 14 print (dec_to_base(15,16))#calling function for base 16
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply