Continuously multiply it by itself? such as 2^(100)

Bodie

I want to print a list of numbers that show exponent of 2 to the 100th power such as 2,4,8,16,32,64,128.... up to the 100th power of two using a FOR loop and printing it. I basically want to multiply 2x2x2...100 times

for i in range(1,101,1): print (i)

2 4 8 16 32 64 128 256 512 etc.. all the way to 2^(100)

gino

Slightly faster

power=2
for i in range(1,101,1):
    power*=2
    print(power)

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Multiply by 0.5 rather than divide by 2

分類Dev

Can an Angular 2 component style itself?

分類Dev

How can I implement a function multiply(2)(3)(5) in JavaScript

分類Dev

Numpy multiply (2, 4) and (4, 4) without broadcasting

分類Dev

C++: How to use a 'for' loop to multiply 2D arrays?

分類Dev

AWS IAM: Allow EC2 instance to stop itself

分類Dev

Mysql How to join 2 tables and 1 table itself

分類Dev

Python pandas : Merge two tables without keys (Multiply 2 dataframes with broadcasting all elements; NxN dataframe)

分類Dev

Matrix Multiplication: Multiply each row of matrix by another 2D matrix in Python

分類Dev

NumPy: Efficient way to multiply each pair of 2d matrices in two 3d matrices?

分類Dev

CSSの2列のレイアウト-高さ100%、幅100%

分類Dev

10進数の100を2進数の100に変換する

分類Dev

Angular 2 tooltip should auto adjust position itself in mobile or when window is resized

分類Dev

CSS2 version of height: calc(100% - 18px)

分類Dev

Insert fails for value 100 with column definition NUMBER(4,2)

分類Dev

Flex 2 columns where one is fixed width and the other is width 100%

分類Dev

How to get clean urls in yii2 like ``post/100``

分類Dev

Bootstrap responsive layout - 2x100% width containers

分類Dev

Ext JS SORTING(2、5、30、100)比較機能

分類Dev

Graphics2Dを使用してMULTIPLY複合効果を実行する方法

分類Dev

配列内の2つの値を$ multiplyする配列内のMongoDb $ addFields

分類Dev

Reload data continuously with Ajax

分類Dev

Continuously reading java WatchEvents

分類Dev

Multiply Matrices in DAX

分類Dev

Javascript Multiply Ttable

分類Dev

Multiply array of different size

分類Dev

Simplify PHP multiply if conditions

分類Dev

How to multiply in the View

分類Dev

100 x 100 QRコードから2Dビット配列を作成

Related 関連記事

  1. 1

    Multiply by 0.5 rather than divide by 2

  2. 2

    Can an Angular 2 component style itself?

  3. 3

    How can I implement a function multiply(2)(3)(5) in JavaScript

  4. 4

    Numpy multiply (2, 4) and (4, 4) without broadcasting

  5. 5

    C++: How to use a 'for' loop to multiply 2D arrays?

  6. 6

    AWS IAM: Allow EC2 instance to stop itself

  7. 7

    Mysql How to join 2 tables and 1 table itself

  8. 8

    Python pandas : Merge two tables without keys (Multiply 2 dataframes with broadcasting all elements; NxN dataframe)

  9. 9

    Matrix Multiplication: Multiply each row of matrix by another 2D matrix in Python

  10. 10

    NumPy: Efficient way to multiply each pair of 2d matrices in two 3d matrices?

  11. 11

    CSSの2列のレイアウト-高さ100%、幅100%

  12. 12

    10進数の100を2進数の100に変換する

  13. 13

    Angular 2 tooltip should auto adjust position itself in mobile or when window is resized

  14. 14

    CSS2 version of height: calc(100% - 18px)

  15. 15

    Insert fails for value 100 with column definition NUMBER(4,2)

  16. 16

    Flex 2 columns where one is fixed width and the other is width 100%

  17. 17

    How to get clean urls in yii2 like ``post/100``

  18. 18

    Bootstrap responsive layout - 2x100% width containers

  19. 19

    Ext JS SORTING(2、5、30、100)比較機能

  20. 20

    Graphics2Dを使用してMULTIPLY複合効果を実行する方法

  21. 21

    配列内の2つの値を$ multiplyする配列内のMongoDb $ addFields

  22. 22

    Reload data continuously with Ajax

  23. 23

    Continuously reading java WatchEvents

  24. 24

    Multiply Matrices in DAX

  25. 25

    Javascript Multiply Ttable

  26. 26

    Multiply array of different size

  27. 27

    Simplify PHP multiply if conditions

  28. 28

    How to multiply in the View

  29. 29

    100 x 100 QRコードから2Dビット配列を作成

ホットタグ

アーカイブ