/
rnekrasov
/
Python
Обзор
Документация
Войти
/
rnekrasov
/
Python
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Python Distance.py
13 строк
340 B
Vardhaman
Rename Python Distance to Python Distance.py
23 июл 2022, 19:08
Не верифицирован
23 июл 2022, 19:08
8ec95e4
Код
Авторство
О чём код?
# Display the powers of 2 using anonymous function terms = 10 # Uncomment code below to take input from the user # terms = int(input("How many terms? ")) # use anonymous function result = list(map(lambda x: 2 ** x, range(terms))) print("The total terms are:",terms) for i in range(terms): print("2 raised to power",i,"is",result[i])