Skip to content

Commit fc9e6e8

Browse files
committed
🎨 Update
1 parent 74d8775 commit fc9e6e8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

python/easy/11_lists.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ def main() -> None:
99
L = []
1010
len_of_list = int(input("Enter the len of the list: "))
1111

12-
for _ in range(len_of_list + 1):
12+
while len(L) < (len_of_list + 1):
1313
print(">> ", end="")
1414
args = input().strip().split(" ")
15+
1516
if args[0] == "append":
1617
L.append(int(args[1]))
1718
elif args[0] == "insert":

python/easy/15_your_name.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
You are given the firstname and lastname of a person on two different lines.
3+
Your task is to read them and print the following:
4+
Hello firstname lastname! You just delved into python.
5+
"""
6+
7+
8+
def delved_into_python(first, last):
9+
return f"Hello {first} {last}! You just delved into python."
10+
11+
12+
if __name__ == "__main__":
13+
print(delved_into_python(input(), input()))

0 commit comments

Comments
 (0)