Extracurricular activity takes part after school hours are over, and the nature is voluntary; students can choose to take which activity interests them most and they can choose to not participate at all.
What kind of activity is the school play?A co-curricular activities are connected in some way to the school and to academic learning, extracurricular activities step outside of this realm.
Extracurricular activities are those activities that occur outside of the educational setting and do not provide instruction to supplement the academic curriculum.”
From the given question the student’s participation in the school play is an example of an after-school activity, known as extracurricular activity.
Extracurricular activity takes part after school hours are over, and the nature is voluntary; students can choose to take which activity interests them most and they can choose to not participate at all.
Learn more about the Extracurricular activity;
https://brainly.com/question/2214071
#SPJ2
Choose the list of the best uses for word processing software.
Word processing software is ideal for creating and editing text, organizing notes with outlining capabilities, and revising writing through reviewing tools. Integrated spellcheck and grammar tools enhance writing quality, while voice-to-text features help those with difficulty typing.
The best uses for word processing software include creating and editing text documents, organizing notes, and revising your writing. Applications like Microsoft Word provide features such as automatic outlining, bullet and numbered lists, and the ability to insert symbols and graphics. They often come with reviewing tools that aid in collaboration and editing and have built-in spellcheck and grammar tools to help improve the quality of your writing. You can also utilize the voice-to-text feature if you have difficulty writing or typing, getting your ideas into written form more efficiently.
Creating and formatting documents with bullets and numbered lists to enhance readability.Using the reviewing tool for collaboration, making revision and editing a fluid process.Utilizing the built-in spelling and grammar checkers to catch errors and ensure clear communication.Keeping your lists of reporting words and practising with note-taking and outlining features in the software can facilitate better organization and more effective communication in your writing assignments.
write a program to output the following
Answer:
The program to this question as follows:
Program:
#include <stdio.h> //including header file
int main() //defining main method
{
printf("\t ^ ^\n"); //print design
printf("\t ( o o )\n"); //print design
printf("\t v"); //print design
return 0;
}
Output:
^ ^
( o o )
v
Explanation:
In the C language program above, the header file is included first, then the main method is defined, inside this method print function is used to print the given design.
In the print function, we print values as a message, in which "\t and \n" are used. The "\t" is used for giving a tab space, and "\n" is used for print value in the new line.
What are the disadvantages of twitter within a business ?
Which of the following is a form of interpersonal communication
Asking a waiter for a glass of water is a form of interpersonal communication.
Asking a waiter for a glass of waterExplanation:
Interpersonal communication is the procedure by which individuals trade data, emotions, and importance through verbal and non-verbal messages: it is eye to eye communication. This is the procedure of trade of data, thoughts, emotions, and significance between at least two individuals through verbal as well as non-verbal techniques.
Interpersonal communication has numerous qualities, for example, thinking about others, being sympathetic, tolerating others, genuineness, adaptability, and having persistence. Every trademark is significant and essential for the general soundness of the staff and the association as we develop.
Final answer:
Interpersonal communication is the interaction between people who influence one another and encompasses all forms of direct personal interactions, whether face-to-face or via technology, characterized by immediacy and intentionality.
Explanation:
Forms of Interpersonal Communication
Interpersonal communication is the exchange of messages between two or more people whose lives are interdependent and mutually influence each other. This form of communication is possibly the most prevalent in our daily lives, as it includes any direct interactions we have with another person. It differs from other forms such as intrapersonal, group, public, or mass communication. Interpersonal communication can occur in various contexts, such as one-on-one conversations, small group settings, or through technology such as phone calls or online chats. It's essential for building, maintaining, and ending relationships. Subfields of communication studies like intercultural communication, organizational communication, health communication, and computer-mediated communication all address different aspects of interpersonal communication.
What should you tell him about posting “anonymously” and digital privacy?
Answer:
Explanation:
Is really hard to navigate on the internet in anonymously because always there are some data behind all the navigation, for example, social media has your personal data, there are histories of your navigation in your browser, there are cookies, and with your IP someone can track your traffic, but, we can protect some data, with anti-virus, with some browsers, with VPN and more additional tools.
What are some settings you can control when formatting columns? Check all that apply.
1. the part of the document to apply the columns to
2. the text styles
3. the number of columns
4. the width of each column
5. the number of images in each column
6. the line between columns
7. the margins
Answer: 1, 3, 4, 6, 7
Explanation:
when formatting columns we can controls,
1. the part of the document to apply the columns to
3. the number of columns
4. the width of each column
6. the line between columns
7. the margins
What is column formatting?The column-formatting text describes the elements that appear and their display style. The data in the column doesn't change. Anyone who can create and manage views in a list can access column formatting from the column settings.
What are the steps for column formatting?To add columns to a document:
Select the text you want to format. Selecting text to format.Select the Page Layout tab, then click the Columns command. A drop-down menu will appear.Select the number of columns you want to create. Formatting text into columns.The text will format into columns. The formatted text.To learn more about formatting columns, refer
https://brainly.com/question/16826979
#SPJ2
what is the output of this code?
int num = 12; int x = 20 while (num <= x) { num = num + 1; if (num*2 > x+num) { console.log(num); } }
The output of the given code is 21.
Explanation:
int num = 12;
int x = 20
while (num <= x)
12<=20 13<=20 14 <= 20 15 <= 20 16 <=20 17 <=20 18 <=20 19 <=20 20 <= 20
{
num = num + 1; num = 13 num= 14 num= 15 num=16 num= 17 num= 18 num= 19 num= 20 num= 21
if (num*2 > x+num)
{ 26 > 32 28>34 30> 36 32> 36 34> 37 36> 38 38> 39 40> 40 42> 41
console.log(num);
} }
So this above output happens while you execute the given code, hence the output will be 21.
Because, when the num is 20, the execution goes like the following:
while(num<=x) while (20 <=12) {
20= num+1 (20+1) =21
if(num*2> x+num)
if (42 > 41)
{ console.log(21))}
Which of the following may be a reason for giving a Page Quality (PQ) rating of Highest? Select all that apply.
True
False
The page could be Fully Meets for a particular query.
True
False
The page has no Ads.
True
False
The website has an excellent reputation from experts.
True
False
The page has extremely high quality content and the author is an acknowledged expert in the topic.
Following are given answers to each reason:
The page could be Fully Meets for a particular query. FalseThe page has no Ads. TrueThe website has an excellent reputation from experts. TrueThe page has extremely high quality content and the author is an acknowledged expert in the topic. TrueExplanation:Page Quality can be defined as a parameter which is considered by the GOOGLE to rank a page according to its worth. So it is a measurement tool that depicts the importance of a page by analyzing the quality of its content.
So there are many things that are counted in the quality of the web page by google raters. They also include that:
The page shouldn't has any Ads. The website should have an excellent reputation from experts. The page should have extremely high quality content and the author must be acknowledged expert in the topic.I hope it will help you!
The answers to the questions are given below:
The page could be Fully Meets for a particular query is a False statement.The page has no Ads is a True statement.The website has an excellent reputation from experts is a True statement.The page has extremely high quality content and the author is an acknowledged expert in the topic is a True statement.What is A Page Quality (PQ) rating?A Page Quality (PQ) rating task is known to be a type of task that is made up of a URL and also a grid to measures of one's observations.
This helps to aid one's exploration of the landing page and the website that is linked with the URL. Note that the aim of Page Quality rating is to look into how well the page gets or do its purpose.
Learn more about Page Quality (PQ) rating from
https://brainly.com/question/15572876
term 2 lesson 2 coding activity edhesive
This Java program prompts the user to input three names, stores them in separate variables, and then prints the names in reverse order. It utilizes the Scanner class for user input and concatenates the names to reverse their order.
Below is the Java program that asks the user for three names and prints them in reverse order:
```
import java.util.Scanner;
public class ReverseNames {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Please enter three names:");
String name1 = scanner.nextLine();
String name2 = scanner.nextLine();
String name3 = scanner.nextLine();
System.out.println(name3 + " " + name2 + " " + name1);
}
}
```
The question probable maybe:
Write a program in Java that asks the user for three names, then prints the names in reverse order.
Sample Run:
Please enter three names:
Zoey
Zeb
Zena
Zena Zeb Zoey
Hint: One solution to this challenge would be to use 3 separate variables, one for each name.
PYTHON QUESTION
Exercise 9.3.6: Coordinate Pair Pair
Ask the user for two numbers. Then, make a tuple out of the two numbers
they give you and print it.
Answer:
First_Number =input("Enter your first number")
Last_Number =input("Enter your last number")
tup1=(First_Number, Last_Number)
print(tup1)
Explanation:
The above Python program asks the user to input two numbers, and then it creates a tuple out of it, and finally prints the tuple. Remember tuple uses () and the tuple items are mentioned inside it and are separated by a comma. And we can print tuple fully through the print statement mentioned above in the program. Remember that tuples are immutable, and this means you cannot update or change the values of the tuple. However, you can concatenate two tuples.
To create a tuple from user-provided numbers, ask for inputs, convert them to integers, and combine them into a tuple before printing.
Coordinate Pair Pair in Python
To create a tuple from two numbers provided by the user in Python, follow these steps:
Ask the user for two numbers using the input() function.Convert the input values from strings to integers.Create a tuple with the two numbers.Print the resulting tuple.Here is an example of how the code looks:
num1 = int(input("Enter the first number: "))This code ensures you gather the two numbers, convert them to integers, combine them into a tuple, and then display the tuple to the user. Using tuples in this way is efficient and straightforward in Python.
A T-1 system multiplexes ___ into each frame
Answer:
PCM encoded samples from 24 voice band channels
Explanation:
The Multiplexer from a lot of inputs generates one single output. And it is the select line that determines which of the input is going to influence output. And the select lines determine the increase in the quantity of data that can be sent through the network in a given amount of time. And this is termed as a data selector. Please note, this is application of multiplexer in data transmission.
And now coming to the T1 carrier system, it is a time division multiplexor, which multiplexes the PCM encoded samples coming from 24 band channels that require to be transmitted over an optical fiber or single metallic wire pair. And for this question, we need what is being multiplexed, and that is as mentioned in the Answer section.
typically most high school students who are 16 or older work an average of __hours per week
Answer:
Typically, 16 year olds who go to school will work an average of 3 hours every day, that also including 17 year olds. 18 year olds, though, have no limits when it comes to that, they can obviously work as long as they want.
Answer:
Typically most high school students who are 16 or older work an 10-20 average of hours per week.Explanation:
Individuals and businesses have concerns about data security while using Internet-based applications. Which security risk refers to unsolicited bulk messages sent via the Internet?
VirusesSpywareSpamMalware refers to unsolicited bulk messages sent via the Internet.
Answer:
Spam
Explanation:
If you receive in bulk the unsolicited messages, then that does mean that your inbox is being spammed. This will not harm you but you will lose the Gb that is allocated to your mailbox. And if you will not check then your mailbox will soon be full, and you might not receive some of the important messages that you should reply to immediately.
Why do networks need standards?
1Standards are what keep packets from deteriorating.
2because otherwise, the signal-to-noise ratio would be too low
3because otherwise, networks would collaps more often
4Standards are what guarantee that the different pieces of network are configured to communicate with one another.
4. Standards are what guarantee that the different pieces of network are configured to communicate with one another
Networking standards ensure the interoperability of networking technologies by defining the rules of communication among networked devices. Networking standards exist to help ensure products of different vendors are able to work together in a network without risk of incompatibility
Which company has the comparative advantage in producing large tubes of toothpaste?
Answer:
Explanation:
This question is about a comparative advantage, this is the ability to produce a good service at lower opportunity cost, in this case, there is table with 4 companies, where one of them has this comparative advantage, but this depends on what company can produce more large of toothpaste because the costumer can find the product in a lower price.
There are four companies in this example:
Sparkling
Bright White
Fresh!
Mmmint
Choose the company that can produce more products assuming the table.
Answer:
Fresh!
Explanation:
A manager does not know how to program code. What could he use to communicate his programming ideas effectively to his team?
Answer:
The manager can prepare an algorithm, and a data flow diagram as well as use case diagram, class diagram and the flow chart to explain his programming ideas to his team. A manager is expected to be acquainted with Software Engineering if not the coding, and hence, he knows the above. And if he does not know these as well, he can make an algorithm in his native language, and get it translated from translation software to the language of the programmers, and explain to them exactly what is required. And if he knows the above diagrams, then his work will be much easier, and even when he does not know how to program code.
Explanation:
Please check the answer section.
Answer:
B
Explanation:
The Properties dialog box
helps designers precisely control elements in DTP layouts
provides the designer's name and organization
enables designers to resize objects
offers a way for designers to enter text into a layout
Answer:
helps designers precisely control elements in DTP layouts
enables designers to resize objects
Explanation:
DTP stands for desktop publishing, and they are of four types: word processors, page layout, web publishing, and graphics. At first, they were being mostly used for printing purposes. However, now they are being used for preparing documents for publishing online using page layout software. And as far as the properties dialog box is concerned, it allows designers to resize the objects. And it allows them to control elements in DTP layouts. However, it does not provide the designer's name and organization or offer the way for the designer to enter the text into the layout. Hence, the correct options are as mentioned in the answer section.
Answer:
helps designers precisely control elements in DTP layouts and enables designers to resize objects.
Explanation:
what is the best process of heat transfer
Answer: conduction
Explanation:
radiation, conduction, convection. conduction gives direct heat onto another object while the others slowly give it off
hope that helps ✨
Speech about society being normal
Answer:
Do you know what is best about America? It’s really the fact that the right to equality has been ensured at the maximum level, and for all. And the citizens respect their family and this is being showcased proudly by Sir Donald Trump who not only looks after the whole US without ever hesitating no matter whatever might be the issue and at the same time also look after his great and proven proud family. And that explains in itself why America is so great. And this is a perfect specimen of an inordinate democracy, and that is why American Democracy is so fruitful. There is sufficient money, all sorts of resources, the most influential military, and the world's finest technology. And American history can be a petite one, but it is one of the most noticeable histories in the entire world. You will not find such a great history in any other part of the world. And George Washington, the father of the country set such an example that the next various generations of great leaders were able to build such a great America. It is a society where every citizen enjoys equal rights, and a day before Sir Trump issued various prisoners with graduate degrees, to help them to return to the mainstream of life. No other society in the whole world enjoys such a level of privileges on behalf of equality. And that’s why the US society can be termed as the most normal in the whole world.
Explanation:
Please check the answer section. And I have chosen US as it is the most fruitful democracy of the world. And I feel all the counrtries from the entire world, should learn a lesson from the short history of United States. This is the way in which we can sight a normal society.
PYTHON QUESTION
Exercise 9.3.9: Full Name & Citation
points
Write a program that asks a user for their first and last name and save them
to two variables.
Then print out their full name (First_name Last_name) and then a citation
(Last name, First name)
For example, if the user input the following:
First name: Roger
Last Name: Brown
Your program output should be the following:
Full name : Roger Brown
Citation: Brown, Roger
Use swapping to switch the order of your variables!
Final answer:
To handle the exercise, gather the user's first and last name, print the full name, perform variable swapping, and print the citation in the format 'Last name, First name'.
Explanation:
To complete this exercise in Python, we will prompt the user to enter their first name and last name, save these values to variables, and then utilize variable swapping to generate the desired output with full name and citation format. Here is a step-by-step solution:
Ask the user for their first name and save it to a variable called first_name.Ask the user for their last name and save it to a variable called last_name.Print the full name by concatenating first_name and last_name with a space between them.Use variable swapping to switch the values of first_name and last_name.Print the citation format by concatenating last_name, a comma, a space, and then first_name.Here is an example of the code:
first_name = input('Enter your first name: ')Final answer:
A Python program can ask for a user's first and last names, display them, and then print the citation by swapping the name order. The 'input' function is used to collect names, and the swap is done by reassigning variables.
Explanation:
To write a Python program that asks a user for their first name and last name, you can use the input() function. After that, you will print the full name and citation, with the order of the names swapped using variable swapping.
Example Python Program
first_name = input("Enter your first name: ")When running this program, after the user provides their first and last names, it will show the full name as 'First_name Last_name' and the citation as 'Last_name, First_name'.
If a user wanted to insert the information listed, which categories would they need to choose?
Author:
File name:
Page number:
There are several features in Microsoft Office Word that allows users to format their Word documents.
The information and their categories are:
Author: User InformationFile name: Document InformationPage number: Numbering
The author of a Word document belongs to the user information.
In this section, the user can enter the username, name and the initials of the author.
The filename of a Word document belongs to the document information, because it gives details about the document that is being created or modified.
The page number of a document can be found in the page numbering section.
Read more about Microsoft Office Word documents at:
https://brainly.com/question/4558349
The user needs to choose the Author, File Name, and Page Number categories. Each type of information belongs in specific document sections or fields.
If a user wants to insert the following information, they would need to choose specific categories:
Author: This would generally fall under Author or Writer fields in document software.File name: This can typically be found in the File Properties section or labeled as File Name.Page number: This is often found in the Header or Footer sections where you can insert page numbers.When dealing with a book chapter, it's important to include additional information such as the chapter title and page numbers where the chapter appears. Furthermore, if it is part of a larger edited volume, you should also include the title of the essay or article, the name of the editor(s), and any other relevant details to help identify the source more easily.
Software testing occurs near the end of the programming process. Because of this, if a project falls behind schedule, testing time is often reduced. What are the possible impacts of less-than-thorough testing? Topics might include company reputation, customer dissatisfaction, the company’s ability to sell new or updated products, etc. Which is worse: A company can release product late or release it on time without fully testing it. Which one do you think it's worse?
Answer:
it seems that the company is following the old waterfall model, and in this first, the development work is completed, and finally, the testing process is being executed. And it seems there is no planning done here as well. Software engineering teaches us the Agile method, and in this after every phase, the testing is done, and that too by the testers of the company, sometimes team leader and project managers as well, and also by the client. And by all the bug is being reported immediately, and details are sent to the developer, who fixes it immediately. However, in the waterfall model, the testing is done at the last, after completion of all processes, and if now the bug is found, it needs to be checked thoroughly the whole software. And this is impossible to complete in time on most of the occasions. And in such cases its better to release products late after complete testing. The worse is certainly to release it on time without fully testing it. And suppose you release and the company loses, 1 billion dollars due to a security bug. It can be deadly, and hence no software company can afford it. Complete testing is a must before the launch. And also it's important to not use the waterfall model, and use the Agile approach for software development. The waterfall model threatens company reputation, and also raises issues like company dissatisfaction. And it also puts the question mark on the company's ability to sell the new or updated products etc.
Explanation:
Please check the answer section.
Businesses or other organizations, including telephone, cable, and satellite companies that
provide Internet access to others are called what
Answer:
Explanation:
Internet Service Providers (ISPs) these are organizations that provide internet access, we can categorize these companies like commercial, community-owned, non-profit, or otherwise privately owned, in addition, these companies must provide internet access and transit, domain name, web hosting, etc.
How does titanium usually form or appear in nature?
Answer:
You will never find the titanium in nature occurring failure, and it is being found in minerals like the rutile or the titanium oxide. or as ilmenite or the iron titanium oxide, or as the sphene which we also know as the titanite or the calcium titanium silicate. These oxides are converted to the TiCl4 or the chloride via the carbochlorination.
The electronic configuration of titanium is 2,8,10,2, and it is a transition metal.
Explanation:
Please check the answer section.
CTSO related to careers in Information Technology...
FFA
FBLA
FCCLA
DECA
Answer:
FBLA
Explanation:
FFA (Future Farmers of America), this is about agriculture careers.
FBLA (Future Business Leaders of America - Phi Beta Lambda) this is about to learn career skills and gain leadership experience, is related to 10 cluster career like Business Management & Administration, Finance, Information Technology, and Marketing.
FCCLA (Family, Career and Community Leaders of America) is about Education & Training, Hospitality & Tourism, or Human Services.
DECA is related to Business Management & Administration , Finance , Hospitality & Tourism , Marketing.
how does the speaker feel about traditional forms of poetry
Answer:
HE THINKS THAT THEY ARE TOO STRICT
Explanation:
The speaker feels about traditional forms of poetry is they are too strict. The correct option is d.
What is poetry?
Poetry is a literary genre that uses the aesthetic and frequently rhythmic components of language, such as phonesthetics, sound symbolism, and meter, to evoke meanings in addition to or instead of a prosaic ostensible meaning.
A poet's adherence to this concept results in a poem, which is a literary work. Around the world, poetry has seen various changes throughout its long and diverse history.
According to a Western cultural tradition that at least dates back to the 16th century, the inspiration for poetry is often offered by the least dates back to Homer and Rilke.
Therefore, the correct option is d. He thinks they are too strict.
To learn more about poetry, visit here:
https://brainly.com/question/20937991
#SPJ6
The question is incomplete. Your most probably complete question is given below:
He thinks they are the very best style
He thinks they are inspiring soldiers
He thinks they are too short
He thinks they are too strict
the large program that controls how the CPU communicates with other components is the
Answer:
The large program that controls how the CPU communicates with other components is the Operating System. As you know, the operating system is a collection of different system program that controls the operation for computer system and helps CPU to communicate with other components. it acts as an intermediary between computer hardware and user.
Explanation:
The operating system is a large program that tells the CPU what to do next and how to communicate with other components.
As you know, there are many operating systems for computers such as the Microsoft Windows operating system. An operating system is a large program that runs your computer and helps CPU in making the decision. An operating system controls the CPU to communicate with other components that are attached to the system. for example, When you press a button on the keyboard, the operating system tells the CPU that the user has entered the key and you have to respond to it.
There are different functions of an operating system such as:
Folder and file managementMemory managementDevice managementSecurity managementProcess management andHelp to run application software for the usersome queries do not have a dominant interpretation
Some queries do not have a dominant interpretation , the statement is A) True
To determine whether queries have dominant interpretations or not, we need to understand what a dominant interpretation means in this context. A dominant interpretation refers to an interpretation of a query that is clear, unambiguous, and widely accepted or agreed upon.
1. Definition of Dominant Interpretation: A query has a dominant interpretation if there is a single, widely accepted meaning that most people would agree upon without ambiguity.
2. Scenarios without Dominant Interpretation: Queries that are ambiguous, vague, or open to multiple equally valid interpretations do not have a dominant interpretation.
Now, let's consider some examples to illustrate this:
Example 1: "How far is it?"
- Without context, this query lacks a dominant interpretation because "how far" could refer to distance, time, or other measurements depending on the context. Therefore, it does not have a clear, universally agreed-upon meaning.
Example 2: "What do you mean?"
- This query also lacks a dominant interpretation because it depends on the context and what was said previously. The meaning of "what do you mean" can vary significantly based on the preceding conversation or statement.
Example 3: "Who is he?"
- This query has a dominant interpretation if there is a specific context or person under discussion. However, without context, it could still be ambiguous (e.g., if multiple people are present).
In conclusion, queries that do not have a dominant interpretation are common and can arise due to ambiguity, lack of context, or multiple valid interpretations. Therefore, the correct answer is A) True.
Complete Question:
Some queries do not have a dominant interpretation
A)True
B)False
Tech distractions do NOT include _________.
Distractions do not include necessary technology like a stable computer that aids in productivity; rather, they include smartphones and games that can undermine relationships and focus if not managed. Techniques like techno-free days or the removal of gadgets from workspaces can help control potential distractions.
Tech distractions do not include necessary tools and materials for work or study that help maintain focus. While many possible devices and technologies can be distracting, tools such as a stable computer or laptop, necessary software, or efficient organizational platforms can be essential in assisting with work or school-related tasks. In contrast, activities or devices like smartphones, games, and social media can undermine our relationships and productivity if not managed carefully. Certain strategies such as having a techno-free day or removing gadgets from a study space can help mitigate the potential for these distractions to interfere with one's responsibilities.
C++
5.22 LAB: Driving cost - functions
Write a function DrivingCost() with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar cost to drive those miles. All items are of type double. If the function is called with 50 20.0 3.1599, the function returns 7.89975.
Define that function in a program whose inputs are the car's miles/gallon and the gas dollars/gallon (both doubles). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your DrivingCost function three times.
Output each floating-point value with two digits after the decimal point, which can be achieved by executing
cout << fixed << setprecision(2); once before all other cout statements.
Ex: If the input is:
20.0 3.1599
the output is:
1.58 7.90 63.20
Your program must define and call a function:
double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)
Answer:
#include <iostream>
#include<iomanip>
using namespace std;
double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)
{
double dollarCost = 0;
dollarCost = (dollarsPerGallon * drivenMiles) / milesPerGallon;
return dollarCost;
}
int main()
{
double miles = 0;
double dollars = 0;
cout << "Enter miles per Gallon : ";
cin >> miles;
cout << "Enter dollars per Gallon: ";
cin >> dollars;
cout << fixed << setprecision(2);
cout << endl;
cout << "Gas cost for 10 miles : " << DrivingCost(10, miles, dollars) << endl;
cout << "Gas cost for 50 miles : " <<DrivingCost(50, miles, dollars) << endl;
cout << "Gas cost for 400 miles: "<<DrivingCost(400, miles, dollars) << endl;
return 0;
}
Explanation:
Create a method definition of DrivingCost that accepts three input double data type parameters drivenMiles, milesPerGallon, and dollarsPerGallon and returns the dollar cost to drive those miles .Calculate total dollar cost and store in the variable, dollarCost .Prompt and read the miles and dollars per gallon as input from the user .Call the DrivingCost function three times for the output to the gas cost for 10 miles, 50 miles, and 400 miles.
Answer:
def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon):
gallon_used = driven_miles / miles_per_gallon
cost = gallon_used * dollars_per_gallon
return cost
miles_per_gallon = float(input(""))
dollars_per_gallon = float(input(""))
cost1 = driving_cost(10, miles_per_gallon, dollars_per_gallon)
cost2 = driving_cost(50, miles_per_gallon, dollars_per_gallon)
cost3 = driving_cost(400, miles_per_gallon, dollars_per_gallon)
print("%.2f" % cost1)
print("%.2f" % cost2)
print("%.2f" % cost3)
Explanation: