I have to do several exercises in Python that the input values should be on the same line and indicated the input().split(" ")
, but the program does not run, it gives error. Ex.:
C, Q = input().split(" ")
C = int(C)
Q = int(Q)
if(C==1):
T=4.00
elif(C==2):
T=4.50
elif(C==3):
T=5.00
elif(C==4):
T=2.00
elif(C==5):
T=1.50
print("Total: R$ %.2f"%(T*Q))
print
The error q gives:
Traceback (most recent call last):
File "C: /Users/ILDA/Desktop/lanche.py", line 1, in
C, Q = input (). Split ("")
ValueError: not enough values to unpack (expected 2, got 1)