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

Introduction Part - Part 2 - Simple loops - Shall we continue? #103

Open
npereira89 opened this issue Feb 4, 2025 · 0 comments
Open

Introduction Part - Part 2 - Simple loops - Shall we continue? #103

npereira89 opened this issue Feb 4, 2025 · 0 comments

Comments

@npereira89
Copy link

In this exercise, you demand to use 3 print outputs, but we can use only 2 to optimize code and bytes. It was a limitation for who is python developer with some knowledge. It's not a bug but should be a improvement. What do you think?

Your solution:


print("hi")
greeting = input("Shall we continue? ")

while greeting != 'no':
    print("hi")
    greeting = input("Shall we continue? ")
print("okay then")

My suggestion:

greeting = input("hi\nShall we continue? ")
while greeting != 'no':
    greeting = input("hi\Shall we continue? ")
print("okay then")
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