My issue
1st code
s = input().split()
s = list(map(int, s))
r =
for i in s:
r.append(i*2.54)
print(’ '.join(map(str,r)))
#2nd code
s = input().split()
s = list(map(int, s))
s = list(map(lambda x: x * 2.54, s))
print(’ '.join(map(str, s)))
This were the two code that gives the output which matches to expected output
I don’t know what’s the trouble the code running in usual Python compiler but not in this code chef compiler it displaying run time error can you help me out with this issue
Please
My code
s = input().split()
s = list(map(int, s)) # Convert input strings to integers
r = []
for i in s:
r.append(i*2.54)
print(' '.join(map(str,r)))
Learning course: Python Coding Challenges
Problem Link: Convert inches to centimeters Practice Problem in Python Coding Challenges