Different list sizes and combinations of integers

Assignment Help Basic Computer Science
Reference no: EM132184271

FOR LOOPS QUESTION

A 2 dimensional list of integers will be used in this program (a list of lists). Each sublist is a "row". For example:

integerList = [[4, 7, 9], [3, 6, 7], [14, 13, 12], [6, 12, 222]]

A function that takes in a 2 dimensional list as shown as a parameter and returns True if all the rows add up to an even number, and returns False otherwise (if any of the rows add to an odd number). The function should work for sublists of any length (and of variable lengths -- for instance, a list such as [[1, 2], [5, 6, 7]] would be a valid input.  The program should work for a list with any number of sublists. Be sure to test the program with different list sizes and combinations of integers. Show test cases by writing a function that shows the results for several cases. This test function should run when your program starts up. Show the user what the test case is and the result.  The program must not require any user input.

Reference no: EM132184271

Questions Cloud

Conversion functions in oracle : The importance of the TO_CHAR, TO_DATE and TO_NUMBER conversion functions in Oracle?
Reflect on any word templates : Reflect on any Word templates you may have used and explain how you think these new templates in Word 2016 will help you edit and create better documents.
Discuss about the euthanasia and capital punishment : Focus on two types of killing: euthanasia and capital punishment. Describe what each of these are, and give reasons for and against the rightness.
What were the overall benefits to the company : The write-up needs to emphasize what the advantage was of investing heavily in spatial technologies in six functional areas of the firm.
Different list sizes and combinations of integers : A function that takes in a 2 dimensional list as shown as a parameter and returns True if all the rows add up to an even number, and returns
How are social inequalities and hierarchies reproduced : How might your social class influence how these agents of socialization function? How are social inequalities and hierarchies reproduced?
What strategies can you use to enhance your creativity : Think of a conflict that occurred in a team you were a part of and analyze it. What were the main sources of the conflict?
Disadvantages of three-tiered architecture : Describe the advantages/disadvantages of three-tiered architecture?
Explain what the technology is and how the technology works : Explain the business or technical problem the technology is designed to solve and the application of the technology to the problem.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Operating system machine level identical to isa language

Some instruction at operating system machine level are identical to ISA language instruction. These instruction are performed by micro program rather than by operation system.

  What are the various types of malware

What are the various types of malware? How do worms differ from viruses? Do Trojan horses carry viruses or worms? (160 word minimum, give example of atleast one worm and virus and differences)

  Maker of a leading brand of low-calorie microwavable

Questions 1 through 5 are based on the following scenario (adapted from Chapter 5 demand estimation question number 3, p.163)The maker of a leading brand of low-calorie microwavable food estimated the following demand equation for its product using..

  Suitable data validations for invalid data

Include suitable data validations for invalid data (e.g. the user enters a letter instead of an integer), but stay in the loop until the sentinel is entered.

  Troubleshoot some problematic hardware or software

Can you describe a time when you had to troubleshoot some problematic hardware or software?

  Data types in visual basic

Describe some of the most commonly used data types in Visual Basic and provide examples of how you would use each.

  Average return on all of ed

Ed invests $68,000 in certificates of deposit (i.e., CDs) paying 1.75%. How much additional money does he need to invest in stocks that are expected to generate a return of 11.8% so that the average return on all of Ed's investments is 7.5%?

  Explain that when an unauthorized individual gains access

Explain that when an unauthorized individual gains access to the information an organization trying to protect, that act is categorized as a deliberate act.

  Major objections and deterrents

1. What are some of the major objections and deterrents to proper requirements engineering activities?

  Micro-programmed control unit

Suppose you wanted to implement a control unit for a computer that you are designing. Would you use a hardwired implementation or a micro-programmed control unit? Why? What factors in the computer design would affect your decision?

  Identifying inconsistent data encodings

• Perform any other needed data preparation required. This is an open-ended step and specific details will depend on the changes needed and software tools used.

  Data file consisting of integer

Create your own data file consisting of integer, double or String values.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd