Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
The print function
Variables
Math in Python
15. Power operator
The input function
Summary

Instruction

Good! Python also has a power operator: **. For instance:

number = 5
number_cubed = 5 ** 3

5 ** 3 means 'raise 5 to the third power', so number_cubed will contain the value of 5*5*5 = 125.

Exercise

Today, a kilobyte equals to a 1000 bytes, but back in the day that wasn't true. One kilobyte was actually 2^{10} bytes (2 to the power of 10). Nowadays, we call it a kibibyte. So, how much is that, exactly? Print the answer.

Stuck? Here's a hint!

Use:

print(2**10)