This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in range(1,3): | |
print(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum = 0 | |
count = 0 | |
for c in range(1,7): | |
num = int(input('Digite o {} valor: '.format(c))) | |
if num % 2 == 0: | |
sum = sum + num | |
count = count + 1 | |
print('Você informou {} números PARES e a soma foi {}'.format(count, sum)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = 0 | |
for c in range(1,7): | |
letter = str(input('Digite a primeira {} vogal: '.format(c))) | |
if letter == 'A' or letter == 'a': | |
count = count + 1 | |
print('Você informou a vogal A {} vezes'.format(count)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
tentativas = 0 | |
palpite = False | |
numSorteado = random.randint(1,10) | |
while (palpite is False): | |
num = int(input('Digite um numero: ')) | |
if num != numSorteado: | |
tentativas = tentativas + 1 | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validacao = False | |
while (validacao is False): | |
sexo = str(input('Informe o seu sexo, sendo M - Masculino e F- Feminimo: ')) | |
if sexo == 'M' or sexo == 'm' or sexo == 'F' or sexo == 'f': | |
validacao = True | |
else: | |
validacao = False | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
export const Checkbox = ({ label} : {label: string}) => { | |
const [value, setValue] = React.useState(false); | |
const handleChange: React.ChangeEventHandler<HTMLInputElement> = (event) => { | |
setValue(event.currentTarget.checked) | |
} | |
return ( | |
<label style={{ | |
padding: "1rem", |