Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 27 Answers

    Write a Python program

Slip 27 A) Write a Python program to unzip a list of tuples into individual lists.

Answer :

l = [(1,2), (3,4), (8,9)]

print(list(zip(*l)))

Output :

 

Slip 27 B) Write Python GUI program to accept a decimal number and convert and display it to binary, octal and hexadecimal number.

Answer :

dec = 344

print("The decimal value of", dec, "is:") print(bin(dec), "in binary.") print(oct(dec), "in octal.") print(hex(dec), "in hexadecimal.")

Output :

Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 27 Answers Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 27 Answers Reviewed by technical_saurabh on December 31, 2021 Rating: 5

1 comment:

surbhi said...

Thank you good luck for upcoming articles. python course

Powered by Blogger.