Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 3

111 bytes added, 08:17, 3 June 2017
PART 1 - Navigating Items in Lists
print(give_second_and_third_item())
</source>
 
'''Additional Requirements'''
 
:::*The script should have a '''Shebang line'''
:::*The script should have a list called '''my_list''':::*The list my_list should have the values: '''100''', '''200''', '''300''', ''''six hundred'''':::*The script should have a function called '''give_list() ''' which '''returns ''' a list:::*The script should have a function called '''give_first_item() ''' which '''returns ''' a string:::*The script should have a function called '''give_first_and_last_item() ''' which '''returns ''' a list:::*The script should have a function called '''give_second_and_third_item() ''' which '''returns ''' a list 
:::'''Sample Run 1:'''<source>
run lab3e.py
13,420
edits