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
diamong [38]
3 years ago
8

#Imagine you're writing a program to check if a person is

Computers and Technology
1 answer:
irakobra [83]3 years ago
5 0

Answer:

i hope the program below will help you!

Explanation:

You might be interested in
Which of the following manages allocation of computer resources during program execution?
Brums [2.3K]
A)memory management
8 0
3 years ago
How do you ask brainy a question without it not liking the question and saying it hurts their feelings?
murzikaleks [220]
IM SORRY but i dont now your question

7 0
3 years ago
Placeholders for fields such as "Last Name" and "Address" would be inserted into which
MrMuchimi

Answer:

Explanation:

The last name goes inside the main body of the mail specifically at the "closing block".

While the Address is inserted into the Subject Line specifically to the "To block"

7 0
3 years ago
Which of the following correctly describes rules for setting up a Web file structure?
kramer

Forward slashes (/) are used for web address and backslashes (\) are used for file paths is the following correctly describes rules for setting up a Web file structure.

<u>Explanation:</u>

For a way to a nearby document on a Windows machine, utilize the backslash. For a way to a web asset or record situated on a UNIX based machine (incorporates Macs, Linux), use a slash.

The explanation .NET's URI utilizes forward slashes is on the grounds that it's arranging for use in an internet browser. at the point when a slash is utilized in a formal or casual book, it is intended to show the word or. The models show the importance of the forward-slash.

4 0
3 years ago
Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is a String contai
Stella [2.4K]

Corrected (Modified) Question:

i. Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is a String containing the last character of the value of name. So if the value of name were "Smith" the expression's value would be "h".

ii. Given a String variable named sentence that has been initialized, write an expression whose value is the number of characters in the String referred to by sentence.

Explanation of the corrected question

The whole question has been numbered (i) and (ii) just to separate or divide it into clearer sub questions.

Some parts of the question has also been removed since they are repetition of a part of the question.

Answer:

(i) name.charAt(name.length() - 1)

(ii) sentence.length()

Explanation:

No language  has been specified in the question for the code to be written in. However, I have chosen to write it in Java.

(i) In Java, to get a particular character in a string <em>str</em>, the function, charAt(x) is used, where x in the function represents the index of the character to be fetched. This is written as str.charAt(x).

In our case, x is the index of the last character in our string. To get the index of the last character in a string say <em>str</em>, the length of the string itself is used. However, indexing starts at zero. Therefore, to get the index, it will be the 1 subtracted from the length of the string as follows:

str.length() - 1

But note that, to get the length of a string, the method length() is used. For example if,

String str = "omobowale";

str.length() will return 9

Now to the question at hand, our string variable name is <em>name. </em>

Therefore to get its last character, we write:

<em>name.charAt(name.length() - 1)</em>

So if;

name = "Smith";

name.charAt(name.length() - 1) will return "h"

(ii) As explained in (i) above, to get the length (number of characters) of the variable string <em>sentence, </em>we simply write;

<em>sentence.length()</em>

<em>PS: The length of  a string is the number of characters present in the string.</em>

Hope this helps!

3 0
3 years ago
Other questions:
  • Can I get some help thank you
    8·2 answers
  • Suppose for the worst case, given input size n: Algorithm 1 performs f(n) = n2 + n/2 steps Algorithm 2 performs f(n) = 12n + 500
    6·1 answer
  • Consider the following process for generating binaries. A compiler is used to generate the object code for individual modules, a
    8·1 answer
  • Write a method that determines the total number of chars in each string of an array.
    12·1 answer
  • You are a network consultant who has been asked to attend an initial meeting with the executive management team of ElectroMyCycl
    10·1 answer
  • Primitives of transport service assume asymmetry between the two end points during connection establishment, one end (server) ex
    8·1 answer
  • What's a False statement about online time? A. Blue light from devices can make it hard to sleep. B. It's a good way to connect
    5·1 answer
  • Differentiate agricultural waste from hazardous waste.​
    9·1 answer
  • Given the 32-bit binary number:
    13·1 answer
  • python. create a program that asks the user to input their first name and their favorite number. Then the program should output
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!