[ create a new paste ] login | about

Link: http://codepad.org/TbgJbat7    [ raw code | output | fork ]

Python, pasted on Dec 6:
n=int(input('cantidad de alumnos: '))
a,r,ni=0,0,0
lista=['I','R','A','B','P','D','T']
lista2=['M','T','N']
while a<n:
    a+=1
    name=input('Nombre: ')
    while True:
        esp=input('I R A B P D T   Especialidad: ')
        if esp.upper() in lista:
            break
        else:
            print('ERROR: Elige una letra ')
    while True:
        turno=input('M T N turno: ')
        if turno.upper() in lista2:
            break
        else:
            print('ERROR: Elige una letra ')
    if esp.upper()=='R':
        r+=1
    if esp.upper()=='I' and turno.upper()=='N':
        ni+=1
    print('\n')
print('Cantidad de Relaciones Industriales:',r)
print('Alumnos de Informática (I) del Turno de la Noche:',ni)


Output:
1
2
  Line 26
SyntaxError: Non-ASCII character '\xc3' in file t.py on line 26, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details


Create a new paste based on this one


Comments: