Skip to content

Commit 5231356

Browse files
committed
doc: add comments
Condittional exercises (if, elif, else). Leap year.
1 parent ff37e45 commit 5231356

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ex032.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
#Leap year
12
#32- Make a program that reads any year and shows whether it is a leap year.
23
year = int(input('Which year do you want to analize?'))
34
if year % 4 == 0 and year % 100 !=0 or year % 400 ==0:
45
print(f"The year {year} it's a leap year")
56
else:
67
print(f"The year {year} it's not a leap year")
8+
9+
# Ano Bissexto
10+
#32: Faça um programa que leia um ano qualquer e mostre se ele é bissexto.
11+
ano = int(input('Digite o ano que você quer que seja analizado:'))
12+
if ano % 4 == 0 and ano % 100 != 0 or ano % 400 == 0:
13+
print(f'O ano {ano} é bissexto.')
14+
else:
15+
print(f'O ano {ano} não é bissexto.')
16+
17+
18+
# PT- Exercícios com uso de condicional.
19+
# EN- Exercises using conditional.

0 commit comments

Comments
 (0)