#02
#letra = "e"
#match letra.lower():
# case "a"|"e"|"i"|"o"|"u":
# print("É uma vogal")
# case _:
# print("Não é uma vogal")
#03
#numero = -5
#match numero:
# case n if n > 0:
# print("Positivo")
# case n if n < 0:
# print("Negativo")
# case _:
# print("Zero")
#05
#total = 0
#numero = 1
#while total <= 100:
# total += numero
# print (total)
# numero += 1
#06
#senha_correta = "python123"
#tentativas = 0
#acertou = False
#while tentativas < 3 and not acertou:
# senha_tentativa = "python123"
# if senha_tentativa == senha_correta:
# acertou = True
# print ("Acesso Permitido!")
# else:
# tentativas += 1
# print(f"Tentativa{tentativas} falhou. Tente novamente!")
#if not acertou:
# print("Máximo de tentativas excedidas!")
#07
#for num in range(1, 11):
# if num % 2 == 0:
# print(num)
#08
#numero = 5
#for i in range(1, 11):
# print(f"{numero} x {i} = {numero * i}")
#09
#palavra = "abacaxi"
#contador = 0
#for letra in palavra:
# if letra == "a":
# contador += 1
#print(f"A letra 'a' aparece {contador} vezes")
#12
#quadrados = []
#for num in range(1, 6):
# quadrados.append(num ** 2)
#print(quadrados)
#13
#palavra = "ana"
#invertida = ""
#for letra in reversed(palavra):
# invertida += letra
#if palavra == invertida:
# print("É um palíndromo!")
#else:
# print("Não é um palíndromo")
#14
numero = 4554
soma = 0
while numero > 0:
digito = numero % 10
soma += digito
numero = numero // 10
print(soma)
#15
for i in range(1, 16):
print("*" * i)
To embed this project on your website, copy the following code and paste it into your website's HTML: