[Tutor] Trying to get
Piotr Mazek
pmazek at otwock.pl
Fri Jun 18 05:12:52 EDT 2021
>> (((1+2)∗3)/4)^5
Raising a number to a power N multiplies the number by itself N times.
For example, 2 raised to the power of 3 is equal to 2 × 2 × 2 = 8.
Use the power operator, **, to raise a number to a power
Place the power operator, ** (this one's ^ wrong) between two numbers to raise the former number to the latter.
two_cubed = 2.0 ** 3
print(two_cubed)
Output:
8.0
In this example, 2.0 is a float. The power operator accepts any numeric data type, such as an int or a float.
Regards
-----Original Message-----
From: Tutor [mailto:tutor-bounces+pmazek=otwock.pl at python.org] On Behalf Of Mariam M.S
Sent: Thursday, June 17, 2021 11:37 PM
To: David Rock; tutor at python.org
Subject: [Tutor] Trying to get
Good evening
Trying to fix this problem (((1+2)∗3)/4)^5 and I’m stuck on it for hours now I know this is simple one but I’m a beginner and could use your help.
Btw google didn’t help. Thank you
_______________________________________________
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list