hello pyhton coders,i am trying to learn python and i am not getting why everytime i get Runtime error.Here’s my simple code for multiplication of two numbers
Here is your updated code.
-
raw_input() takes string as input so you need to typecast it into integer or use simple input().
-
you have to decrement the value of t inside while loop. Python is all about indentation!
t=int(raw_input())
while t:
a,b=map(long,raw_input().split())
l=a*b
print l
t=t-1
1 Like
sir,in what situation i use raw_input()…only in case of string
yes! raw_input() always takes input as string…
Read here : http://stackoverflow.com/questions/5563089/raw-input-function-in-python