Skip to content
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

Generators part 2 #6

Open
olliesilvester opened this issue Jul 8, 2024 · 0 comments
Open

Generators part 2 #6

olliesilvester opened this issue Jul 8, 2024 · 0 comments

Comments

@olliesilvester
Copy link
Owner

olliesilvester commented Jul 8, 2024

Write a generator function running_total that yields the running total of numbers sent to it. The generator should start with a total of 0 and add to the total each time it receives a new number through send(). Write a script to demonstrate using this generator.

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

No branches or pull requests

1 participant