3.4.1.6 LAB: The basics of lists
The basics of lists |
If you're taking PCAP - Programming Essentials In Python , you may have encountered this question 3.4.1.6 LAB: The basics of lists.
Objectives
Familiarize the student with:
using basic instructions related to lists;
creating and modifying lists.
Scenario
There once was a hat. The hat contained no rabbit, but a list of five numbers: 1, 2, 3, 4, and 5.
Your task is to:
write a line of code that prompts the user to replace the middle number in the list with an integer number entered by the user (Step 1)
write a line of code that removes the last element from the list (Step 2)
write a line of code that prints the length of the existing list (Step 3).
Ready for this challenge?
Solution Code
=================================================================================
0 Comments
Your opinion matters, your voice makes us proud and happy. Your words are our motivation.