السلام عليكم
ده المسائل علي موقع codewars
Given a number n, return the number of positive odd numbers below n, EASY!
وده الحل بتاعي
def odd_count(n):
odd = 0
for i in range(n):
if i % 2 != 0:
odd += 1
return odd
print(odd_count(7))
انا بعد ما Test فا كل صح الحمد الله
بس المشكله في ام بضغط علي ATTEMPT عشان ابعت السوال بيظهر الخطاء ده
Why did my code time out?
Our servers are configured to only allow a certain amount of time for your code to execute. In rare cases the server may be taking on too much work and simply wasn't able to run your code efficiently enough. Most of the time though this issue is caused by inefficient algorithms. If you see this error multiple times you should try to optimize your code further.