-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteste1.py
More file actions
39 lines (29 loc) · 826 Bytes
/
teste1.py
File metadata and controls
39 lines (29 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#Sintaxe base do for:
#---
#for numero in range(x):
#print("Olá, aluno")
#-------------------
# Para iniciar ate terminar uma repetição
#for I in range(1, 6):
#print(I)
#----------------------------
#Para contar de 2 em 2, 3 em 3, etc
#for I in range(0, 11, 2):
#print(I)
#EX:
#num = int(input("digite um número: "))
#SEM O ARMAZENAMENTO DO RESULTADO
#for I in range (1,11):
# print(num*I)
#COM ARMAZENAMENTO DA VARIAVEL
#for i in range (1,11):
#res= num*i
#print(res)
#terceiro exemplo, conte quantos numeros pares que o usuário digitou
#contador =0
#ctl=int(input("digite repetições: "))
#for i in range(1, ctl):
# num=int(input("digite um número"))
# if num % 2 == 0:
# contador= contador +1
#print(contador , "pares")