0
for i in range(0,68):
    print(i)
nums=[range(0,67)]
print(list(nums))

This is what I know in Python to create numbers from 0 to 67 and the error is

Activity: 7.15.8 ActiveCode (assess_ps_02_09)

Result  Actual Value    Expected Value  Notes
Fail    [None]  [0, 1..., 67]   Testing that nums is a list that contains the correct elements.
You passed: 0.0% of the tests
  • I assume the code you posted really does print all the numbers you want, but it looks like some automated system wants to check. How will that system know what your code does? – quamrana Jun 21 '23 at 13:48

2 Answers2

0

Here is the Python code to create a list of numbers from 0 to 67 using the range() function:

nums = list(range(68))

The range() function generates a sequence of numbers starting from 0 by default and stops before a specified number. When we pass 68 as an argument, it will generate numbers from 0 to 67. The list() function is used to convert this range into a list.

MLR
  • 23
  • 5
-2
nums = list(range(68))

Yeah the guy who posted before me is right

(btw list() creates a new list so if you code nums = list(range(68)) your just making a list containing numbers from 0 to 67 as SEPERATE items stored in the variable nums

like [1, 2 , 3, 4]* ect *this is what will display when nums is printed

)