sanX9949 sanX9949
  • 13-07-2020
  • Computers and Technology
contestada

Write code to create a list of numbers from 0 to 67 and assign that list to the variable nums. Do not hard code the list. Save & RunLoad HistoryShow CodeLens

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 22-07-2020

Answer:

The program written in Python is as follows

nums = []

for i in range(0,68):

-->nums.append(i)

print(nums)

Explanation:

Please note that --> is used to denote indentation

The first line creates an empty list

nums = []

This line creates an iteration from 0 to 67, using iterating variable i

for i in range(0,68):

This line saves the current value of variable i into the empty list

nums.append(i)

At this point, the list has been completely filled with 0 to 67

This line prints the list

print(nums)

Answer Link

Otras preguntas

What happens when plate subducts and reaches the mantle
After the Congress of Vienna, Europe... was further divided along national lines. gained territory back from Asia. removed all royalty from power. consisted sol
What is the best definition of the word pedantic as used in this sentence? The debate judges were so pedantic when going over guidelines that it took nearly an
Can someone help me with this science question like uhm!??!? anyone
a study was conducted at a large hospital to determine whether there was a relationship between numbers
solve for x- 5(x+4)=30​
If anyone could help me I would really appreciate it. Thank You
whats 1 +4? i honestly have no idea-
Someone help me please
The graph of this system of equations is used to solve 4y-3X+6= 2x-9x°+2x y- 4x²-3x+6 ly= 2x-9x°+2x What represents the solution set? O y-intercepts of the grap