Python Forum
I'm looking for the syntax of a complex exponent, like: 2 ** (n - m)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm looking for the syntax of a complex exponent, like: 2 ** (n - m)
#1
. I'm looking for the syntax of a complex exponent, like: 2 ** (n - m)
. I would like to do this:
(code 1) :
p = n - m
NUMERO = (98 ** p) + (2 ** p)
. I would like to write (code 1) in a single line of code:
(code 2) :
NUMERO = (98 ** (n - m)) + (2 ** (n - m))
-> Is the syntax (code 2) correct?
Yoriz write Dec-29-2023, 01:33 PM:
Please post all code, output and errors (in its entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Messages In This Thread
I'm looking for the syntax of a complex exponent, like: 2 ** (n - m) - by CHANCEMAN - Dec-29-2023, 10:08 AM
RE: Exponent - by Gribouillis - Dec-29-2023, 10:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas dataframe into csv .... exponent issue mg24 10 1,892 Jan-20-2023, 08:15 PM
Last Post: deanhystad
  Fractional Exponent Question Flexico 2 5,240 Dec-04-2016, 01:00 AM
Last Post: Flexico

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020