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
Darya
2 months ago
15

The table is an excerpt from an interviewer’s notes about three applicants applying to the IT department.                

Computers and Technology
1 answer:
Natasha_Volkova [1K]2 months ago
5 0

Answer:

C

Explanation:

You might be interested in
More Loops: All versions of foods.py in this section have avoided using for loops when printing to save space. Choose a version
8_murik_8 [964]

Response:

The following is a program written in Python.

#Initialize a list variable and set its elements

myPizza = ['Margarita', 'Capsicum and onion', 'Chicken']

#Create a variable and duplicate the elements

frndPizzas = myPizza[:]

#Add an item to the list

myPizza.append('Corn')

#Add an item to the friend's pizza list

frndPizzas.append('paperica')

#Display a message

print("My pizzas are:")

#Use a for loop to display the elements of the first list

for pizza in myPizza:

print(pizza)

#Display another message

print("\nFriend's pizzas are:")

#Use a for loop to display the elements of the second list

for frndsPizza in frndPizzas:

print(frndsPizza)

Output:

My pizzas are:

Margarita Capsicum and onion Chicken Corn

Friend's pizzas are:

Margarita Capsicum and onion Chicken paperica

Explanation:

This program can be summarized as follows:

  • Define a list variable called 'myPizza' and initialize it.
  • Define another list variable called 'frndPizzas' and duplicate the items.
  • Add elements to both lists.
  • Utilize for loops to print items in each list.
5 0
2 months ago
Within a word processing program, predesigned files that have layout and some page elements already completed are called text bo
Harlamova29_29 [1022]
I believe the answer is D. You're welcome:)
7 0
1 month ago
Write a program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename
amid [951]

This code is in Python. I'm not certain what programming language you need.

Refer to the image:

7 0
2 months ago
Read 2 more answers
Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input.
Amiraneli [1052]

Answer:

In C++:

#include <iostream>

#include <string>

#include <sstream>

using namespace std;

int main(){

   string lname, fname, stringnum;    int num; string login, pwd;

   cout<<"Last Name: ";    cin>>lname;

   cout<<"First Name: ";    cin>>fname;

   cout<<"Four-digit integer: ";    cin>>num;

   stringnum = to_string(num).substr(0, 4);

   stringstream geek(stringnum);    geek>>num;

   num = num%100;

   pwd = to_string(num);

   if(lname.length()<5){ login = lname + fname.substr(0, 1);    }

   else{ login = lname.substr(0, 5) + fname.substr(0, 1);    }

   cout<<"Login Name: "<<login<<endl;

   cout<<"Password: "<<pwd<<endl;

   return 0;

}

Explanation:

This initializes all the required variables

   string lname, fname, stringnum;    int num;     string login, pwd;

This asks the user for their last name

   cout<<"Last Name: ";    cin>>lname;

This asks for the first name of the user

   cout<<"First Name: ";    cin>>fname;

This prompts for a four-digit number

   cout<<"Four-digit integer: ";    cin>>num;

This converts the number into a string and extracts the first four digits

   stringnum = to_string(num).substr(0, 4);

This changes the string back into an integer

   stringstream geek(stringnum);    geek>>num;

This extracts the last two digits of the four-digit number

   num = num%100;

This generates the user's password

  pwd = to_string(num);

This constructs the user's login name.

This block runs if the last name has fewer than five letters

   if(lname.length()<5){ login = lname + fname.substr(0, 1);    }

This block runs otherwise

   else{ login = lname.substr(0, 5) + fname.substr(0, 1);    }

This displays the login name

   cout<<"Login Name: "<<login<<endl;

This displays the password

   cout<<"Password: "<<pwd<<endl;

3 0
2 months ago
Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with a
8_murik_8 [964]

Answer:

Below is the JAVA program:

import java.util.Scanner;   //to take input from user

public class Main {  //name of the class

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

      Scanner input = new Scanner(System.in);  //creates Scanner instance

      int integer = input.nextInt();  //defines and collects an integer for the number of words

      String stringArray[] = new String[integer]; //initializes an array to hold strings

      for (int i = 0; i < integer; i++) {  //iterates through the array

          stringArray[i] = input.next();         }  //collects strings

      int frequency[] = new int[integer];  //creates an array for holding frequencies

      int count;         //initializes variable to calculate frequency of each word

      for (int i = 0; i < frequency.length; i++) {  //iterates through frequency array

          count = 0;  //sets count to zero

          for (int j = 0; j < frequency.length; j++) {  //iterates through array

              if (stringArray[i].equals(stringArray[j])) {  //checks if element at ith index matches jth index

                  count++;                 }            }  //increments count

          frequency[i] = count;      }  //stores count in the frequency array

      for (int i = 0; i < stringArray.length; i++) {  //iterates through the string array

          System.out.println(stringArray[i] + " " + frequency[i]);         }    }    } //displays each word and its frequency

Explanation:

To illustrate the program, consider:

let integer = 3

for (int i = 0; i < integer; i++) is used to input strings into stringArray.

On the first pass:

i = 0

0<3

stringArray[i] = input.next(); takes a word and saves it to the ith index of stringArray. For example, if the user types "hey", it will be in stringArray[0].

Then, i increments to i = 1

On the second pass:

i = 1

1<3

stringArray[i] = input.next(); takes another word and assigns it to stringArray[1]. If the user enters "hi", then hi will be in stringArray[1]

Next, i becomes i = 2

On the third pass:

i = 2

2<3

stringArray[i] = input.next(); captures a word and places it in stringArray[2]. If the user types "hi", it goes to stringArray[2]

Then, i increments to i = 3

The loop terminates since i<integers is false.

The next outer loop for (int i = 0; i < frequency.length; i++) and inner loop for (int j = 0; j < frequency.length; will check each word and if (stringArray[i].equals(stringArray[j])) identifies any duplicates. Words that repeat will have their count incremented and the frequency array will record these values. For example, hey appears once while hi shows up twice, thus resulting in the final outputs:

hey 1

hi 2

hi 2

The visual representation of the program and its outcome based on the example provided is attached.

4 0
2 months ago
Other questions:
  • Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
    5·1 answer
  • Consider a load-balancing algorithm that ensures that each queue has approximately the same number of threads, independent of pr
    14·1 answer
  • Sara is writing a program to input her monthly phone bills and output the month name and amount for the month with maximum amoun
    7·1 answer
  • The principal that users have access to only network resources when an administrator explicitly grants them is called __________
    6·1 answer
  • Explain what might happen if two stations are accidentally assigned the same hardware address?
    15·1 answer
  • HELP ME ON THIS PLEASE ILL GIVE BRAINLY!!!! If U GET IT RIGHT !!!
    10·1 answer
  • Team A found 342 errors during the software engineering process prior to release. Team B found 184 errors. What additional measu
    12·1 answer
  • #Write a function called random_marks. random_marks should #take three parameters, all integers. It should return a #string. # #
    10·1 answer
  • "If someone really wants to get at the information, it is not difficult if they can gain physical access to the computer or hard
    11·1 answer
  • 5) [4 points] Suppose you have a simple computer that is capable of storing only the months of the year. The number of bits avai
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!