Answer:
Explanation:
The following Java code creates the program which calls asks the user for an input and then passes that input into two methods toInches, and toGallons. Then the main method saves the returned values in variables and prints out a statement for each.
import java.util.Scanner;
class Brainly {
static Scanner in = new Scanner(System.in);
public static void main(String[] args) {
System.out.println("Enter a value: ");
int answer = in.nextInt();
double inches = toInches(answer);
double gallons = toGallons(answer);
System.out.println("There are " + inches + " inches in " + answer + " centimeters");
System.out.println("There are " + gallons + " gallons in " + answer + " liters");
}
public static double toInches(int centimeters) {
return (centimeters / 2.54);
}
public static double toGallons(int liters) {
return (liters / 3.7854);
}
}
BIOS programs are embedded on a chip called
Explanation:
BIOS software is stored on a non-volatile ROM chip on the motherboard.
Which of the following is a goal of summarizing?
Answer:
b
Explanation:
its B mygee
______ 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 is the molar mass of AuCI2
Answer:267.8726
Explanation:
True or false you cannot get a computer virus is you instal antivirus
Answer: F
Explanation: There are many ways hackers can get into your computer, and many ways can bypass an antivirus so it is False
A video game controller contains the buttons: A, B, X, Y. When the player presses A their character Jumps. When the player presses BY their character Crouches. When the player presses X their character Punches. When the player presses Y their character Flies. When the player presses anything else Pause menu shows up Assume your program contains a variable named button that holds a character which indicates the button the player has pressed. Write the switch statement that displays a message explained the user the action that was taken.
Answer:
Explanation:
The following switch statement takes in the variable button as a parameter and outputs a statement saying what the character did due to the button being pushed.
switch (Character.toLowerCase(button.charAt(0))) {
case 'a': System.out.println("Your character has Jumped"); break;
case 'b': System.out.println("Your character has Crouched"); break;
case 'x': System.out.println("Your character has Punched"); break;
case 'y': System.out.println("Your character has Flown"); break;
default: System.out.println("Pause Menu has appeared"); break;
}
Charles wants to work for himself in the Transportation and Logistics career cluster. Which lists the jobs with the best
chance self-employment from highest to lowest?
O Brownfield Redevelopment Specialists – Taxi Drivers - Mechanics - Logisticians
O Taxi Drivers - Brownfield Redevelopment Specialists - Logisticians - Mechanics
O Logisticians - Mechanics - Taxi Drivers - Brownfield Redevelopment Specialists
O Mechanics - Logisticians - Brownfield Redevelopment Specialists – Taxi Drivers
Answer:
i think its b
Explanation:
makes the most sense
Answer:
B: offices
Explanation:
Hope you get 100 on your test
Which of the following is not part of the four ways you can avoid problems with email communication?
a.
Be brief.
b.
Proofread your message.
C.
Reply right away after you get an email.
d.
Seek other ways to relay your message
Answer:
d is the correct answer for this problem
Because filling a pool/pond with water requires much more water than normal usage, your local city charges a special rate of $0.77 per cubic foot of water to fill a pool/pond. In addition, it charges a one-time fee of $100.00 for filling. This water department has requested you, as a programmer, write a C program that allows the user to enter a pool's length, width, and depth, in feet measurement. The program will then calculate the pool's volume, the volume of water needed to fill the pool with the water level 3 inches below the top, and the final cost of filling the pool, including the one-time fee. And then, all the entered sizes of the pool (in feet) and the three calculated values will be displayed on the screen. Finally, your full name as the programmer who wrote the program must be displayed at the end. To find the volume of the pool in cubic feet, use the formula: volume
Answer:
In C:
#include <stdio.h>
int main(){
float length, width, depth,poolvolume,watervolume,charges;
printf("Length (feet) : "); scanf("%f",&length);
printf("Width (feet) : "); scanf("%f",&width);
printf("Depth (feet) : "); scanf("%f",&depth);
poolvolume = length * width* depth;
watervolume = length * width* (12 * depth - 3)/12;
charges = 100 + 0.77 * watervolume;
printf("Invoice");
printf("\nVolume of the pool: %.2f",poolvolume);
printf("\nAmount of the water needed: %.2f",watervolume);
printf("\nCost: $%.2f",charges);
printf("\nLength: %.2f",length);
printf("\nWidth: %.2f",width);
printf("\nDepth: %.2f",depth);
printf("\nMr. Royal [Replace with your name] ");
return 0;}
Explanation:
This declares the pool dimensions, the pool volume, the water volume and the charges as float
float length, width, depth,poolvolume,watervolume,charges;
This gets input for length
printf("Length (feet) : "); scanf("%f",&length);
This gets input for width
printf("Width (feet) : "); scanf("%f",&width);
This gets input for depth
printf("Depth (feet) : "); scanf("%f",&depth);
This calculates the pool volume
poolvolume = length * width* depth;
This calculates the amount of water needed
watervolume = length * width* (12 * depth - 3)/12;
This calculates the charges
charges = 100 + 0.77 * watervolume;
This prints the heading Invoice
printf("Invoice");
This prints the volume of the pool
printf("\nVolume of the pool: %.2f",poolvolume);
This prints the amount of water needed
printf("\nAmount of the water needed: %.2f",watervolume);
This prints the total charges
printf("\nCost: $%.2f",charges);
This prints the inputted length
printf("\nLength: %.2f",length);
This prints the inputted width
printf("\nWidth: %.2f",width);
This prints the inputted depth
printf("\nDepth: %.2f",depth);
This prints the name of the programmer
printf("\nMr. Royal [Replace with your name] ");
return 0;}
See attachment for program in text file
Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of a data file that that contains rainfall data for three months. The file consists of three lines, each with the name of a month, followed by one or more spaces, followed by the rainfall for that month. The program opens the file, reads its contents and then displays a message like:
Answer:
Explanation:
The following Python program reads the file called text.txt and loops through each line, removing whitespace and seperating the month and rainfall. Then it prints each Month with its corresponding rainfall amount. Finally it calculates the average rainfall and outputs that.
file = open('text.txt', 'r')
total_rainfall = 0
for line in file:
line = line.replace('\n', '')
info = line.split(' ')
info = [i for i in info if i != '']
print(info[0] + " will have a total of " + info[1] + " inches of rainfall.")
total_rainfall += int(info[1])
average = total_rainfall / 3
print("Average Rainfall will be " + str(average) + " inches")
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.
Using a tag, set the color to green for all tags.
Answer:
<style>
p {
background-color: rgb(255, 0, 0);
}
h1 {
background-color: rgb(0, 255, 0);
}
ol {
background-color: rgb(97,51,47);
}
</style>
Explanation:
Put this at the top of your code. It should target the paragraph tag, the header h1 tag, and the Ordered List (OL) tag individually and set their background colors respectively.
It's been a while since I've done CSS so you might have to tweak the syntax a bit, but it should look something like that.
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
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)
Choose a problem that lends to an implementation that uses dynamic programming. Clearly state the problem and then provide high-level pseudocode for the algorithm. Explain why this algorithm can benefit from dynamic programming. Try to choose an algorithm different from any already posted by one of your classmates.
Answer:
Explanation:
The maximum weighted independent collection of vertices in a linear chain graph is a straightforward algorithm whereby dynamic programming comes in handy.
Provided a linear chain graph G = (V, E, W), where V is a collection of vertices, E is a set of edges margins, and W is a weight feature function applied to each verex. Our goal is to find an independent collection of vertices in a linear chain graph with the highest total weight of vertices in that set.
We'll use dynamic programming to do this, with L[k] being the full weighted independent collection of vertices spanning from vertex 1 \to vertex k.
If we add vertex k+1 at vertex k+1, we cannot include vertex k, and thus L[k+1] would either be equivalent to L[k] when vertex k+1 is not being used, or L[k+1] = L[k-1] + W[k+1] when vertex k+1 is included.
[tex]Thus, L[k+1] = max \{ L[k], \ L[k-1] + W[k+1] \}[/tex]
As a result, the dynamic programming algorithm technique can be applied in the following way.
ALGO(V, W, n) // V is a linearly ordered series of n vertices with such a weight feature W
[tex]\text{1. L[0] = 0, L[1] = W[1], L[2] = max{W[1], W[2]} //Base cases} \\ \\ \text{2. For i = 3 to n:- \\} \\ \\\text{3........ if ( L[i-1] > L[i-2] + W[ i ] )} \\ \\ \text{4............Then L[ i ] = L[i-1]} \\ \\ \text{5.........else} \\ \\ \text{6................L[i] = L[i-2] + W[i] }\\ \\ \text{7. Return L[n] //our answer.}[/tex]
As a result, using dynamic programming, we can resolve the problem in O(n) only.
This is an example of a time-saving dynamic programming application.
I am the combination of keys used to write data in multiple lines in the same cell
Answer:
Explanation:
The answer is keyboard
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:
1. Microsoft Office is ?
Answer:
What do you mean?
Explanation:
Microsoft office is a good tech company
I just the question what
What career opportunities are available within the floral industry?
Answer: The floral industry has quite an array of possible occupation pathways. You can do flower production, design, publishing, marketing, home design, engineering, retailing, commercial, research, and lots more.
Which describes the third step in visual character development?
nter player 1's jersey number: 84
Enter player 1's rating: 7
Enter player 2's jersey number: 23
Enter player 2's rating: 4
Enter player 3's jersey number: 4
Enter player 3's rating: 5
Enter player 4's jersey number: 30
Enter player 4's rating: 2
Enter player 5's jersey number: 66
Enter player 5's rating: 9
ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
Implement a menu of options for a user to modify the roster. Each option is represented by a single character. Following the initial 5 players' input and roster output, the program outputs the menu. The program should also output the menu again after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing.
Ex:
MENU
a - Add player
d - Remove player
u - Update player rating
r - Output players above a rating
o - Output roster
q - Quit
Answer:
Explanation:
The following Java code implements the menu of options as requested. Only the quit option works as requested, the rest of the options do nothing. This menu continuous to reappear until the quit option is chosen, and only begins after the initial first five players are placed in the roster.
import java.util.Scanner;
import java.util.Vector;
class Brainly {
static Scanner in = new Scanner(System.in);
static Vector<Integer> jerseyNumber = new Vector<>();
static Vector<Integer> ratings = new Vector<>();
public static void main(String[] args) {
for (int x = 0; x < 5; x++) {
System.out.println("Enter player " + (x+1) + "'s jersey number:");
jerseyNumber.add(in.nextInt());
System.out.println("Enter player " + (x+1) + "'s rating:");
ratings.add(in.nextInt());
}
boolean reloop = true;
while (reloop == true) {
System.out.println("Menu");
System.out.println("a - Add player");
System.out.println("d - Remove player");
System.out.println("u - Update player rating");
System.out.println("r - Output players above a rating");
System.out.println("o - Output roster");
System.out.println("q - Quit");
char answer = in.next().charAt(0);
switch (answer) {
case 'a':
case 'r':
case 'd':
case 'u':
case 'o':
case 'q': System.exit(0);
reloop = false;
break;
}
}
}
}
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
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:
Creating and modifying sets.
The top 3 most popular male names of 2017 are Oliver, Declan, and Henry according to babynames. Write a program that modifies the male_names set by removing a name and adding a different name.
Sample output with inputs: 'Oliver' 'Atlas'
{ 'Atlas', 'Declan', 'Henry' }
NOTE: Because sets are unordered, the order in which the names in male_names appear may differ from above.
1 male_names = { 'oliver', 'Declan', 'Henry' }
2 name_to_remove = input()
3 name_to_add = input()
4 male_names = { 'oliver', 'Declan', 'Henry' }
5
6 #The statement to remove 'oliver' from the set.
7
8 male_names.remove('oliver')
9
10 #Add the name 'Atlas' in the set ,ale_names.
11
12 male_names.add('Atlas')
13
14 print(male_names)
Testing with inputs: 'Oliver''Atlas'
Your output { 'Atlas', 'Declan', 'Henry' }
Testing with inputs: 'Declan' 'Noah'
Output differs. See highlights below.
Your output { 'Atlas', 'Declan', 'Henry' }
Expected output { 'Henry', 'Noah', 'Oliver' }
Answer:
Explanation:
The following Python code asks the user for inputs for the name to remove and add in the set. It then tries to remove the given name from the list. If it fails it prints out to the user saying that the name does not exist. If it does exist then it removes the name and adds the new name. Finally it prints out the current list of names.
male_names = {'oliver', 'Declan', 'Henry'}
name_to_remove = input("Enter name to remove: ")
name_to_add = input("Enter name to add: ")
try:
male_names.remove(name_to_remove)
male_names.add(name_to_add)
except:
print("Name that you are trying to remove does not exist")
print("List of Names: ")
print(male_names)
In this exercise we have to use the knowledge of the python language to write the code, so we have to:
The code is in the attached photo.
So to make it easier the code can be found at:
male_names = {'oliver', 'Declan', 'Henry'}
name_to_remove = input("Enter name to remove: ")
name_to_add = input("Enter name to add: ")
try:
male_names.remove(name_to_remove)
male_names.add(name_to_add)
except:
print("Name that you are trying to remove does not exist")
print("List of Names: ")
print(male_names)
See more about python at brainly.com/question/26104476
Define a function below, filter_only_strs, which takes a single argument of type list. Complete the function so that it returns a list that contains only the strings from the original list and no other data. It is acceptable to return an empty list if there are no strings in the original list.
def filter_only_strs(1st):
for x in lst:
if isinstance(x,str)==False:
lst.remove(x)
return ist Restore original file
Answer:
Explanation:
The code provided aside from some minor errors (fixed version down below) is correct, but it will never be able to accomplish what is being asked in the question. This is because this code is simply copying and returning the exact same list that is passed as an argument, because it is looping through it and comparing its own elements. In order to accomplish what is asked in the question, two lists need to be passed as parameters. The first would be the original list, and the second would be a list of test elements that will be used to compare and see if they exist in the original list. This would allow us to create a new list with only the elements that existed in the original list.
def filter_only_strs(lst):
for x in lst:
if not isinstance(x, str):
lst.remove(x)
return lst
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))
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 one is the result of the output given by a computer?
Which of the following does PXE use?
a) USB
b) DVD-ROM
c) CD-ROM
d) NIC
Answer:
The answer is d) NIC.
Explanation:
PXE Stands for Preboot Execution Environment and a PXE uses an NIC also know as Network Interface Controller. For an example: If you have a DELL Inspiron 8500 and you couldn't get it to work you would need to go through all boot-up system including a Preboot Execution Environment in the booting code protocols it would say connecting to NIC after 6 seconds it would say NIC connected then it would search for a boot device after a few munities since the DELL Inspiron 8500 is obsolete you would get this message:
No Boot Device found
A DNS TTL determines what?
Answer:
its time lapse and nod of serviaciation in between A and B. Each device connected will minus 1