-
Notifications
You must be signed in to change notification settings - Fork 7
Update Part-1-Functions #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Tushar-OP
left a comment
There was a problem hiding this 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)): |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The program is wrong
No description provided.