1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vredina [299]
3 years ago
6

Write a program for any element in keysList with a value greater than 50, print the corresponding value in itemsList, followed b

y a space. Ex: If keysList = {32, 105, 101, 35} and itemsList = {10, 20, 30, 40}, print: 20 30.
Computers and Technology
1 answer:
Mamont248 [21]3 years ago
4 0

Answer:

The solution code is written in Python:

  1. keysList = [32, 105, 101, 35]
  2. itemsList = [10, 20, 30, 40]
  3. output = ""
  4. for i in range(len(keysList)):
  5.    if(keysList[i] > 50):
  6.        output += str(itemsList[i]) + " "
  7.    
  8. print(output)

Explanation:

Firstly, let us use the two sample list, keysList and itemsList in our program (Line 1-2). Then create a output variable to hold the output string (Line 4).

Next, we create a for-loop and use it to traverse through the elements in the keysList. If any keysList element is bigger than 50 then we use the same index i to get the corresponding item from itemsList and join that value to the output string (Line 7-8).

Lastly, we print the output (Line 10).

You might be interested in
What caused the wiki sans glitch?
Jlenok [28]

Answer:

The c.do

Explanation:

The C.Do1 is a thing in wiki that causes a glitch because it makes a third party system for other programs and people to edit or cause it to bug or glitch.

6 0
3 years ago
Outlines are effective because they:
sammy [17]
B. to help put ideas in order of importance

8 0
4 years ago
Read 2 more answers
Some programmers include scroll bars, title bars, buttons, and menus in a program simply by adding them to a layout through a pr
madreJ [45]

Answer:

Visual.

Explanation:

Some programmers include scroll bars, title bars, buttons, and menus in a program simply by adding them to a layout through a process called visual programming.

A visual programming language is also commonly referred to as graphics user interface builder (GUI builder) and can be defined as a programming tool that avails programmers the ability to develop software programs (applications) using graphical elements and figures rather than texts alone.

Some examples of visual programming language are executable UML, Blockly, Kodu, Alice, Lego mindstorms, Gamemakers etc.

6 0
3 years ago
Explain the concept of “survival of the fittest”
klasskru [66]

Answer:

i think thats a line from  the lorax

Explanation:

4 0
3 years ago
Search engines enable you to
lord [1]
Search engines enable you to locate web pages related to a specific subject.
4 0
3 years ago
Read 2 more answers
Other questions:
  • All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
    15·1 answer
  • How does consumption of alcohol affect your driving skills? Name three ways that alcohol can affect your driving.
    15·2 answers
  • Hannah had been a newspaper carrier for four years. Each year she delivered more papers then the year before. The first year she
    13·1 answer
  • Write a program for any element in keysList with a value greater than 50, print the corresponding value in itemsList, followed b
    6·1 answer
  • A security administrator is analyzing a user report in which the computer exhibits odd network-related outages. The administrato
    13·1 answer
  • Engineers and scientists redesign a prototype if it does not work correctly true or false and why
    10·2 answers
  • A or an is a simple chip with two or more processor core
    5·1 answer
  • JAVA
    13·1 answer
  • Bill, a manager at Publix has to make the weekly work schedule. He schedules each employee for either a day shift (8Am-5Pm), and
    5·1 answer
  • Is it bad to leave your laptop plugged in all the time
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!