Init
This commit is contained in:
13
python/12.09.25/ex2.py
Normal file
13
python/12.09.25/ex2.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import sys
|
||||
|
||||
number = int(input("Введите число :: "))
|
||||
stage = float(input("Введите степень(0-7) :: "))
|
||||
|
||||
if stage <= 7 and stage >= 1:
|
||||
numbd = number ** stage
|
||||
print("Ответ: {}".format(numbd))
|
||||
sys.exit(1)
|
||||
|
||||
else:
|
||||
print("ОШИБКА, введена степень выше/ниже диапазона")
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user