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 does the writer imply in this line from the excerpt? The house, dooryard, barng woodshed was now all full, and when ANOTHER crowd come I told 'em not to go
I need help solving this problem: -1/7c=21. Please help me and solve for c
absolute number of -8 can u tell me plz
What percent of 30 is 45%
What addition doubles fact can help you solve 4+5? Explain how you know.
If you add one third of a number to the number itself you get 16 what is the number
a scientific idea that is well tested and widely accepted by the scientific community is called a scientific
Simplify the ratio 18b^2 to 45b
A gardener wants to run a border around the outside of her garden. She plots it on a grid to plan how much she will need. The garden is in the shape of a rectan
which monotheistic religion promoted the worship of ahura mazda? a. islam b. judaism c. christianity d. zoroastrianism