+ 1

How to enter int Base & int exponent?

n=int (input ("what case? ")) e=float (input ("what power of ", n, "?")) when I try to run, in my second line I got a message. TypeError: input expected at most 1 argument got 3 any one can help me? cheers

14th Dec 2016, 10:20 AM
Efraim Ié
Efraim Ié - avatar
2 Antworten
0
You can put comma separated arguments in input function
14th Dec 2016, 12:04 PM
Rishi Anand
Rishi Anand - avatar
0
The error is saying that the ' input' function only takes one argument, however you gave it 3(”what Power of", n and "?" make 3 arguments you are passing to the input function). I can see what you would like to achieve but you will have to use other libraries to do it easily. Best Option is to leave the other parts and have: e=float (input ("what power of n?")) or similar in one string.
14th Dec 2016, 1:13 PM
Elric Hindy
Elric Hindy - avatar