subject

What is wrong with this code and correct it. def print_numbers(list):

for i in range(1, len(list)+1):

print(list[i])

num_list = [1, 2, 3, 4, 5, 6]

print_numbers(num_list)

What is wrong with this code and correct it.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 22.06.2019 14:10
Dean wants a quick way to look up staff members by their staff id. in cell q3, nest the existing vlookup function in an iferror function. if the vlookup function returns an error result, the text “invalid staff id” should be displayed by the formula. (hint: you can test that this formula is working by changing the value in cell q2 to 0, but remember to set the value of cell q2 back to 1036 when the testing is complete.)
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. the program should output the average high, average low, and the highest and lowest temper- atures for the year. your program must consist of the following functions: a. function getdata: this function reads and stores data in the two- dimensional array. b. function averagehigh: this function calculates and returns the average high temperature for the year. c. function averagelow: this function calculates and returns the aver- age low temperature for the year. d. function indexhightemp: this function returns the index of the highest high temperature in the array. e. function indexlowtemp: this function retur
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers.txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even.txt and the odd numbers to a file named odd.txt.
Answers: 3
You know the right answer?
What is wrong with this code and correct it. def print_numbers(list):

for i in range(1,...
Questions
question
Social Studies, 03.04.2020 01:47
question
Mathematics, 03.04.2020 01:47
question
Mathematics, 03.04.2020 01:47
Questions on the website: 13722360