54th day of python challenges 78-79

This commit is contained in:
abd.shallal
2019-07-22 10:49:24 +03:00
parent 0734522641
commit 6a11f68f12
4 changed files with 119 additions and 61 deletions

View File

@@ -0,0 +1,8 @@
tv_program = ['GOT', 'Prison Break', 'Supernatural', 'Chernobyl ']
for i in tv_program:
print(i)
ask_name = str(input('Enter a name of show you want to add to list : '))
ask_position = int(input('Enter position of entered show in list : '))
tv_program.insert(ask_position, ask_name)
for i in tv_program:
print(i)

View File

@@ -0,0 +1,13 @@
nums = []
count = 0
remove = False
while not remove:
if count == 3:
ask = str(input('Do you still want the last number they entered saved? yes|no : ')).lower()
if ask == 'no':
nums.pop(count-1)
remove = True
else:
nums.append(int(input('Enter number : ')))
count = count + 1
print(nums)