Contact
Privacy
Coding Development Art
  • Home
  • Latest
  • Oldest
  • Popular
  • Random
  • Home»
  • Categrories»
  • Programming Languages»
  • Python»

Write a python function to print powers of 2, for given number of terms - Python

Categories:
Python
Viewed: 8 - Published at: a few seconds ago

[ Write a python function to print powers of 2, for given number of terms ]

def two_power(terms):
    result = list(map(lambda x: 2 ** x, range(terms)))

    print(f"The total terms are: {terms}")
    for i in range(terms):
       print(f"2^{i} = {result[i]}")

Related Posts:

Levenshtein Distance and Text Similarity in Python
Levenshtein Distance and Text Similarity in Python
Python
Creation of a Linked List
Creation of a Linked List
Python
Passing categorical data to Sklearn Decision Tree
Passing categorical data to Sklearn Decision Tree
Python
How to create a product in admin panel with custom module?
How to create a product in admin panel with custom module?
An Exploration into Cinematography: Different styles of Cinematography that contribute to a genre and Director’s style
An Exploration into Cinematography: Different styles of Cinematography that contribute to a genre and Director’s style
News
measure progress (time left) while os.listdir is generating a list (Python)
measure progress (time left) while os.listdir is generating a list (Python)
Python

You may also like:

C Program to Find Largest and Smallest Element in Array
C Program to Find Largest and Smallest Element in Array
C Programs
python - read whole file at once
python - read whole file at once
Python
set file permission in setup.py file
set file permission in setup.py file
Python
A Black Man with no Diploma Built a Jet Engine Afterburner
A Black Man with no Diploma Built a Jet Engine Afterburner
News
How use MS SQL as primary database in Bonita 6
How use MS SQL as primary database in Bonita 6
Database
Your Smart Lights Can Do More Around The Home Than You Know — Briant Communications
Your Smart Lights Can Do More Around The Home Than You Know — Briant Communications
News
Categories
  • Blog
    • Career
    • Computer
    • Downloads
    • Internet
    • Linux
    • News
    • Review
    • Security
    • Technology
  • Database
    • MySql
    • Oracle Database
    • SQL Server
    • SQLite
    • mongodb
  • Dev
    • Algorithm
    • Android
    • Batch File Programming
    • Books
    • Competitive Programming
    • Computer Networks
    • Data Structure
    • Design
    • Development
    • Flutter
    • Game
    • Git
    • Interview Questions
    • JDBC
    • Machine Learning
    • Mobile
    • Operating System
    • Programming
    • Projects
    • Sponsored
    • Webservice
    • iOS
  • Framework
    • .NET
    • Angular
    • Django
    • MVC
    • Nodejs
    • React
  • Programming Languages
    • ASP.NET
    • C Programs
    • C#
    • C++ Programs
    • CSS
    • HTML
    • JSP
    • Java
    • JavaScript
    • PHP
    • PL/SQL
    • Python
    • SQL
    • Swift
    • VB.NET
  • Tools
    • privacy-policy-generator
    • Mac Vendors
    • Ports Numbers
    • Wifi Routers Passwords

Site all the data, are collected from Internet, belongs to original author, please do not used for commercial purposes !

Coding Development Art
  https://www.codevelop.art
 
  contact@codevelop.art

Posts

  • Home
  • Latest
  • Oldest
  • Popular
  • Random

Follow Us

© 2018 codevelop.art - Coding Develop Art - programming and development tutorials blog - Learn all Program languages | codevelop.art.
All Rights Reserved.
  • Contact
  • Privacy
  • Terms of service
  • Copyright
  • Disclaimer