Answer to Question #177814 in Python for Priyanka

Question #177814

For term Cix^Pi, if the coefficient of the term Ci is 1, print x^Pi instead of 1x^Pi.this condititon is not giving result for this code?


1
Expert's answer
2021-04-02T12:27:10-0400
#read ci
Ci=int(input("Enter Ci: "))
#display result
if Ci==1:
    print(f"x^Pi")
else:
    print(f"{Ci}x^Pi")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS