Skip to content

Conversation

@siddharth151199
Copy link

No description provided.

Copy link
Owner

@Tushar-OP Tushar-OP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the changes

str="siddharth"
s=0
n=len(str)
for i in range(len(str)):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you use "n" variable if your not using it in range!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

for i in range(len(str)):
print(str[s])
s=s+2

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you run the program? It's not correct, there's a possibility of index out of bounds error

if count_evens[i]%2==0:
count=count+1

return count
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Program's wrong

print("true")
else:
print("false")

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The program is wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants