We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed2ca44 commit 2c54049Copy full SHA for 2c54049
lab-11/stack.py
@@ -5,10 +5,12 @@ def __init__(self):
5
6
7
def getStack(self):
8
+ """Prompts the user to enter five strings and stores them in a stack."""
9
for i in range(5):
10
self.stack.append(input(f"Enter string {i + 1} out of 5: "))
11
12
def reverseStack(self):
13
+ """Reverses the order of the stack and displays it."""
14
for i in range(1, 6):
15
print(self.stack[-i])
16
0 commit comments