Skip to content

Bp #1130

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
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Bp #1130

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Sixth challenge completed
  • Loading branch information
BaoPham92 committed Feb 10, 2020
commit aa81df7ea01443e4895211a1e65e861dc9744908
15 changes: 9 additions & 6 deletions src/05_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@

# For the following, DO NOT USE AN ASSIGNMENT (=).

# * SOLUTIONS BELOW:
# * OPEN INTERPRETER && RUN: python3 05_lists.py

# Change x so that it is [1, 2, 3, 4]
# YOUR CODE HERE
x.append(4)
print(x)

# Using y, change x so that it is [1, 2, 3, 4, 8, 9, 10]
# YOUR CODE HERE
x.extend(y)
print(x)

# Change x so that it is [1, 2, 3, 4, 9, 10]
# YOUR CODE HERE
x.remove(8)
print(x)

# Change x so that it is [1, 2, 3, 4, 9, 99, 10]
# YOUR CODE HERE
x.insert(5, 99)
print(x)

# Print the length of list x
# YOUR CODE HERE
print('LENGTH OF LIST: ', len(x))

# Print all the values in x multiplied by 1000
# YOUR CODE HERE
for item in x: print(str(item * 1000))