We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Why is the below code giving samplecase compilation error?
if__name__=='__main__':n=int(input().strip())ifn<2andn>=21:print(input("Retry by entering a valid number in the range of 2 to 20!"))else:foriinrange(1,11):print(f'{n}x{i}={n*i}')ifi==10:break
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Loops
You are viewing a single comment's thread. Return to all comments →
Why is the below code giving samplecase compilation error?