Question: Lists Exercise 4 Problem Write a program that takes a list called numbers that contains integers in a sequence ( the sequence is always increasing,

Lists Exercise 4
Problem
Write a program that takes a list called numbers that contains integers in a sequence (the sequence is always increasing, never decreasing). Your program should add the next two numbers in the sequence, and then print the list.
Expected Output
If numbers =[1,2,3,4] then you will print [1,2,3,4,5,6]
If numbers =[-5,-4,-3,-2] then you will print [-5,-4,-3,-2,-1,0]
Important
Do not edit the code in the top section. This code is necessary for the auto-grader to work. Add your code in the section below.
Testing Your Code
The TEST 1 button will test your code with numbers =[1,2,3,4]. The TEST 2 button will test your code with numbers =[-5,-4,-3,-2].Problem
Write a program that takes a list called numbers that contains integers in a sequence (the sequence is always increasing, never decreasing). Your program should add the next two numbers in the sequence, and then print the list.
Expected Output
If numbers =[1,2,3,4] then you will print [1,2,3,4,5,6]
If numbers =[-5,-4,-3,-2] then you will print [-5,-4,-3,-2,-1,0]
Important
Do not edit the code in the top section. This code is necessary for the auto-grader to work. Add your code in the section below.
Testing Your Code
The TEST 1 button will test your code with numbers =[1,2,3,4]. The TEST 2 button will test your code with numbers =[-5,-4,-3,-2].
TEST 1
TEST 2
Where is the code visualizer?
Unfortunately, the code visualizer does not work with the statement import sys. Since importing the sys module is required for this problem, the code visualizer will not be available for this problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!