TypeError: unsupported operand type(s) for /: 'str' and 'int'
Publicado por Lucas (8 intervenciones) el 26/04/2018 15:37:33
Bueno pues estoy empezando a programar en Python y estoy intentando hacer un calculador de medias sencillo. Pero me da un error, a ver si me podéis ayudar. Gracias
ERROR:
line 27, in <module>
nota_media=((nota_1+nota_2+nota_3)/3)*valor_nota + ((nota_clase_1+nota_clase_2)/2)*valor_nota_clase
TypeError: unsupported operand type(s) for /: 'str' and 'int'
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
#Caculador de medias#
print("Nota del primer parcial:")
nota_1= input()
print("Nota del segundo parcial:")
nota_2= input()
print("Nota del tercer parcial:")
nota_3= input()
print("Nota de clase 1:")
nota_clase_1= input()
print("Nota de clase 2:")
nota_clase_2= input()
print("Valor parciales (ej: si es 70% 0,7):")
valor_nota= input()
print("Valor nota de clase (ej: si es 30% 0,3):")
valor_nota_clase= input()
print("Nota media:")
nota_media=((nota_1+nota_2+nota_3)/3)*valor_nota + ((nota_clase_1+nota_clase_2)/2)*valor_nota_clase
print(nota_media)
ERROR:
line 27, in <module>
nota_media=((nota_1+nota_2+nota_3)/3)*valor_nota + ((nota_clase_1+nota_clase_2)/2)*valor_nota_clase
TypeError: unsupported operand type(s) for /: 'str' and 'int'
Valora esta pregunta


0