Suppose a program is supposed to reverse an array. For example, if we have the array arr = {1, 2, 3, 4, 5}, after reversing the array we would have arr = {5, 4, 3, 2, 1}.
Most of the code for the program is shown here:
Const int SIZE = 5;
int arr[SIZE] = {1, 2, 3, 4, 5};
int firstindex =0, lastindex = SIZE-1, temp;
1 _______________________________
{
temp = arr[firstindex];
arr[firstindex] = arr[lastindex];
arr[lastindex] = temp;
firstindex++;
lastindex--;
}
All of the following options below could be correctly inserted at line 1 in the code shown above EXCEPT:
a. while(firstindex < lastindex)
b. while(firstindex <= lastindex)
c. for(int i=0; i<(SIZE/2-1); i++)
d. for(int i=0; i<(SIZE/2); i++)
Answer:
The answer is "Choice C".
Explanation:
In this question, the choice C is correct because all the other options will the output "5 4 3 2 1" and it will given "5 2 3 4 1" as output which is defined in the attached file. please find it.
BIOS programs are embedded on a chip called
Explanation:
BIOS software is stored on a non-volatile ROM chip on the motherboard.
When the function below is called with 1 dependent and $400 as grossPay, what value is returned?
double computeWithholding (int dependents, double grossPay)
{
double withheldAmount;
if (dependents > 2)
withheldAmount = 0.15;
else if (dependents == 2)
withheldAmount = 0.18;
else if (dependnets == 1)
withheldAmount = 0.2;
else // no dependents
withheldAmount = 0.28;
withheldAmount = grossPay * withheldAmount;
return (withheldAmount);
}
a. 60.0
b. 80.0
c. 720.0
d. None of these
Answer:
b. 80.0
Explanation:
Given
[tex]dependent = 1[/tex]
[tex]grossPay = \$400[/tex]
Required
Determine the returned value
The following condition is true for: dependent = 1
else if (dependnets == 1)
withheldAmount = 0.2;
The returned value is calculated as:
[tex]withheldAmount = grossPay * withheldAmount;[/tex]
This gives:
[tex]withheldAmount = 400 * 0.2[/tex]
[tex]withheldAmount = 80.0[/tex]
Hence, the returned value is 80.0
______ lets people access their stored data from a device that can access the Internet.
______ are programs that help people work and play online.
Answer:
Cloud computing and applications
Explanation:
Answer: Cloud computing
Applications
Explanation:
what was original name
whoever answers first gets brainly crown
Answer:
BackRub
Explanation:
what is the full from of CPU?
Answer:
CPU is known as Central Processing Unit.
What is the molar mass of AuCI2
Answer:267.8726
Explanation:
What transport layer protocol does DNS normally use?
Explanation:
DNS uses the User Datagram Protocol (UDP) on port 53 to serve DNS queries. UDP is preferred because it is fast and has low overhead. A DNS query is a single UDP request from the DNS client followed by a single UDP reply from the server.
The transport layer protocol that DNS normally use is the User Datagram Protocol (UDP).
What is transport layer protocol?The Internet Protocol (IP) is a network layer protocol, and the Transmission Control Protocol (TCP) is a transport layer protocol.
A network communication between applications is established and maintained according to the Transmission Control Protocol (TCP) standard. The Internet Protocol (IP), which specifies how computers send data packets to one another, works with TCP.
User Datagram Protocol (UDP) on port 53 is how DNS serves DNS requests. Due to its speed and low overhead, UDP is recommended. A single UDP request from the DNS client and a single UDP response from the server makes up a DNS query.
Therefore, the transport layer protocol used by DNS is User Datagram Protocol (UDP).
To learn more about transport layer protocol, refer to the link:
https://brainly.com/question/4727073
#SPJ12
The bag class in Chapter 5 has a new grab member function that returns a randomly selected item from a bag (using a pseudorandom number generator). Suppose that you create a bag, insert the numbers 1, 2, and 3, and then use the grab function to select an item. Which of these situations is most likely to occur if you run your program 300 times (from the beginning): A. Each of the three numbers will be selected about 100 times. B. One of the numbers will be selected about 200 times; another number will be selected about 66 times; the remaining number will be selected the rest of the time. C. One of the numbers will be selected 300 times; the other two won't be selected at all.
In order to make burger a chef needs at least the following ingredients: • 1 piece of chicken meat • 3 lettuce leaves • 6 tomato slices Write down a formula to figure out how many burgers can be made. Get values of chicken meat, lettuce leaves and tomato slices from user. Hint: use Python’s built-in function
Answer:
how many burgers would you have to make ?
Explanation:
this is a question ot an answer
Which describes the third step in visual character development?
1. Microsoft Office is ?
Answer:
What do you mean?
Explanation:
Microsoft office is a good tech company
I just the question what
how can a computer be used by a manager of a shopping mall
Answer:
- used to look at security cameras
- used to buy supplies for the mall (maintenance)
- billing
Answer:
With growing square footage of shopping malls, however, comes the challenge of managing these super structures. Shopping mall managers need to take care of all tenant and building services, including physical security hardware of both the individual tenants’ spaces, the general facility and common areas.
What are some of the security and access control challenges unique to shopping centers and malls?
Multiple tenants across multiple buildings. Access for tenants with their own set of employees needs to be managed efficiently.
Tenant turnover. When a tenant terminates his lease, his ability to access the space should be completely revoked. Mall management must be able to do this in a timely manner for the security of the shared property and for the safety of the next tenant.
Expansion, reduction and relocation of tenants within facilities. While this does not entail revocation of access, mall management must be able to provide smooth transition, in terms of access control to the new space, and denial of access to the previously-occupied space where a new tenant will be moving in.
Security for Shared Entrances and Spaces. Managing access privileges for shared facilities like that in a mall can be challenging. For instance, if a tenant in a mall hires or fires an employee, mall management needs to be informed so they can update access privileges to common entrances and shared spaces. This also applies for maintenance workers, cleaning crews and the like. An efficient access control system allows mall management to control access privileges with ease.
Explanation:
The function leap n, which takes an integer n as input, and returns True if the year n is a leap year, and False otherwise. NOTE: Please provide function declaration [2 marks]. Leap years are those that are evenly divisible by 4, except any year that is also evenly divisible by 100 unless that year is also evenly divisible by 400. So, for example, 1996, 2012, and 2020 are all leap years, but 2100, 2200, and 2300 are not leap years, because although they are all evenly divisible by 4, they are also evenly divisible by 100. However, 1600, 2000, and 2400 are leap years, because although they are divisible by 100, they are also divisible by 400. The Haskell interaction may look like: > leap 1996 True > leap 2000 True > leap 2100 False
Answer:
Explanation:
The following code snippet is a leap year checker written in Haskell which checks to see if the year is a leap year and then outputs a boolean value.
isDivisibleBy :: Integral n => n -> n -> Bool
isDivisibleBy x n = x `rem` n == 0
leap_n :: Integer -> Bool
leap_n year
| divBy 400 = True
| divBy 100 = False
| divBy 4 = True
| otherwise = False
where
divBy n = year `isDivisibleBy` n
Which Save As element allows a user to save a presentation on a computer?
Add a Place
OneDrive
Recent
This PC
Answer:
Option D, This PC allows a user to save a presentation on a computer
Explanation:
If one choses the option C, the file will be saved in the folder in which the user is working. Hence, option C is incorrect.
Like wise option A is also incorrect as it will require user to provide a location as option for saving the file
Option B is also incorrect as it will allow the user to save files in the C drive/D drive or one drive
Option D is correct because if the user choses this option file will be saved on the computer.
Hence option D is correct
Answer:
Option D : This PC allows a user to save a presentation on a computer
Explanation:
Edg 2021
Ralph and his team need to work together on a project. If they need a device that will provide shared storage with access to all team members, which of these devices would work best? *
USB Flash Drive
2 TB HDD installed on one of their computers
BD-RW installed on one of their computers
Network attached storage appliance
StreamPal is an audio-streaming application for mobile devices that allows users to listen to streaming music and connect with other users who have similar taste in music. After downloading the application, each user creates a username, personal profile, and contact list of friends who also use the application.
The application uses the device’s GPS unit to track a user’s location. Each time a user listens to a song, the user can give it a rating from 0 to 5 stars. The user can access the following features for each song that the user has rated.
A list of users on the contact list who have given the song the same rating, with links to those users’ profiles
A map showing all other users in the area who have given the song the same rating, with links to those users’ profiles
A basic StreamPal account is free, but it displays advertisements that are based on data collected by the application. For example, if a user listens to a particular artist, the application may display an advertisement for concert tickets the next time the artist comes to the user’s city. Users have the ability to pay a monthly fee for a premium account, which removes advertisements from the application.
Which of the following statements is most likely true about the differences between the basic version and the premium version of StreamPal?
Group of answer choices
a. Users of the basic version of StreamPal use less data storage space on their devices than do users of the premium version of StreamPal.
b. Users of the basic version of StreamPal are more likely to give songs higher ratings than are users of the premium version of StreamPal.
c. Users of the basic version of StreamPal indirectly support StreamPal by allowing themselves to receive advertisements.
d. Users of the basic version of StreamPal spend more on monthly fees than do users of the premium version of StreamPal.
Answer:
Users of the application may have the ability to determine information about the locations of users that are not on their contact list.
Which statement best describes network security?
Network security means all information is open to the public, the network is not compromised, and everyone has access to the network.
Network security means personal information is kept safe, the network is not compromised, and only authorized users have access.
Network security means everyone has access to the network, the network is not compromised, and no one has authorization to use it.
Network security means everyone has access to the information, the network is not compromised, and only a handful of people are authorized users.
Answer:
B). Network security means personal information is kept safe, the network is not compromised, and only authorized users have access.
Explanation:
I just did the Assignment on EDGE2022 and it's 200% correct!
Also, heart and rate if you found this answer helpful!! :) (P.S It makes me feel good to know I helped someone today!!)
Write a program which simulates the result of a person choosing 3 objects in a random order out of a box containing 3 objects in total. The box contains the following 3 objects: apple, ball, cat. A single selection pass of your program describes the random selection of 3 objects out of the box, without replacement. This means that a particular object can only be selected from the box once. At the beginning of a pass, the box is full, so it contains all 3 objects. After an object is selected from the box, your program will print the name of the object and then choose another object without replacing the previous object. The selection process repeats 3 times until the box is empty
Answer:
Explanation:
The following code is written in Python, it loops through a list (box) of the objects and randomly choosing one of the objects. Prints that object out and removes it from the list. Then repeats the process until the box is empty.
import random
box = ['apple', 'ball', 'cat']
print(box)
for x in range(len(box)):
pick = random.randint(0,len(box)-1)
print("Pick " + str(x+1) + ": " + box[pick])
box.remove(box[pick])
print(box)
Write a program that simulates a fishing game. In this game, a six-sided die is rolled to determine what the user has caught. Each possible item is worth a certain number of fishing points. The points will remain hidden until the user is finished fishing, and then a message is displayed congratulating the user depending on the number of fishing points gained.
Answer:
Answered below
Explanation:
//Python code
numberOfCasts = 3
j = 0
fishingPoints = 0
sum = 0
while j < numberOfCasts:
dieNum = randint(1 , 6)
if dieNum ==1:
fishingPoints = 2
elif dieNum == 2:
fishingPoints = 4
elif dieNum == 3:
fishingPoints = 6
elif dieNum == 4:
fishingPoints = 8
elif dieNum == 5:
fishingPoints = 10
elif dieNum ==6:
fishingPoints = 12
sum += fishingPoints
j++
if sum > 30:
print ("Great catch")
elif sum > 10 and sum <= 30:
print("Good catch")
else:
print ("Bad day")
Consider the following method:
public static String joinTogether(int num, String[] arr)
{
String result = "";
for (String x : arr)
{
result = result + x.substring(0, num);
}
return result;
}
The following code appears in another method in the same class:
String[] words = {"dragon", "chicken", "gorilla"};
int number = 4;
System.out.println(joinTogether(number, words));
What is printed when the code above is executed?
a. dragonchickengorilla
b. drachigor
c. dragchicgori
d. dragochickgoril
e. There is an error in the program, it does not run
Answer: b.
Explanation:
How SPARQL 1.1 has advantage over SPARQL 1.0??
Create a public class called Catcher that defines a single class method named catcher. catcher takes, as a single parameter, a Faulter that has a fault method. You should call that fault method. If it generates no exception, you should return 0. If it generates a null pointer exception, you should return 1. If it throws an illegal argument exception, you should return 2. If it creates an illegal state exception, you should return 3. If it generates an array index out of bounds exception, you should return 4.
Answer:
Sorry mate I tried but I got it wrong
Explanation:
Sorry again
Create a class called Dot for storing information about a colored dot that appears on a flat grid. The class Dot will need to store information about its position (an x-coordinate and a y-coordinate, which should both be integers) and its color (which should be a string for now). You can choose what to call your attributes, but be sure to document them properly in the class's docstring.
Don't forget that every function definition, including method definitions, must have a docstring with a purpose statement and signature.
Answer:
Explanation:
The following class is written in Python, it has the three instance variables that were requested. It also contains a constructor that takes in those variables as arguments. Then it has functions to update the positions of the Dot and change its color. The class also has functions to output current position and color.
class Dot:
"""Class Dot"""
x_coordinate = 0
y_coordinate = 0
color = ""
def __init__(self, x_coordinate, y_coordinate, color):
"""Constructor that takes x and y coordinates as integers and a string for color. It ouputs nothing but saves these argument values into the corresponding instance variables."""
self.x_coordinate = x_coordinate
self.y_coordinate = y_coordinate
self.color = color
def moveUp(self, number_of_spaces):
"""Moves the Dot up a specific number of spaces that is passed as a parameter. Updates y_position"""
self.y_coordinate += number_of_spaces
return ""
def moveDown(self, number_of_spaces):
"""Moves the Dot down a specific number of spaces that is passed as a parameter. Updates y_position"""
self.y_coordinate -= number_of_spaces
return ""
def moveLeft(self, number_of_spaces):
"""Moves the Dot left a specific number of spaces that is passed as a parameter. Updates x_position"""
self.x_coordinate -= number_of_spaces
return ""
def moveRight(self, number_of_spaces):
"""Moves the Dot right a specific number of spaces that is passed as a parameter. Updates x_position"""
self.x_coordinate += number_of_spaces
return ""
def dot_position(self):
"""Print Dot Position"""
print("Dot is in position: " + str(self.x_coordinate) + ", " + str(self.y_coordinate))
return ""
def dot_color(self):
"""Print Current Dot Color"""
print("Dot color is: " + self.color)
A large computer repair company with several branches around Texas, TexTech Inc. (TTi), is looking to expand their business into retail. TTi plans to buy parts, assemble and sell computer equipment that includes desktops, monitors/displays, laptops, mobile phones and tablets. It also plans to sell maintenance plans for the equipment it sells that includes 90-day money back guarantee, 12-month cost-free repairs for any manufacturing defects, and annual subscription for repairs afterwards at $100 dollars per year. As part of a sales & marketing campaign to generate interest, TTi is looking to sell equipment in 5 different packages: 1. Desktop computer, monitor and printer 2. Laptop and printer 3. Phone and tablet 4. Laptop and Phone 5. Desktop computer, monitor and tablet TTi plans to sell these packages to consumers and to small-and-medium businesses (SMB). It also plans to offer 3-year lease terms to SMB customers wherein they can return all equipment to the company at the end of 3 years at no cost as long as they agree to enter into a new 3-year lease agreement. TTi has rented a warehouse to hold its inventory and entered into contracts with several manufacturers in China and Taiwan to obtain high-quality parts at a reasonable price. It has also hired 5 sales people and doubled its repair workforce to meet the anticipated increase in business. TTi has realized that it can no longer use Excel spreadsheets to meet their data and information needs. It is looking to use open source and has decided to develop an application using Python and MySQL. Your team has been brought in to design a database that can meet all of its data needs. Create a report that contains the following:
Required:
a. Data requirements of TTi: What are the critical data requirements based on your understanding of TTI business scenario described above.
b. Key Entities and their relationships
c. A conceptual data model in MySQL
Answer:
hecks
Explanation:
nah
https://acm.cs.nthu.edu.tw/problem/13144/
The website is the problem, and I need to implement the 13144.h(which is function.h in the 13144.cpp) to get the right answer.
Thanks for your help.
Answer:
Th.. uh... yea... uh.. I don’t know
Explanation:
9.19 LAB: Words in a range (lists) Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds of a search range. The file should be read using the file.readlines() method. The input file contains a list of alphabetical, ten-letter strings, each on a separate line. Your program should output all strings from the list that are within that range (inclusive of the bounds). Ex: If the input is:
Answer:
9.2. Métodos del Objeto File (Python para principiantes)
Explanation:
Write the simulate method, which simulates the frog attempting to hop in a straight line to a goal from the frog's starting position of 0 within a maximum number of hops. The method returns true if the frog successfully reached the goal within the maximum number of hops; otherwise, the method returns false. TheFrogSimulationclass provides a method calledhopDistancethat returns an integer representing the distance (positive or negative) to be moved when the frog hops. A positive distance represents a move toward the goal. A negative distance represents a move away from the goal. The returned distance may vary from call to call. Each time the frog hops, its position is adjusted by the value returned by a call to thehopDistance method. g
Answer:
Explanation:
The following code is written in Python. It creates the simulate method which takes in an argument for the max number of hops and the goal distance. Then it loops the number for the max number of hops and asks the user for a hop input using the hopDistance() method (which was not included so it was made, this can be removed if wanted). Then it updates position. If after the max hops goal was reached it returns True, otherwise it returns False.
def simulate(max, goal):
position = 0
print("Goal is " + str(goal))
for x in range(max):
hop = hopDistance()
position += int(hop)
if position >= goal:
return True
else:
return False
def hopDistance():
return input("Frog Hop Distance this hop: ")
print(simulate(4, 20))
3. Discuss microprocessor components, chips,
and specialty processors.
5. Define expansion slots, cards,including
graphics cards, network interface cards, wireless
network cards, and SD cards.
Answer:
3
Microprocessor Components
Control Unit.
I/O Units.
Arithmetic Logic Unit (ALU)
Registers.
Cache.
The chips capacities express the word size, 16 bits, 32 bits, and 64 bits. The number of bits determined the amount of data it can process at one time
The specialty processors are specifically designed to handle special coprocessor and Graphics Processing Unit (GPU), like displaying 3D images or encrypting data.
5
slot machine, known variously as a fruit machine, puggy, the slots, poker machine/pokies, fruities or slots, is a gambling machine that creates a game of chance for its customers.
A video card (also called a graphics card, display card, graphics adapter, or display adapter) is an expansion card which generates a feed of output images to a display device (such as a computer monitor).
network interface controller is a computer hardware component that connects a computer to a computer network. Early network interface controllers were commonly implemented on expansion cards that plugged into a computer bus.
wireless network interface controller is a network interface controller which connects to a wireless network, such as Wi-Fi or Bluetooth, rather than a wired network, such as a Token Ring or Ethernet.
The standard SD card has dimensions of 32 mm by 24 mm by 2.1 mm, a storage capacity of up to 4 GB. Typical levels of performance are not as high as the other types of SD memory card mentioned below.
good luck!!!
what is java programing
Answer:
Explanation:
Java is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. ... Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture
Answer:
The Java programming language was developed by Sun Microsystems in the early 1990s. Although it is primarily used for Internet-based applications, Java is a simple, efficient, general-purpose language. Java was originally designed for embedded network applications running on multiple platforms.
Explanation: