answer.
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
Softa [21]
1 year ago
14

For any element in keysList with a value greater than 60, print the corresponding value in itemsList, followed by a semicolon (n

o spaces). Ex: If keysList = {32, 105, 101, 35} and itemsList = {10, 20, 30, 40}, print: 20;30;
Computers and Technology
2 answers:
nika2105 [10]1 year ago
6 0

Answer:

Below are the python Program for the above question:

Explanation:

keysList =[1,61,68,64]#key list items.

itemsList =[1,2,3,4]#item list items.

for x in range(len(keysList)):#for loop.

   if(keysList[x]>60):#check the value to be greator.

       print(itemsList[x],end=";")#print the value.

Output:

  • The above code will print as "2;3;4;".

Code Explanation:

  • The above code is in python language, in which the first and second line of the code defines a list. That list can be changed by the user when he wants.
  • Then there is a or loop that scans the keylist items and matches the items that it is greater than 60 or not. If it then takes the location and prints the itemlist by the help of that location.
RSB [31]1 year ago
4 0

Answer:

Following are the program in Java language

import java.util.Scanner;  // import package

class Main  // main class

{

public static void main (String [] args)   // main method

{

int k=0; // variable declaration // declaration of variable  

final int size = 4;  // declared the constant variable  

int[] keysList = new int[size];  // declared the array of keysList

int[] itemsList = new int[size];  // // declared the array of itemsList

keysList[0] = 32;  // storing the value in KeysList

keysList[1] = 105;  // storing the value in KeysList

keysList[2] =101;  // storing the value in KeysList

keysList[3] = 35; // storing the value in KeysList

itemsList[0] = 10; // storing the value in itemList

itemsList[1] = 20; // storing the value in itemLis

itemsList[2] = 30; // storing the value in itemLis

itemsList[3] = 40; // storing the value in itemLis

while(k<itemsList.length)  // iterating the loop

{

if(keysList[k]>60)  // check the condition

{

System.out.print(itemsList[k]);  // display the value

System.out.print(";");    //print space

}

k++;  // increment of k by 1

}

}

Output:

20;30;

Explanation:

Following are the description of Program

  • Create a variable "k" and Initialized with "0".
  • Declared a constant variable "size" with the value 4.
  • Declared the array  "keysList"  and " itemsList" also their value will be initialized.
  • After that iterating the while loop and check the condition of keysList array with a value greater than 60 then display the corresponding value in itemsList.
You might be interested in
How to code 2.9.5: Four colored triangles {Code HS}
Nitella [24]

Answer: penup()

backward(100)

for i in range(4):

pensize(5)

pendown()

left(60)

color("green")

forward(50)

right(120)

color("blue")

forward(50)

color("red")

right(120)

forward(50)

penup()

left(180)

forward(50)

Explanation:

L

6 0
2 years ago
The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function: y 5
SOVA2 [1]

Answer:

High level Language

understand

Explanation:

rocket is 0...4433456u888

5 0
1 year ago
Write code that uses the input string stream inss to read input data from string userinput, and updates variables usermonth, use
mr Goodwill [35]

Answer:

It will be a java code.

Explanation:

import java.util.Scanner;

public class StringInputStream {

    public static void main (String [] args) {

        Scanner inSS = null;

        String userInput = "Jan 12 1992";

        inSS = new Scanner(userInput);`

        String userMonth = "";

        int userDate = 0;

        int userYear = 0;

        /* Your solution goes here  */

        System.out.println("Month: " + userMonth);

        System.out.println("Date: " + userDate);

        System.out.println("Year: " + userYear);

        return;

   }

}

3 0
2 years ago
Read 2 more answers
A _______ bulb contains a high-pressure gas. Oils from the hands can affect the expansion of the glass, which can shorten the li
shusha [124]

Answer:

I'd go with the 2nd one

If it heats up more & more, then it's lifespan will be shortened more & more.  The more it heats up, the less durability it has.

6 0
1 year ago
3) 5, 10, 15, 20 are items of data. Explain how these could become information and what knowledge
yKpoI14uk [10]

For example when there is research on how many people shoplift in a shopping centre per week. These numbers could show a increase in the number of shoplifters per week.

8 0
1 year ago
Other questions:
  • Which of the following word pairs correctly completes the sentence below?
    15·2 answers
  • Edward has started up a new company with his friend, Matthew. Currently, he has only two people working with him. Which type of
    8·1 answer
  • Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The user shoul
    13·1 answer
  • . Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
    15·1 answer
  • Topological sort requires only a tiny addition to the DFS algorithms. Exactly one of the following data structures is required t
    9·1 answer
  • dam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took to get the correct
    9·1 answer
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    13·1 answer
  • As a digital forensics examiner, it’s a good idea to build a list of references for information on privacy laws in other countri
    13·1 answer
  • Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the
    10·1 answer
  • Suggest how the following requirements might be rewritten in a quantitative way. You may use any metrics you like to express the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!