RE in USANBOLT

cook your dish here

import math
T = int(input('Enter the no. of testcases: '))
for i in range(1, T+1):
finish = int(input("Enter finish distance: "))
distancetoBolt = int(input("Enter bolt distance: "))
tigerAcceleration = int(input("Enter tigeracceleration: "))
boltSpeed = int(input("Enter speed of bolt: "))

time_for_bolt = finish/boltSpeed
tiger_distance = distancetoBolt + finish
time_for_tiger = math.sqrt((tiger_distance/tigerAcceleration)*2)

if time_for_bolt == time_for_tiger:
print(‘Tiger’)
elif time_for_bolt > time_for_tiger:
print(‘Tiger’)
else :
print(‘Bolt’)

Welcome to CodeChef, @gemini_code. When getting inputs, do not display a request like “Enter the no. of testcases:”. Instead, just get the input.

Why? Because the routine that checks your program is only looking for the output values. When it sees something like "Enter the no. of testcases: ", the checker thinks that you have output that in response to its input, and marks your program as incorrect.

Also, as you know, indentation matters in Python – but you have pasted the code in a way that we can’t tell if your indentation is correct. The best way to post code in the future is to post a link to it, or use the </> preformatted text tag in the Discuss text editor.

Good luck!

2 Likes

thank you so much @sbatten1969, I am new to codechef and will try and learn things as soon as possible, it means a lot when good coders like you help beginners like me .

1 Like

@sbatten1969, its still showing the same error, i have done what you told ,
here is the link https://www.codechef.com/viewsolution/29283199

Response has been moved to…