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

Doubt regarding exercise 2 solutions #2

Open
samagrabarnwal opened this issue Aug 29, 2024 · 0 comments
Open

Doubt regarding exercise 2 solutions #2

samagrabarnwal opened this issue Aug 29, 2024 · 0 comments

Comments

@samagrabarnwal
Copy link

As per the book, the solution must only contain 2 print statements, one which outputs the "#" symbol and the other that outputs the new line("\n"). However in your solution to Exercise 2.2, you've used 2 for loops, one for the top part of the pattern and one for the bottom part. This amounts to 4 print statements. I had the same solution but I couldn't think of a solution in just two print statements, and I was wondering if it is possible to create a mathematical expression that outputs two zeros in a row?

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