help with python code import time timeStamp = time.ctime() print(timeStamp) forum_list = [ {'date':'10-01-2022', 'name':'Student1', 'comment':'Very helpful'}, {'date': '10-01-2022', 'name': 'Student2', 'comment': 'Very good'} ]
help with python code
import time
timeStamp = time.ctime()
print(timeStamp)
forum_list = [
{'date':'10-01-2022', 'name':'Student1', 'comment':'Very helpful'},
{'date': '10-01-2022', 'name': 'Student2', 'comment': 'Very good'}
]
menu = """
Forum Comments
0: Exit
1: Display Comments
2: Add Comment
"""
done = False
while not done:
print(menu)
selection = input('Please make a selection: ')
if selection == "0":
done = True
print('Exiting now, thank you for participating')
if selection == "1":
for d in forum_list:
print(d['date'], end='')
print(' ', end='')
print(d['name'])
print(d['comment'])
if selection == "2":
comment = {}
comment['date'] = input('Please enter date: ')
comment['name'] = input('Please enter name: ')
comment['comment'] = input('Please enter comment: ')
forum_list.append(comment)
# what's inside the data.txt file
#Date Name Comment
#Sun Jul 24 12:39:15 2022 joe dogs sniff alot!
#Sun Jul 24 12:39:43 2022 kate cats sleep a lot


Python which refers to the high-level, general-purpose programming language. Its design which emphasizes the code readability with the use of significant indentation. Python which is also dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured, object-oriented and the functional programming
Step by step
Solved in 3 steps









