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
lys-0071 [83]
3 years ago
7

Assign the size of userInput to stringSize. Ex: if userInput is "Hello", output is: Size of userInput: 5

Computers and Technology
1 answer:
Basile [38]3 years ago
8 0

Answer:

import java.util.Scanner;

public class StringSize {

  public static void main (String [] args) {

     Scanner scnr = new Scanner(System.in);

     String userInput;

     int stringSize;

     userInput = scnr.nextLine();

     

     /* Your solution goes here  */

     

     stringSize = userInput.length();

     

     System.out.println("Size of userInput: " + stringSize);

     return;

  }

}

Explanation:

stringSize = userInput.length();  //  userInput.length() will get the length of the string and  put in stringSize

You might be interested in
Which statement best describes the Tell Me feature in PowerPoint 2016?
GrogVix [38]

Answer:

It provides detailed information about particular tasks within the program

3 0
2 years ago
Complete the code to finish this program to analyze the inventory for a store that sells purses and backpacks. Each record is co
Volgvan
Import csv
fileIn = open("data/bags.txt","r")
countPurse = 0
textFile= csv.reader(fileIn)
for bag in textFile:
if bag[ 1 ] == 'purse':
countPurse = countPurse + int(bag[6])
fileIn.close()
print("Number of purses:",countPurse)
5 0
2 years ago
100 POINTS. DO NOT SPAM. OR I WILL REPORT.
Dafna1 [17]

Answer:

Explanation:

In digital image processing, degradation is a process of introducing defects to the image. Understanding the degradation function will allow restoration of the original image.

There are many different causes for image degradation such as motion blur, digital noise and lens off-focus. In cases like motion blur, it is possible to come up with an very good estimate of the actual blurring function and "undo" the blur to restore the original image. For digital noise, a statistical model can be set up to compensate for the degradation it caused.  Similarly  lens focus can be compensate by an optical model if the mis-focus is known.

The above are three degradations that I could find. A lot more information can be found about restoration functions. If you search for image degradation online, you will find a discussion on Quora and an interesting introduction from Rice University. Good luck!

4 0
3 years ago
Read 2 more answers
A ____ attack is much more substantial than a DoS attack because of the use of multiple systems to simultaneously attack a singl
victus00 [196]

Answer: (D) Distributed denial- of- service (DDoS)

Explanation:

The distributed denial of service attack is one of the type of attack that occur when the multiple system are basically flooded with the resources and the bandwidth.

  • Botnet is one of the example of DDoS as it caused the DOS (denial of service) for the users.
  • This type of attack is more substantial as compared to the DoS attack as they use the multiple system for attack the single target simultaneously.

Therefore, Option (D) is correct.

8 0
3 years ago
Every call to a recursive function has its own code and its own set of ____ and local variables
777dan777 [17]

Answer: Parameters

Explanation:

Whenever a call to a recursive function is made, then the function has its own code and its own set of parameters with local variables. These parameters are within the scope of the recursive function. For example while finding the factorial of a number we are given the function with parameter such as int recursive(int n) where int n is a parameter passed into the function.

8 0
2 years ago
Other questions:
  • when you create workplace documents, it is most important to ensure that they are clear, professional, and a. short. b. informal
    7·1 answer
  • If you wish to maintain a consistent style to all the documents you create, it would be helpful to use a _____.
    10·1 answer
  • Every character is represented by a code. The ASCII code for upper letter A is 65 and for lower a is 97. Similarly the numeric c
    9·1 answer
  • Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space a
    10·1 answer
  • For a class project, Jerome builds a simple circuit with a battery and three light bulbs. On his way to school, Jerome drops his
    9·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • Two Technicians are discussing ShopKey Pro. Technician
    14·1 answer
  • Best app in free to learn python
    7·1 answer
  • <br> Help me please I need the correct answe
    10·1 answer
  • Brainliest to right answer.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!