Skip to content

Python code #1

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

Open
dhruvijivani opened this issue Apr 17, 2020 · 2 comments
Open

Python code #1

dhruvijivani opened this issue Apr 17, 2020 · 2 comments

Comments

@dhruvijivani
Copy link

Consider the following code:

def increment(n):
n += 1
#blank#

n = 1
while n < 10:
n = increment(n)
print(n)
Fill in the #blank# to ensure this prints 10.

@Palash-Vishnani
Copy link

Fixed issue #1

`def increment(n):
n += 1
return 10

n = 1
while n < 10:
n = increment(n)
print(n)`

@syedimaduddin
Copy link

def increment(n):
n += 1
return n

n = 1
while n < 10:
n = increment(n)
print(n)

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

3 participants