I am aware of the \ xb function in python, but it doesn't seem to work for me. I know that I may need to download a third-party module for this, if so, which one is better? I am a noob with Python, and with StackOverflow, therefore, my main question. Now a little about the context ...
I am currently writing a binomial solver to try and use the skills that I teach myself. The problem occurs when I try to display the user I / O extension to use for confirmation. Currently, I have to print the expression as follows:
var1 = input("Enter a: ") var2 = input("Enter b: ") exponent = input("Enter n: ") a = int(var1) b = int(var2) n = int(exponent) expression = ('(%(1)dx%(2)d)^%(3)d') %\ {'1' : a, '2' : b, '3' : n} print(expression) confirmation = input(str("Is this correctt? Y/N "))
This prints (2x4) ^ 5, while I prefer the index to print as superscript. How can this be done? If necessary, I will provide any (missing) information.
source share