Added lecture 2026113
This commit is contained in:
parent
be356ccb59
commit
5b630435ae
27 changed files with 738 additions and 0 deletions
11
lecture20261103/lists01/powers.py
Normal file
11
lecture20261103/lists01/powers.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
powersList = [0,1,2,3,4,5,6,7,8,9,10]
|
||||
|
||||
# Try this form
|
||||
#powersList = range(0,11)
|
||||
|
||||
print("The list is ", powersList)
|
||||
|
||||
for n in powersList:
|
||||
powerOfTwo = 2**n
|
||||
print(f"{n:2d} {powerOfTwo:8d}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue