Advertisement
zyulfi

Degree_of_2

May 17th, 2025
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | Source Code | 0 0
  1. # 10. Степени на 2 (for)
  2. # Въведете цяло число n. Използвайте for, за да отпечатате всички степени на 2 от 0 до n (включително).
  3.  
  4. deg = int(input("Please enter the degree: "))
  5.  
  6. for i in range(0, deg + 1):
  7.     print(2 ** i)
  8.  
Tags: Degree_of_2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement