-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuclesII.py
42 lines (29 loc) · 818 Bytes
/
BuclesII.py
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
40
41
42
# Imprime una lista
for i in ["Pildoras", "Informáticas", 3]:
print(i, end = " - ")
print("\n")
# Imprime carácter a carácter un string
for i in "Guillermo":
print(i, end = " - ")
print("\n")
arroba = False
punto = False
cantArroba = 0
cantPunto = 0
email = input(" >> Introduce dirreción de email: ")
if email[0] != "@" and email[len(email) - 1] != "@" and email[0] != "." and email[len(email) - 1] != ".":
for i in email:
if i == "@":
arroba = True
cantArroba += 1
if i == ".":
punto = True
cantPunto += 1
if arroba and punto and cantArroba == 1 and 1 <= cantPunto <= 3:
print(" EMAIL CORRECTO")
else:
print(" EMAIL INCORRECTO")
print("\n")
# Uso de tipo range() en bucle for
for i in range(3):
print(i)