- 2

Hey Guys, for some code coach problems, I am getting the correct expected outputs in another IDEs, While SL IDE is showing error

Sololearn IDE is showing error for same inputs... I am using Pydroid (Python), it gives the correct expected output....

3rd May 2022, 7:42 AM
Lakshya Mittal
Lakshya Mittal - avatar
3 odpowiedzi
+ 2
Lakshya Mittal check the spelling for cheeseburger or cheseburger in description... I think you misspelled..
3rd May 2022, 12:56 PM
Jayakrishna 🇮🇳
+ 5
Lakshya Mittal , sl has multiple sets of arguments (test cases) that are used for input() functions when code coach exercises are evaluated. some of them are so called edge cases, that may not be tested by you. if you have any doubts, link your code here so that we can check it.
3rd May 2022, 10:44 AM
Lothar
Lothar - avatar
+ 1
# Nachos = Pizza = 6 # Cheseburger = 10 # Water = 4 # Coke = 5 List = ["Nachos", "Pizza", "Cheseburger", "Water", "Coke"] Total = 0 a = input().split() for i in range(len(a)): if a[i] not in List: a[i] = "Coke" for j in a: if j == "Nachos" or j == "Pizza": Total += 6 elif j == "Cheseburger": Total += 10 elif j == "Water": Total += 4 elif j == "Coke": Total += 5 Tax = (Total*7)/100 print(Total + Tax) # To sir Lothar...Here is the code for "Ballpark Orders" code coach problem in which all the test case are passed except Test case 2....
3rd May 2022, 12:39 PM
Lakshya Mittal
Lakshya Mittal - avatar