79192215

Date: 2024-11-15 11:45:54
Score: 1
Natty:
Report link

Here is a more simplified approach:

question = input("Enter an input like x^3, x^25 etc...: ")

n = question[question.index('^')+1:]
power = str(int(n) - 1)
derivative = n + 'x' + '^' + power
print(derivative)

Output:

Enter an input like x^3, x^25 etc...: x^25
25x^24

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Prince Mensah