Answer:
In Python:
gals= float(input("Enter the gallons used (-1 to end): "))
miles = float(input("Enter the miles driven: "))
mileage = 0.0
count = 0
while not (gals == -1):
count += 1
mileage +=(miles/gals)
print("The miles/gallon for this tank was "+str(round(miles/gals,6)))
gals= float(input("Enter the gallons used (-1 to end): "))
miles = float(input("Enter the miles driven: "))
print("The overall average miles/gallon was "+str(round(mileage/count,6)))
Explanation:
#This prompts the user for the number of gallons used
gals= float(input("Enter the gallons used (-1 to end): "))
#This prompts the user for miles driven
miles = float(input("Miles driven: "))
#This initializes the mileage to 0
mileage = 0.0
#This initializes the count of vehicles to 0
count = 0
#The following is repeated until input for gallons is -1
while not (gals == -1):
#The count of vehicles is increased by 1
count += 1
#The total mileage for all cars is calculated
mileage +=(miles/gals)
#This prints the mileage for that particular vehicle
print("The miles/gallon for this tank was "+str(round(miles/gals,6)))
#This prompts the user for the number of gallons used
gals= float(input("Enter the gallons used (-1 to end): "))
#This prompts the user for miles driven
miles = float(input("Miles driven: "))
#This calculates and prints the overall average mileage
print("The overall average miles/gallon was "+str(round(mileage/count,6)))
Plz help meeee
Erin would like to add a photo to a presentation. However, she only
has the printed copy of the photo. She does not have a digital copy.
What should Erin do?
Answer:
You didn't add any options, so I'll assume this is an open question.
Erin should scan the photo to a digital format using a digital scanner.
Which statement about creating a client request in quickbooks online accountant is false
Answer:
You can add attachments by selecting the + Add document link
The request is not sent to the client's email address unless the default setting is changed.
The request appears in the client's QuickBooks Online company in My Accountant
If you wish to notify your client of your request with a QuickBooks Online-generated email, select Notify client
Explanation:
The highlighted one is correct. Its QBO question.
What emotion or feeling did the photographer create with this photo? How does the photograph do this?
Which version of Microsoft Office is free?
Answer:
the older versions and really all of them are
Answer:
This is what I found on the internet that I hope will help you! :3
Explanation:
It's a free app that will be preinstalled with Windows 10, and you don't need an Office 365 subscription to use it. The existing My Office app has many of these features, but the new Office app puts the focus on the free online versions of Office if you're not an Office 365 subscriber.
Consider a computer system with three users: Alice, Bob, and Cyndy. Alice owns the file alicerc, and Bob and Cyndy can read it. Cyndy can read and write the file bobrc, which Bob owns, but Alice can only read it. Only Cyndy can read and write the file cyndyrc, which she owns. Assume that the owner of each of these files can execute it.
a. Create the corresponding access control matrix.
b. Cindy gives Alice permission to read cyndyrc, and Alice removes Bob's ability to rad alicerc. Show the new access control matrix.
Answer:
Following are the solution to this question:
Explanation:
For point a:
[tex]alicerc \ \ \ \ \ \ \ \ \ \ \ bobrc \ \ \ \ \ \ \ \ \ \ \ \ \ \ cyndyrc\\[/tex]
[tex]Alice \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ox \ \ \ \ \ \ \ \ \ \ \ \ \ \ r\\\\ Bob \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ r \ \ \ \ \ \ \ \ \ \ \ \ \ \ ox \\\\Cyndy \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ r\ \ \ \ \ \ \ \ \ \ \ \ \ \ rw \ \ \ \ \ \ \ \ \ \ \ \ \ \ orwx[/tex]
For point b:
[tex]alicerc \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ bobrc \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cyndyrc[/tex]
[tex]Alice \ \ \ \ \ \ \ \ \ \ \ \ \ \ ox \ \ \ \ \ \ \ \ \ \ \ \ \ \ r \ \ \ \ \ \ \ \ \ \ \ \ \ \ r\\\\Bob \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ox \\\\Cyndy \ \ \ \ \ \ \ \ \ \ \ \ \ \ r \ \ \ \ \ \ \ \ \ \ \ \ \ \ rw \ \ \ \ \ \ \ \ \ \ \ \ \ \ orwx[/tex]
A common programming operation is to swap or exchange the values of two variables. If the value of x is currently 19 and the value of y is 42, swapping them will make x into 42 and y into 19. Write a program named Swap.java that allows the user to enter two int values. The program should store those values into variables and then swap the variables. Print the values of both variables before and after the swap. You will receive full credit as long as your solution works, but try to do this using as few variables as possible
Answer:
import java.util.Scanner;
public class Swap
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int x, y, t;
System.out.print("Enter the first variable: ");
x = input.nextInt();
System.out.print("Enter the second variable: ");
y = input.nextInt();
System.out.printf("Values before the swap -> x = %d, y = %d\n", x, y);
t = x;
x = y;
y = t;
System.out.printf("Values after the swap -> x = %d, y = %d\n", x, y);
}
}
Explanation:
Import the Scanner class
Create a Scanner object to be able to get input from the user
Declare the variables, x, y, and t - the variable t will be used as temporary variable that will hold the value of x
Ask the user to enter the first and second variables
Print the values before swap
Assign the value of x to the t
Assign the value of y to the x (Now, x will have the value of y)
Assign the value of the t to the y (Since t holds the value of x, y will have the value of x)
Print the values after the swap
Consider the following method, remDups, which is intended to remove duplicate consecutive elements from nums, an ArrayList of integers. For example, if nums contains {1, 2, 2, 3, 4, 3, 5, 5, 6}, then after executing remDups(nums), nums should contain {1, 2, 3, 4, 3, 5, 6}.
public static void remDups(ArrayList nums)
{
for (int j = 0; j < nums.size() - 1; j++)
{
if (nums.get(j).equals(nums.get(j + 1)))
{
nums.remove(j);
j++;
}
}
}
The code does not always work as intended. Which of the following lists can be passed to remDups to show that the method does NOT work as intended?
A. {1, 1, 2, 3, 3, 4, 5}
B. {1, 2, 2, 3, 3, 4, 5}
C. {1, 2, 2, 3, 4, 4, 5}
D. {1, 2, 2, 3, 4, 5, 5}
E. {1, 2, 3, 3, 4, 5, 5}
Answer:
B. {1, 2, 2, 3, 3, 4, 5}
Explanation:
Given
The above code segment
Required
Determine which list does not work
The list that didn't work is [tex]B.\ \{1, 2, 2, 3, 3, 4, 5\}[/tex]
Considering options (A) to (E), we notice that only list B has consecutive duplicate numbers i.e. 2,2 and 3,3
All other list do not have consecutive duplicate numbers
Option B can be represented as:
[tex]nums[0] = 1[/tex]
[tex]nums[1] = 2[/tex]
[tex]nums[2] = 2[/tex]
[tex]nums[3] = 3[/tex]
[tex]nums[4] = 3[/tex]
[tex]nums[5] = 4[/tex]
[tex]nums[6] = 5[/tex]
if (nums.get(j).equals(nums.get(j + 1)))
The above if condition checks for duplicate numbers.
In (B), when the elements at index 1 and 2 (i.e. 2 and 2) are compared, one of the 2's is removed and the Arraylist becomes:
[tex]nums[0] = 1[/tex]
[tex]nums[1] = 2[/tex]
[tex]nums[2] = 3[/tex]
[tex]nums[3] = 3[/tex]
[tex]nums[4] = 4[/tex]
[tex]nums[5] = 5[/tex]
The next comparison is: index 3 and 4. Meaning that comparison of index 2 and 3 has been skipped.
This is so because of the way the if statement is constructed.
There are different kinds of ArrayList of integers. The option in the lists can be passed to remDups to show that the method does not work as intended is {1, 2, 2, 3, 3, 4, 5}.
When you study the different options given, one will see that that only list B has repeated duplicate numbers such as 2,2 and 3,3. while the other options have only a duplicate numbers that are not following each other.In Python, there are different ways to remove duplicates from list. An example using naive or novice method is;
The main list is : [1, 3, 5, 6, 3, 5, 6, 1]
The list after deleting duplicates : [1, 3, 5, 6]
Learn more about coding from
https://brainly.com/question/22654163
Your supervisor has asked you to make a presentation to a group of new interns about appropriate digital communication in the workplace. Which of these keywords should you research?
A netiquette
B project management
C emojis
Answer: Netiquette
Explanation:
The keywords that'll be researched is netiquette. Netiquette, is simply made up of the words "net"which and also “etiquette,” and it has to do with appropriate behavior that are used online when communicating with someone. These importance of such rules are to enhance communication skills.
Some of the rules include the use of respectful language, large files should not be emailed but rather compressed, people's privacy should be respected etc
1. Select two forms of case designed suitable for ATX power supply and
motherboard,
A. Chassis and cabinet
B. Cabinet and tower
C. Desktop and tower
D. Chassis and tower
Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are combined to form the
final file. Which type of version control process does Leslie's company use?
OA.
file merging
ОВ.
file locking
Ос.
file subversion
OD.
file conversion
O E.
file diversion
Answer:
file subversion
Explanation:
File subversion is compliant with the copy-modify-and merge model. Here, users make personal working copies which they can adjust concurrently. After the adjustments, the files are merged into a final copy by the version control system or someone.
This is similar to the version control process of Leslie's company. The team members all save their altered versions of the files which are then finally merged into one final file.
Which command will provide us with a list of the available internal commands (commands that are part of Command Prompt, such as CD and DIR - not IPCONFIG or NETSTAT) of Command Prompt?
Answer: $help
Explanation:
Not sure which terminal you are using, but "help" in the terminal outputs available internal commands.
Write a Java program that takes as input a paragraph as a String and identifies if any of the words in the paragraph is a $1.00 word. The value of each word is calculated by adding up the value of each one of its characters. Each letter in the alphabet is worth its position in pennies i.e. a
Answer:
In Java:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter paragraph: ");
String para = input.nextLine();
String[] para_words = para.split("\\s+");
for (int i = 0; i < para_words.length; i++) {
para_words[i] = para_words[i].replaceAll("[^\\w]", "");
char[] eachword = para_words[i].toCharArray();
int penny = 0;
for(char c : eachword){
int value = (int)c;
if(value<=122 && value>=97){ penny+=value-96; }
else if(value<=90 & value>=65){ penny+=value-64; }
}
if(penny == 100){
System.out.println(para_words[i]);
}
penny = 0;
}
}
}
Explanation:
Due to the length of the explanation, I've added the explanation as an attachment
Pls awnser right awnsers only
Answer:
2, 4, and 5
Explanation:
Write formal descriptions of the following sets.
(a) The set containing the numbers 1, 10, and 100
(b) The set containing all integers that are greater than 10
(c) The set containing all natural numbers that are less than 10
(d) The set containing nothing at all
(e) The set containing the empty string
(f) The set containing the string abc
Answer:
{1, 10, 100}
{a : a ∈ Z and a > 10}
{a : a ∈ N and a < 10}
∅
{ε}
{abc}
Explanation:
1.) A set containing the numbers 1, 10 and 100
2.) Z represents integers, hence numbers n the set are integers values greater Than 100
3.) N represents natural numbers, this the set contains natural numbers less Than 10
4.)∅ represents a null or empty set
5.)represents an empty string
6) contains the sting values a, b and c
Assume that you have 22 slices of pizza and 7 friends that are going to share it (you've already eaten). There's been some arguments among your friends, so you've decided to only give people whole slices. Write a Python expression with the values 22 and 7 that calculates the number of whole slices each person would receive and assigns the result to numberOfWholeSlices.
Answer:
In Python:
numberOfWholeSlices = int(22/7)
print(numberOfWholeSlices )
Explanation:
For each friend to get a whole number of slices, we need to make use of the int function to get the integer result when the number of slices is divided by the number of people.
So, the number of slice is: 22/7
In python, the expression when assigned to numberOfWholeSlices is:
numberOfWholeSlices = int(22/7)
Next, is to print the calculated number of slices
print(numberOfWholeSlices )
Following are the python program to the given question:
Program Explanation:
Defining a variable "numberOfWholeSlices". Inside this variable, it divides the integer value and holds the quotient part, and holds only the integer part by using the int method.In the next step, it uses the print method that prints the quotient value holding variable.Program:
numberOfWholeSlices = int(22/7)#defining a variable "numberOfWholeSlices"
#dividing the integer value and holds the quotient value part and convert the value into integer
print(numberOfWholeSlices )#print the quotient value
'''OR'''
numberOfWholeSlices = 22//7#defining a variable "numberOfWholeSlices" that claculates and hold the quotient value integer part
print(numberOfWholeSlices )#print the quotient value
Output:
Please find the attached file.
Learn more:
brainly.com/question/712334
Type the correct answer in the box. Spell all words correctly.
John wants to use graphical elements on his web page. Which image formats should he use to keep the file size manageable?
John should use
formats to keep the file size manageable.
Answer:
JPEG or PNG but mostly JPEG
Explanation:
JPEG – JPEG is the best option for photographs and other images displaying a huge variety of colors. They can also be compressed, sacrificing quality for a reduction in file size.
PNG – PNGs win for graphics, drawings, text, and some screenshots. They also support transparency, unlike JPEGs. This format uses lossless compression, which results in higher quality but also bigger files.
The image formats should he use to keep the file size manageable is JPEG or PNG however commonly JPEG.
What is JPEG format?JPEG is the high-satisfactory choice for pics and different pix showing a massive sort of colors. They also can be compressed, sacrificing high-satisfactory for a discount in report size.
PNG PNGs win for graphics, drawings, text, and a few screenshots. They additionally help transparency, not like JPEGs. This layout makes use of lossless compression, which leads to better high-satisfactory but additionally larger files.
Read more about the image formats:
https://brainly.com/question/26733261
#SPJ2
Given the waveform below, derive the output waveform (Q) for the respective devices. All outputs start at RESET (Q = 0) state
a) S-R latch assuming A = S and B = R.
b) Gated D latch assuming C = EN and B = D.
c) Negative Edge-triggered D Flip-flop assuming C = CLK and A = D.
d) Positive Edge-triggered J-K Flip-flop assuming C = CLK, A = J, and B = K.
It's important to understand that even information systems that do not use computers
have a software resource component. State the two (2) types of software resources
with an example for each type to support your answers.
Answer:
yes I am not sure if you have any questions or concerns please visit the plug-in settings to determine how attachments are handled the situation in the measurements of the season my dear friend I am not sure if you can send you a great day to day basis of
what do mean by cpu? example
Explanation:
The main computer case containing the central components of a personal computer is CPU.
The central processing unit (CPU) can be defined as the brain of the computer, it also takes the raw data and turns it into information.
Write an algorithm to show whether a given number is even or odd.
Answer:
int num = Console.ReadInt("Please enter a number");
if(num%2 == 0) {
Console.WriteLine("Number is even");
} else {
Console.WriteLine("Number is odd");
Explanation:
I don't get the width and height part (PLEASE HELP WILL GIVE BRAINLIEST ANSWER)
Answer:
What they're saying is that the first two bytes (first two eight bit segments) tell you the width and height of the pattern.
In the example given, you'll notice that the first 16 digits are 00000100 00000100. If you convert those to decimal, you'll see that those are both equal to four.
If instead the second block of eight bits was 00000111, the image height would then be seven.
How can we display outputs of DIR one screenful at a time? There are at least two different ways, and either one is acceptable.
Answer:
DIR has a /p option to paginate any output.
dir /p
Will give you one screen length at a time.
I believe you can use that simultaneously with /w if you want to fit more file names on the screen, at the loss of additional data like file size, type, etc.
Your goal is to write a JAVA program that will ask the user for a long string and then a substring of that long string. The program then will report information on the long string and the substring. Finally it will prompt the user for a replacement string and show what the long string would be with the substring replaced by the replacement string. Each of the lines below can be produced by using one or more String methods - look to the String method slides on the course website to help you with this project.
A few sample transcripts of your code at work are below - remember that your code should end with a newline as in the textbook examples and should produce these transcripts exactly if given the same input. Portions in bold indicate where the user has input a value.
One run of your program might look like this:
Enter a long string: The quick brown fox jumped over the lazy dog
Enter a substring: jumped
Length of your string: 44
Length of your substring: 6
Starting position of your substring: 20
String before your substring: The quick brown fox
String after your substring: over the lazy dog
Enter a position between 0 and 43: 18
The character at position 18 is x
Enter a replacement string: leaped
Your new string is: The quick brown fox leaped over the lazy dog
Goodbye!
A second run with different user input might look like this:
Enter a long string: Friends, Romans, countrymen, lend me your ears
Enter a substring: try
Length of your string: 46
Length of your substring: 3
Starting position of your substring: 21
String before your substring: Friends, Romans, coun
String after your substring: men, lend me your ears
Enter a position between 0 and 45: 21
The character at position 21 is t
Enter a replacement string: catch
Your new string is: Friends, Romans, councatchmen, lend me your ears
Goodbye!
Answer:
In Java:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String longstring, substring;
System.out.print("Enter a long string: ");
longstring = input.nextLine();
System.out.print("Enter a substring: ");
substring = input.nextLine();
System.out.println("Length of your string: "+longstring.length());
System.out.println("Length of your substring: "+substring.length());
System.out.println("Starting position of your substring: "+longstring.indexOf(substring));
String before = longstring.substring(0, longstring.indexOf(substring));
System.out.println("String before your substring: "+before);
String after = longstring.substring(longstring.indexOf(substring) + substring.length());
System.out.println("String after your substring: "+after);
System.out.print("Enter a position between 0 and "+(longstring.length()-1)+": ");
int pos;
pos = input.nextInt();
System.out.println("The character at position "+pos+" is: "+longstring.charAt(pos));
System.out.print("Enter a replacement string: ");
String repl;
repl = input.nextLine();
System.out.println("Your new string is: "+longstring.replace(substring, repl));
System.out.println("Goodbye!");
}
}
Explanation:
Because of the length of the explanation; I've added the explanation as an attachment where I used comments to explain the lines
In this exercise we have to use the knowledge of the JAVA language to write the code, so we have to:
The code is in the attached photo.
So to make it easier the JAVA code can be found at:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String longstring, substring;
System.out.print("Enter a long string: ");
longstring = input.nextLine();
System.out.print("Enter a substring: ");
substring = input.nextLine();
System.out.println("Length of your string: "+longstring.length());
System.out.println("Length of your substring: "+substring.length());
System.out.println("Starting position of your substring: "+longstring.indexOf(substring));
String before = longstring.substring(0, longstring.indexOf(substring));
System.out.println("String before your substring: "+before);
String after = longstring.substring(longstring.indexOf(substring) + substring.length());
System.out.println("String after your substring: "+after);
System.out.print("Enter a position between 0 and "+(longstring.length()-1)+": ");
int pos;
pos = input.nextInt();
System.out.println("The character at position "+pos+" is: "+longstring.charAt(pos));
System.out.print("Enter a replacement string: ");
String repl;
repl = input.nextLine();
System.out.println("Your new string is: "+longstring.replace(substring, repl));
System.out.println("Goodbye!");
}
}
See more about JAVA at brainly.com/question/2266606?
10. Select the correct answer.
Thomas has signed a deal with a production house that allows them to use his images on their website. What is required that permits the usage of images for commercial or editorial purposes?
A.
copyright
B.
licensing
C.
permit
D.
public domain
E.
fair use
What is an embedded computer? explanation
Answer: embedded computer
Explanation: An embedded computer is a microprocessor-based system, specially designed to perform a specific function and belong to a larger system. It comes with a combination of hardware and software to achieve a unique task and withstand different conditions.
Answer:
An embedded computer is a computer that has been built to solve only a very few specific questions and is not easily changed.it has a processor, software, input and output.examples are: calculator, digital camera, elevator, copiers, printers.At which stage should Joan discuss the look and feel of her website with her website designer?
At the
stage, Joan should discuss the look and feel of her website with her website designer.
Answer:
Development stage: It is great to talk with the website designer during the development stages to understand the goalsAnswer:
At the planning stage maybe?
Explanation:
I'm not positive but in plato it discusses this in the Website Development Proccess lesson.
Select each of the benefits of wireless communication.
checking e-mail from a remote location
o transmiting broadcast signals
receiving voicemail messages while away from the office
sending and receiving graphics and video to coworkers
sending data from outside the office
Answer:
checking e-mail from a remote location
receiving voicemail messages while away from the office
sending and receiving graphics and video to coworkers
sending data from outside the office
Explanation:
Wireless networks have proved to be more beneficial and accessible as compared to the wired networks. Wireless networks have helped in increasing the efficiency of transferring the data. It is also very accessible and easy to operate. It helps a person be connected even during travelling. It saves the cost and helps in better execution of the work. The speed at which the data is transferred helps in saving the cost and time. The maintenance cost is reduced in wireless communication as that of wired one. It also helps during the times of emergency situations.
Answer:
checking e-mail from a remote location
receiving voicemail messages while away from the office
sending and receiving graphics and video to coworkers
sending data from outside the office
Explanation:
EDGE 2021
1, 3,4,5
The intelligence displayed by humans and other animals is termed?
Answer:
ᗅгᝨเŦเςเᗅl เภᝨєllเﻮєภςє, Տ⌾๓єᝨเ๓єՏ ςᗅllє๔ ๓ᗅςђเภє เภᝨєllเﻮєภςє ⌾г ๓ᗅςђเภє lєᗅгภเภﻮ, เՏ เภᝨєllเﻮєภςє ๔є๓⌾ภՏᝨгᗅᝨє๔ ๒γ ๓ᗅςђเภєՏ, เภ ς⌾ภᝨгᗅՏᝨ ᝨ⌾ ᝨђє ภᗅᝨႮгᗅl เภᝨєllเﻮєภςє ๔เՏקlᗅγє๔ ๒γ ђႮ๓ᗅภՏ ᗅภ๔ ⌾ᝨђєг ᗅภเ๓ᗅlՏ. ... Տ⌾๓єᝨђเภﻮ ᝨђᗅᝨ'Տ ђєlקเภﻮ ᝨђเՏ ςђᗅภﻮє เՏ ᗅгᝨเŦเςเᗅl เภᝨєllเﻮєภςє.
հօթҽ íԵ հҽlթs
Natural intelligence relates to life concepts and life choices which adhere to the natural constraints or boundaries of the world's resources and the further discussion can be defined as follows:
It is defined as an emotional impulse ingrained into the common myth that drives us to value & defend the integrity of any living creatures.It is the polar opposite of artificial intelligence, which is all of the control mechanisms found in life. Nature also displays non-neural control in plants and protozoa, as well as dispersed intellect in colonies species including such ants, jackals, and people.Therefore, the final answer is "Natural intelligence".
Learn more:
brainly.com/question/16456970
How does Kelvin inspire other
people?
He shows that it's easy to meet an
important leader of a country
He shows that anyone can succeed in
the music business.
He shows that studying engineering
leads to good jobs.
He shows that hard work and creative
thinking can solve problems.
Answer:
hard work and creative thinking can solve all problomes
Explanation:
Answer:
hard work
Explanation:
which of the view will show you a view very similar to the Print view
Answer:
Print Layout view is the one most closely related to what your document will look like when you actually print it. (In some versions of Word this view may be called Page Layout view.) ... This is the viewing mode you should use if you want to always see what your document will look like.
Explanation:
I hope this helps and pls mark me brainliest :)