Explanation:
A routine or subroutine, also referred to as a function procedure and sub program is code called and executed anywhere in a program. FOr example a routine may be used to save a file or display the time.
let m be a positive integer with n bit binary representation an-1 an-2 ... a1a0 with an-1=1 what are the smallest and largest values that m could have
Answer:
Explanation:
From the given information:
[tex]a_{n-1} , a_{n-2}...a_o[/tex] in binary is:
[tex]a_{n-1}\times 2^{n-1} + a_{n-2}}\times 2^{n-2}+ ...+a_o[/tex]
So, the largest number posses all [tex]a_{n-1} , a_{n-2}...a_o[/tex] nonzero, however, the smallest number has [tex]a_{n-2} , a_{n-3}...a_o[/tex] all zero.
∴
The largest = 11111. . .1 in n times and the smallest = 1000. . .0 in n -1 times
i.e.
[tex](11111111...1)_2 = ( 1 \times 2^{n-1} + 1\times 2^{n-2} + ... + 1 )_{10}[/tex]
[tex]= \dfrac{1(2^n-1)}{2-1}[/tex]
[tex]\mathbf{=2^n -1}[/tex]
[tex](1000...0)_2 = (1 \times 2^{n-1} + 0 \times 2^{n-2} + 0 \times 2^{n-3} + ... + 0)_{10}[/tex]
[tex]\mathbf {= 2 ^{n-1}}[/tex]
Hence, the smallest value is [tex]\mathbf{2^{n-1}}[/tex] and the largest value is [tex]\mathbf{2^{n}-1}[/tex]
Implement the method countInitial which accepts as parameters an ArrayList of Strings and a letter, stored in a String. (Precondition: the String letter has only one character. You do not need to check for this.) The method should return the number of Strings in the input ArrayList that start with the given letter. Your implementation should ignore the case of the Strings in the ArrayList. Hint - the algorithm to implement this method is just a modified version of the linear search algorithm. Use the runner class to test your method but do not add a main method to your U7_L4_Activity_One.java file or your code will not be scored correctly.
Answer:
Answered below
Explanation:
//Program is implemented in Java
public int countInitials(ArrayList<string> words, char letter){
int count = 0;
int i;
for(i = 0; i < words.length; i++){
if ( words[i][0]) == letter){
count++
}
}
return count;
}
//Test class
Class Test{
public static void main (String args[]){
ArrayList<string> words = new ArrayList<string>()
words.add("boy");
words.add("bell");
words.add("cat");
char letter = 'y';
int numWords = countInitials ( words, letter);
System.out.print(numWords);
}
}
5. All sites are required to have the following reference materials available for use at VITA/TCE sites in paper or electronic format: Publication 17, Publication 4012, Volunteer Tax Alerts (VTA), and Quality Site Requirement Alerts (QSRA). AARP Foundation Tax Aide uses CyberTax Alerts in lieu of VTAs and QSRAs. What other publication must be available at each site and contains information about the new security requirements at sites
Answer:
Publication 5140.
Explanation:
The acronym VITA stands for Volunteer Income Tax Assistance and TCE stands for Tax Counseling for the Elderly. VITA/TCE is a certification gotten from the Internal Revenue Service in which the holders of such certification are trained on how to help people that have disabilities or that their incomes earners that are low. These volunteers help these set of people to prepare for their tax return.
In order to make the volunteers to be able to perform their work with high accuracy, the Department of Treasury, Internal Revenue Service gave out some aids for Quality Site. One of the aids which is the one contains information about the new security requirements at sites is given in the Publication 5140.
Approximately how many numeric IP addresses are possible with IPv4?
4 billon
Answer:
4,294,967,296 (~4.3B)
Explanation:
IPv4 uses 32-bits for representing addresses, thus you can have 2^32 total combinations.
Sophisticated modeling software is helping international researchers
Answer:
A. increase the pace of research in finding and producing vaccines.
Explanation:
These are the options for the question;
A. increase the pace of research in finding and producing vaccines.
B. analyze computer systems to gather potential legal evidence.
C. market new types of products to a wider audience.
D. create more intricate screenplays and movie scripts.
Modeling software can be regarded as computer program developed in order to build simulations as well as other models. modelling software is device by international researchers to make research about different vaccines and other drugs and stimulants to combat different diseases. It helps the researcher to devoid of details that are not necessary and to deal with any complexity so that solution can be developed. It should be noted that Sophisticated modeling software is helping international researchers to increase the pace of research in finding and producing vaccines.
Given that the variable named Boy = "Joey" and the variable named Age = 6, create statements that will output the following message:
Congratulations, Joey! Today you are 6 years old.
First, write one statement that will use a variable named Message to store the message. (You will need to concatenate all of the strings and variables together into the one variable named Message. If you don't know what that means, read the section in Chapter 1 about concatenation.)
Then write a second statement that will simply output the Message variable.
Answer:
isn't it already showing it if not put text box
Explanation:
You are considering upgrading memory on a laptop. What are three attributes of currently installed memory that HWiNFO can give to help you with this decision?
Answer:
Some of the qualities of the installed memory which HWiNFO can reveal are:
Date of manufactureMemory type Speed of memoryExplanation:
HWiNFO is an open-source systems information app/tool which Windows users can utilize as they best wish. It helps to detect information about the make-up of computers especially hardware.
If you used HWiNFO to diagnose the memory, the following information will be called up:
the total size of the memory and its current performance settingsthe size of each module, its manufacturer, and model Date of manufactureMemory type Speed of memorysupported burst lengths and module timings, write recovery time etc.Cheers
During TCP/IP communications between two network hosts, information is encapsulated on the sending host and decapsulated on the receiving host using the OSI model. Match the information format with the appropriate layer of the OSI model.
a. Packets
b. Segments
c. Bits
d. Frames
1. Session Layer
2. Transport Layer
3. Network Layer
4. Data Link Layer
5. Physical Layer
Answer:
a. Packets - Network layer
b. Segments - Transport layer
c. Bits - Physical layer
d. Frames - Data link layer
Explanation:
When TCP/IP protocols are used for communication between two network hosts, there is a process of coding and decoding also called encapsulation and decapsulation.
This ensures the information is not accessible by other parties except the two hosts involved.
Operating Systems Interconnected model (OSI) is used to standardise communication in a computing system.
There are 7 layers used in the OSI model:
1. Session Layer
2. Transport Layer
3. Network Layer
4. Data Link Layer
5. Physical Layer
6. Presentation layer
7. Application layer
The information formats given are matched as
a. Packets - Network layer
b. Segments - Transport layer
c. Bits - Physical layer
d. Frames - Data link layer
Help need right now pls
Read the following Python code:
yards - 26
hexadecimalYards = hex (yards)
print (hexadecimalYards)
Which of the following is the correct output? (5 points)
A. 0b1a
B. 0d1a
C. 0h1a
D. 0x1a
Answer:
d. 0x1a
Explanation: