Test Case 1 in python for beginners is hidden...correct code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Test Case 1 in python for beginners is hidden...correct code?

Hi! I am new to sololearn and just started the "python for beginners" course as an absolute newbie to programming. In order to complete the first lesson, I need to pass a quick test. When i enter my code and press 'run' to see my result, unfortunately all I get is this text: "Test Case 1 This test case is hidden". Why do I not get the result? Now I neither understand, if my answer was correct, nor am I able to uccessfully complete the first lesson as I finnished only 7 of 8 tasks. Maybe you guys can tell me if my code/answer is right or wrong? The task: "You need to calculate the flight time of an upcoming trip. You are flying from LA to Sydney, covering a distance of 7425 miles, the plane flies at an average speed of 550 miles an hour. Calculate and output the total flight time in hours. The result should be a float. My answer: print('7425/550')

12th Feb 2021, 8:10 PM
codik
codik - avatar
3 Answers
0
Remove the quotation marks and the code works fine 😃 Happy Coding
13th Feb 2021, 2:46 AM
∆BH∆Y
∆BH∆Y - avatar
+ 1
Every thing you write in quotes (' ' or " ") becomes a string literal. So it prints a string like 7425/550. Remove quotes, it should be just: print(7425/550)
12th Feb 2021, 8:32 PM
Jayakrishna 🇮🇳
0
thank you so much, guys!
15th Feb 2021, 7:43 PM
codik
codik - avatar