fayllar.org
ma'muriyatiga murojaat qiling
"Current date and time : "
Download
12.96 Kb.
Sana
14.11.2021
Hajmi
12.96 Kb.
#173694
1).
i
mport
datetime
now
=
datetime
.
datetime
.
now
()
print
(
"Current date and time : "
)
print
(
now
.
strftime
(
"%Y-%m-%d %H:%M:%S"
))
.
Напишите
программу Python
, которая принимает целое число (n) и вычисляет значение n + nn + nnn.
a
=
int
(
input
(
"Input an integer : "
))
n1
=
int
(
"%s"
%
a
)
n2
=
int
(
"%s%s"
%
(
a
,
a
)
)
n3
=
int
(
"%s%s%s"
%
(
a
,
a
,
a
)
)
print
(
n1
+
n2
+
n3
)
Download
12.96 Kb.
Do'stlaringiz bilan baham:
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling