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
Sholpan [36]
3 years ago
6

Please help me with this question pt.2

Computers and Technology
1 answer:
Minchanka [31]3 years ago
7 0

Answer:

I think the second question is C.

Explanation:

I am still trying to think what's the answer to the first question.

You might be interested in
Given a variable n that is associated with a positive integer and a variable s that is associated with the empty string, write s
k0ka [10]

Answer:

//Scanner class is imported to allow the program receive user input

import java.util.Scanner;

//Class Solution is created

public class Solution {

   // The main method which is the beginning of program execution

   public static void main(String args[]) {

       //Scanner object 'scan' is created to accepted user input from the keyboard

       Scanner scan = new Scanner(System.in);

       //A prompt is displayed to the user to enter a positive number

       System.out.println("Please enter a positive number: ");

       //User input is stored as variable n

       int n = scan.nextInt();

       // An empty string is assigned to s

       String s = "";

       

       // Beginning of while loop

       // The loop begin while n is a positive number

       while(n > 0){

           //s is concatenated with *

           s+= "*";

           // the value of n is reduced.

           n--;

       }

       

       // The value of the string s is displayed to the screen

       System.out.println(s);

       

   }

}

Explanation:

First the Scanner class is imported, then the class Solution is created. Inside the main method, a prompt is first displayed to the user to enter a positive number. After that, a scanner object scan is created to receive the user input and assigned to n. An empty string is assigned to s.

Then the while loop repeat for each value of n greater than 0 and concatenate "*" to s.

Finally, the value of s is displayed to the user.

8 0
3 years ago
Write code that inserts userItems into the output string stream itemsOSS until the user enters "Exit". Each item should be follo
Yuki888 [10]

Answer:

The solution code is written in Python:

  1. itemsOSS = ""
  2. userItem = input("Enter an item: ")
  3. while(item != "Exit"):
  4.    itemsOSS += userItem + " "
  5.    userItem = input("Enter an item: ")
  6. print(itemsOSS)

Explanation:

Firstly, we create a variable itemsOSS (intialized it with empty string) and use it as output string stream (Line 1).

Next use input function to prompt user to enter first item (Line 2)

While the item value is not "Exit" (Line 4), append userItem to variable itemsOSS.

When the user enter "Exit", use print function to print the itemsOSS string (Line 8).

8 0
3 years ago
(Reverse number) Write a program that prompts the user to enter a four-digit inte- ger and displays the number in reverse order.
prohojiy [21]

Answer:

The program in Python is as follows:

num = int(input("4 digit number: "))

numstr = str(num)

if(len(numstr)!=4):

    print("Number must be 4 digits")

else:

    numstr = numstr[::-1]

    num = int(numstr)

    print(num)

Explanation:

This prompts user for input

num = int(input("4 digit number: "))

This converts the input number to string

numstr = str(num)

This checks if number of digits is or not 4

if(len(numstr)!=4):

If not, the following message is printed

    print("Number must be 4 digits")

else:

If digits is 4,

This reverses the string

    numstr = numstr[::-1]

This converts the reversed string to integer

    num = int(numstr)

This prints the reversed number

    print(num)

6 0
3 years ago
What is an online recommendation engine?
Gala2k [10]

Answer:

Online recommendation engine. a set of software algorithms that uses past user data and similar content data to make recommendations for a specific user profile. An online recommendation engine is a set of search engines that uses competitive filtering to determine what content multiple similar users might like. False.

6 0
3 years ago
list the six external parts or "peripherals" of a computer system and identify which are output and which are input devices.
Tpy6a [65]
There are lots of different peripherals of computer systems. Some examples are listed below:

Input:
Keyboard
Mouse
Video Camera
Microphone
Joystick
Scanner

Output:
Monitor
Projector
Printer
Speakers

Any external device that gives input to or gets output from the computer is a peripheral.
7 0
3 years ago
Other questions:
  • Memory is a _____________ that includes the organization and shaping of information by processing, storage, and retrieval of inf
    15·1 answer
  • A program is run line by line to determine the source of a logic error. Which best describes the specific tool being used? (A.)c
    5·1 answer
  • P36. In Section 3.5.4, we saw that TCP waits until it has received three duplicate ACKs before performing a fast retransmit. Why
    10·1 answer
  • Which would be the best reason to consider using plain tables instead of shaded tables in a document?
    6·2 answers
  • A bank system mainframe is struck by a DDoS attack and goes offline. Customer’s cannot log on to their accounts. Which element o
    11·1 answer
  • Explain 5 service provided by Internet​
    6·1 answer
  • In the code below, what's the final value of the variable x?
    8·1 answer
  • an attack has changed the value of a variable used when copying files from one cloud server to a local drive. what is the most l
    5·1 answer
  • What's good computing?
    15·1 answer
  • *the sticker, available in the middle section of the prescription label, will indicate if the customer requested non-safety caps
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!