User-Defined Functions: Miles to track lapsOne lap around a standard high-school running track is exactly 0.25 miles. Define a function named MilesToLaps that takes a float as a parameter, representing the number of miles, and returns a float that represents the number of laps.Then, write a main program that takes a number of miles as an input, calls function MilesToLaps() to calculate the number of laps, and outputs the number of laps. Ex: If the inout is 1.5the output is 6.0 Ex: If the input is 2.2the output is 8.8 Your program should define and call a function Function Miles ToLaps(float userMiles) returns float userLaps 12 // Deine Milestola hert. 34 // Deine Minhert. Your code ust call llestola 5

Answers

Answer 1

Answer:

Explanation:

The following is written in Java. The MilesToLaps method creates a variable called laps and gives it the value of the input parameter miles divided by 0.25. Then it returns the variable laps to the user. In the main method a Scanner object was created and asks the user for the number of miles which are passed to the MilesToLaps method which returns the number of laps. This can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("How many miles?");

       float miles = in.nextFloat();

      System.out.println("This is " + MilesToLaps(miles) + " laps");

   }

   public static float MilesToLaps(float miles) {

       float laps = (float) (miles / 0.25);

       return laps;

   }

}


Related Questions

Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).
#include
using namespace std;
int main() {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity;
double distCenter;
cin >> distCenter;
/* Your solution goes here */
cout << accelGravity << endl;
return 0;
}

Answers

Answer:

Replace /* Your solution goes here */ with the following expression

accelGravity = (G * M) / (distCenter *distCenter );

Explanation:

Required

Complete the code

The equivalent expression of (G * M) / (d^2) is:

(G * M) / (distCenter *distCenter );

The expression must be stored in accelGravity.

So, we have:

accelGravity = (G * M) / (distCenter *distCenter );

with the aid of examples explain the differences between open source software and licensed software​

Answers

Answer:

Explanation:

Source is when a company go no limits to run the software but can easily be taken done by a complaint or two or a bug while a licensed it a protected version of the software.

Write a program that reads a list of 10 integers, and outputs those integers in reverse. For coding simplicity, follow each output integer by a space, including the last one. Then, output a newline. coral

Answers

def reverse_list (num_list):

try:

if num_list.isdigit() == True:

return num_list[::-1]

elif num_list < 0:

return "Negative numbers aren't allowed!"

except ValueError:

return "Invalid input!"

user_list = list (int (input ("Please enter ten random positive numbers: " )))

print (reverse_list (user_list))

tinh S(n) = 1+2+3+.....+n

Answers

Answer:

-1/12

Explanation:

[tex]\sum_{k=0}^{k=n} k = \frac{n(n+1)}{2}\\[/tex]

look up the derivation by Srinivasa Ramanujan for a formal proof.

Write an algorithm to solve general formula? ​

Answers

Answer:

2+2=4

Explanation:

simple math cause of that bubye

Write a program that uses linear recursion to generate a copy of an original collection in which the copy contains duplicates of every item in the original collection. Using linear recursion, implement a function that takes a list as user-supplied runtime input and returns a copy of it in which every list item has been duplicated. Given an empty list the function returns the base case of an empty list.

Answers

Answer: b

Explanation:

Program using linear recursion to duplicate items in a list:

def duplicate_list(lst):

   if not lst:

       return []

   else:

       return [lst[0], lst[0]] + duplicate_list(lst[1:])

# Example usage

user_input = input("Enter a list of items: ").split()

original_list = [item for item in user_input]

duplicated_list = duplicate_list(original_list)

print("Duplicated list:", duplicated_list)

How can a program use linear recursion to duplicate items in a list?

By implementing a function that utilizes linear recursion, we can create a copy of an original list with duplicated items. The function duplicate_list takes a list lst as input and checks if it is empty. If the list is empty, it returns an empty list as the base case.

Otherwise, it combines the first item of the list with itself and recursively calls the function with the remaining items (lst[1:]). The duplicated items are added to the resulting list. This process continues until all items in the original list have been duplicated and the duplicated list is returned.

Read more about linear recursion

brainly.com/question/31313045

#SPJ2

3. Using Assume the following list of keys: 36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list. a. Give the resulting list after one call to the function partition. b. What is the size of the list that the function partition partitioned

Answers

Answer:

a. 36, 55, 13, 9, 23, 2, 62, 86, 95, 65,74, 75, 100, 98, 89

b. 15

Explanation:

cloud offers better protection compare to on premise?​

Answers

Why is cloud better than on-premise? Dubbed better than on-premise due to its flexibility, reliability and security, cloud removes the hassle of maintaining and updating systems, allowing you to invest your time, money and resources into fulfilling your core business strategies.

The security of the cloud vs. on-premises is a key consideration in this debate. Cloud security controls have historically been considered less robust than onprem ones, but cloud computing is no longer a new technology. . A company running its own on-premises servers retains more complete control over security.

Believe it!!

Pls follow me.

You are consulting with another medium sized business regarding a new database they want to create. They currently have multiple normalized source databases that need consolidation for reporting and analytics. What type of database would you recommend and why

Answers

Answer:

The enormous amount of data and information that a company generates and consumes today can become an organizational and logistical nightmare. Storing data, integrating it and protecting it, so that it can be accessed in a fluid, fast and remote way, is one of the fundamental pillars for the successful management of any company, both for productive reasons and for being able to manage and give an effective response to the customers.

Good big data management is key to compete in a globalized market. With employees, suppliers and customers physically spread across different cities and countries, the better the data is handled in an organization, the greater its ability to react to market demand and its competitors.

Databases are nowadays an indispensable pillar to manage all the information handled by an organization that wants to be competitive. However, at a certain point of development in a company, when growth is sustained and the objective is expansion, the doubt faced by many managers and system administrators is whether they should continue to use a database system, or if they should consider the leap to a data warehouse. When is the right time to move from one data storage system to another?

If your organization hires a new employee, what would you do to create a user account in the Linux system and add the account to a group? What commands would you use? What configuration files would you check and modify?

Answers

Following are the responses to this question:

The user account is "olivia".In the Linux system to see the account go to the "/home directory".For the configuration file we use ".bash_logout , .bash_profile, and .bashrc" files.

Creating users:

We will use the useradd command to achieve this. Using that same command, you can create users who would log in or customers who would log in (in the case of creating a user for a software installation).

In its basic form, the command is as follows:

[Options] useradd username

Take this user olivia, for instance. Assuming that you had been to issue the command prompt:

olivia has become a user.

Users are added to the system without the need for a home directory and are unable to log on. It if we were using this rather than running the command without arguments?

sudo using useradd -m olivia

Using the command above, a new user would be created, including a home directory that corresponded to the username. That means that you might now see the name "olivia" in the directory "/home".

But what about the lockout concern that was raised earlier? Both these methods are possible. After creating the user, you can enter the following command:

Password for olivia is: sudo passwd olivia

You'll be requested to enter & verify your new password once you've completed the process. This unlocks the user profile, allowing them to log in.

This command might look like if you wanted to accomplish it in one go:

sudo useradd -m olivia -p PASSWORD

You should be using Passcodes as the login for the user olivia.

As soon as the user logs in, he or she can update their account password by using the password command to input their current password, and afterward entering/verifying their new one.

To create a user that has no personal account and cannot log in, execute the following instructions:

sudo use useradd as  the-M USERNAME ​sudo use usermod as the -L USERNAME

The user to be added is identified by USERNAME.

It establishes a user with really no root folder and prevents them from signing in with a second operation.

To add an existing user to a group on Linux, follow the instructions:

As root, log in to your accountUse the useradd instruction to add a new user (for example, useradd roman)If you'd like to log on as a new customer, type su plus that user's name.Entering the word "exit" will logout you from your account.

Another way to add a user to a group under Linux would be to use the following syntax:

Alternatively, you can use the usermod command.The name of the club should be substituted for example group in this sentence.Example username should be replaced with the name of the user you'd like added.

The following operations are performed when a new login is added to the system.

The user's home directory (/home/username by default) is now created.To set configuration files for the user's session, the following secret files are copied into another user's home directory.

.bash_logout

.bash_profile

.bashrc

/var/spool/mail/username includes the user's mail spool.The new user account is arranged in groups with the same name.

Learn more:

Linux system: brainly.com/question/13843535

Write a program that repeatedly accepts as input a string of ACGT triples and produces a list of the triples and the corresponding amino acids, one set per line. The program will continue to accept input until the user just presses ENTER without entering any DNA codes.

Answers

Answer:

Explanation:

The following code is written in Python. I created a dictionary with all the possible gene combinations and their corresponding amino acids. The user then enters a string. The string is split into triples and checked against the dictionary. If a value exists the gene and amino acid is printed, otherwise an "Invalid Sequence" error is printed for that triple. The program has been tested and the output can be seen in the attached image below.

def printAminoAcids():

   data = {

       'TTT': 'Phe', 'TCT': 'Ser', 'TGT': 'Cys', 'TAT': 'Tyr',

       'TTC': 'Phe', 'TCC': 'Ser', 'TGC': 'Cys', 'TAC': 'Tyr',

       'TTG': 'Leu', 'TCG': 'Ser', 'TGG': 'Trp', 'TAG': '***',

       'TTA': 'Leu', 'TCA': 'Ser', 'TGA': '***', 'TAA': '***',

       'CTT': 'Leu', 'CCT': 'Pro', 'CGT': 'Arg', 'CAT': 'His',

       'CTC': 'Leu', 'CCC': 'Pro', 'CGC': 'Arg', 'CAC': 'His',

       'CTG': 'Leu', 'CCG': 'Pro', 'CGG': 'Arg', 'CAG': 'Gln',

       'CTA': 'Leu', 'CCA': 'Pro', 'CGA': 'Arg', 'CAA': 'Gln',

       'GTT': 'Val', 'GCT': 'Ala', 'GGT': 'Gly', 'GAT': 'Asp',

       'GTC': 'Val', 'GCC': 'Ala', 'GGC': 'Gly', 'GAC': 'Asp',

       'GTG': 'Val', 'GCG': 'Ala', 'GGG': 'Gly', 'GAG': 'Glu',

       'GTA': 'Val', 'GCA': 'Ala', 'GGA': 'Gly', 'GAA': 'Glu',

       'ATT': 'Ile', 'ACT': 'Thr', 'AGT': 'Ser', 'AAT': 'Asn',

       'ATC': 'Ile', 'ACC': 'Thr', 'AGC': 'Ser', 'AAC': 'Asn',

       'ATG': 'Met', 'ACG': 'Thr', 'AGG': 'Arg', 'AAG': 'Lys',

       'ATA': 'Ile', 'ACA': 'Thr', 'AGA': 'Arg', 'AAA': 'Lys'

   }

   string = input("Enter Sequence or just click Enter to quit: ")

   sequence_list = []

   count = 0

   gene = ""

   for x in range(len(string)):

       if count < 3:

           gene += string[x]

           count += 1

       else:

           sequence_list.append(gene)

           gene = ""

           gene += string[x]

           count = 1

   sequence_list.append(gene)

   for gene in sequence_list:

       if gene.upper() in data:

           print(str(gene.upper()) + ": " + str(data[gene.upper()]))

       else:

           print(str(gene.upper()) + ": invalid sequence")

printAminoAcids()

Which of these is a tool for creating mobile apps?

Appy Pie

C#

Apple Pie

C++

Answers

Answer:

C++

Explanation:

C++ is used in application development

During the data transmission there are chances that the data bits in the frame might get corrupted. This will require the sender to re-transmit the frame and hence it will increase the re-transmission overhead. By considering the scenarios given below, you have to choose whether the packets should be encapsulated in a single frame or multiple frames in order to minimize the re-transmission overhead.

Justify your answer with one valid reason for both the scenarios given below.

Scenario A: Suppose you are using a network which is very prone to errors.

Scenario B: Suppose you are using a network with high reliability and accuracy.

Answers

The packets would be encapsulated in single frame in scenario A. In scenario B, it should be in multi frames.

In scenario A, given that this network has been said to be prone to error, the packets should be encapsulated in single frames.

The reason for this is because, using a single frame helps to decrease error. We have been told already that it is prone to error. If you use the multi frame, there would be very high likelihood of errors occurring.

In scenario B, given that the network is accurate and very reliable, the best packet is the multi frame.

It would give a quicker transmission and the likelihood of errors occurring is also low.

Read more on https://brainly.com/question/24373056?referrer=searchResults

If Scheme were a pure functional language, could it include DISPLAY ? Why or why not?​

Answers

Answer:

When Scheme is a pure functional language, it cannot include the function DISPLAY. Since the pure functional languages will return the same value whenever the same expression is evaluated, and the DISPLAY would be the output and thus it cannot be part of the purely functional language. Thus in the pure functional language we can evaluate the expressions with the same arguments and it returns the same value since there is no state to change.

Explanation:

An engineer is designing an HTML page and wants to specify a title for the browser tab to display, along with some meta data on what tools the page should use. These items would best fit in which of the following sections

a. The element
b. The element
c. The

element
d. The

element

Answers

An HTML is made up of several individual tags and elements such as the head, body. form, frame and many more.

In an HTML page, the meta element and the title element are placed in the head element.

An illustration is as follows:

< head >

< title > My Title < /title >

 < meta charset="UTF-8" >

< / head >

The head element contains quite a number of elements and tags; some of them are:

metatitle stylescriptbase

And so on.

Hence, in order to use a meta-data element, the meta element has to be placed within the head element.

Read more about HTML elements at:

https://brainly.com/question/4484498

Why use LinkedIn automation for LinkedIn?

Answers

Answer:

Using LinkedIn automation tools to run successful outreach campaigns has become popular. It’s because these tools automate tedious networking tasks such as visiting profiles, collecting data, sending out bulk connection requests, messages, and follow-ups, etc.  

With the help of the latest LinkedIn automation tools, you can quickly perform all the repetitive tasks while saving yourself a lot of time that you can use on actual relationship building and lead nurturing tasks.  

However, LinkedIn isn’t really amused when using any bots or automation tools for LinkedIn.

Suppose we can buy a chocolate bar from the vending machine for $1 each. Inside every chocolate bar is a coupon. We can redeem six coupons for one chocolate bar from the machine. This means that once you have started buying chocolate bars from the machine, you always have some coupons. We would like to know how many chocolate bars can be eaten if we start with N dollars and always redeem coupons if we have enough for an additional chocolate bar.For example, with 6 dollars we could consume 7 chocolate bars after purchasing 6 bars giving us 6 coupons and then redeeming the 6 coupons for one bar. This would leave us with one extra coupon. For 11 dollars, we could consume 13 chocolate bars and still have one coupon left. For 2 dollars, we could have consumed 14 chocolate bars and have two coupons left.Write a program that inputs a value for N and outputs how many chocolate bars we can eat and how many coupons we would have left over. Use a loop that continues to redeem coupons as long as there are enough to get at least one chocolate bar.

Answers

Answer and Explanation:

Using JavaScript:

/* program should take N input which represents the dollar amount and output how many chocolate bars and how many coupons we have*/

function chocolatebar(dollars){

var dollaramt= dollars;

var i;

for(i=0; i <= dollaramt; i++){

i=i+6

?

Alert ("you have 1 extra chocolate bar");

:

Alert ("keep buying chocolate bars to get more coupons for a bonus chocolate bar")

}

}

*

Outlook 365 can be described as a personal information manager.
True or false

Answers

Answer:

True

Explanation:

The statement is True. The Microsoft Outlook 365 can be described as personal information manager.

What is Microsoft Outlook?

Microsoft Outlook is the software system, that allows the users to manage various personal and official information and data altogether at one place.

The Microsoft Outlook is known as personal information manager because it allows the users to managing task, providing calendar services, helps in emailing. It also manages contact and keeps the record of journal logs and many more.

Therefore, the statement regarding outlook 365 is True.

Learn more about Microsoft Outlook, here:

https://brainly.com/question/17457799

#SPJ5

what is the build in libary function to compare two strings?​

Answers

Answer:

strcmp() is a built-in library function and is declared in <string. h> header file. This function takes two strings as arguments and compare these two strings lexicographically.

Explanation:

Hope it helps

How to use the AI System ?

Answers

ANSWER:

· New artificial intelligence systems are being developed to help teachers administer more effective testing that could uncover some of these often-hidden conditions. Once they can be properly identified, educators can tap into the resources available for a learning disability. Students can use AI to give reliable feedback.

What is the iterative procedure of recursive and nonrecursive?

Answers

Answer:

nonrecursive

Explanation:

They are correct? thank you!

Answers

Answer:

[OPINION]

First one is correct.

For the second one, I think the leader should accept the invitation and forward it to the entire team. [As the team experienced success due to group work, so every team member should be invited... as the success was a result of the hardwork of every member]

About the third one, I think it depends on the person so you may be correct. But, if I was asked to choose I would have been chosen.... rational approach

This is just my opinion. Hope it helps you:)

When we have signals within 1-2 MHz band, using a waveguide is the most preferred choice for a transmission line. T or F?​

Answers

Answer:

T

Explanation:

Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the maximum number of hosts possible on each subnet.

Required:
a. What is the dotted decimal value for the subnet mask?
b. How many additional bits will you need to mask in the subnet mask?

Answers

The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.In this method, the subnetting separates the IP address between host and network addresses.The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address [tex]\bold{= 172.149.254.0 /24}[/tex]

Subnet numbers [tex]\bold{= 13}[/tex]

Calculating the borrow bits:

[tex]\to \bold{= ceil(\log_{2} 13) = 4 \ bits}[/tex]

a)

Calculating the dotted decimal value for the subnet mask:

[tex]\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\[/tex]

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

you are the network administrator for a college. wireless access is widely used at the college. you want the most secure wireless connections you can have. which of the following would you use?
A WPA
B WEP2
CWEP
D WPA2

Answers

Answer:

D. WPA2

Explanation:

Required

Of the 4 options, which is the most secured?

WPA was created as a solution to the vulnerabilities in WEP/WEP2. Then, WPA was upgraded to WPA2.

WPA2 is the least vulnerable to hacks because for every user that is connected to the network through WPA2, a unique encryption is made available for such connection.

Hence, the most secure connection, of the 4 is WPA2.

advantages of computational skill

Answers

Explanation:

algorithmic thinking - developing a set of instructions or sequence of steps to solve a problem;

evaluation - ensuring a solution is fit-for-purpose;

decomposition - breaking a problem down into its component parts;

If you were driving the blue Prius in the situation pictured above, explain why the red Mustang should be given right-of-way at this intersection.

Answers

Answer:

The red Mustang should be given the right-of-way at this intersection because:

The red Mustang arrived first before the blue Prius and is closer to the stop sign before the arrival of the blue Prius.  This implies that the red Mustang must have waited for its turn, unlike the blue Prius that just arrived at the intersection.

Explanation:

Traffic laws, regulations, and IPDE defensive driving strategy require that drivers always give way to the vehicle that arrived before them at an intersection.   Assuming that multiple vehicles reach the intersection simultaneously, then the vehicle must be given the right-of-way.  Alternatively, the traffic lights at the intersection should be obeyed and be allowed to regulate the movement of vehicles.  IPDE defensive driving strategy requires drivers to be watchful of their driving spaces to determine the appropriate time to move.

What is system software? Write its types.​

Answers

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Explanation:

thanks for question

Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid grades, and you want to ensure that you obtain 5 valid values from the user. Which nested loop structure would you use?
A. A "for" loop inside of a "while" loop
B. A "while" loop inside of a "for" loop
C. None of the above
D. Either a or b would work

Answers

The type of nested loop which I would use to write the program is:

B. A "while" loop inside of a "for" loop

What is a Loop?

This refers to the control flow statement which is used to iterate and lets a particular line(s) of code execute repeatedly

With this in mind, we can see that the type of nested loop which I would use to write the program is a "while" loop inside of a "for" loop because it is a conditional statement that continues to ask for the certain valid grades until it gets the right one.

Therefore, the correct answer is option B

Read more about loops here:
https://brainly.com/question/26098908

(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term ergonomics. (4) explain the following. a click b right click c double click d triple click e drag and drop​

Answers

Answer:

1.similarity:

they are both editing keys

3.ergonomics are designed keying devices that alleviates wrist strain experienced when using ordinary keyboard for long hours

4.

.a click is pressing and releasing the left mouse button onceright click is pressing the right mouse button once to display a short cut menu with commands from which a user can make a selectiondouble click is pressing the left button twice in rapid successiondrag and drop is where by the user drags an icon or item from one location on the screen to another.

Other Questions
In terms of its relations with neighboring powers, the Song Group of answer choices reconquered the northern region controlled by the Uighurs. met their ultimate demise at the hands of the Mongols. were able to maintain a permanent dominance over the Jin Dynasty of the Jurchens. learned from the mistakes of the Tang and avoided a similar fate. conquered Japan, the first time that this had happened. What was Civil Defense supposed to do for Americans? The Janitorial and Cafeteria departments are support departments. Samoa uses the sequential method to allocate support department costs, first allocating the costs from the Janitorial Department to the Cafeteria, Cutting, and Assembly departments. Determine the proportional (percentage) usage of the Janitorial Department by the: Barbara is the dean of the College of Business. She enjoys the pace of her work and the feeling of accomplishment she gets when she is able to initiate a new program to help students. She also appreciates her attractive salary, which allows her to travel abroad on her vacations. Barbara is What is the meaning of the word 'set' in the given sentence? The date of the test has not been set yet. 1. It cold today. James brought a dress & t-shirt for $85 and it is 5 times as much as t-shirt how much did James pay for the t-shirt. We studied English ................ten year. a) for b) by c) in A girl is travelling on her bike at a speed 2.59 m/s. If thegirl and her bike have a kinetic energy of 190 J, what isthe combined mass of the girl and her bike? Show allyour work the verticies of the triangle OAB are the origin O, A(-15,0) and B(0,8)What is the relationship between G and the triangle OABG(-7.5,4) What is the value of f ^-1 (0)? ( photo given ) PLEASE HELP ME, I would greatly appreciate it !!! The sum of two binomials is 12x2 5x. If one of the binomials is x2 2x, the other binomial is: 1. 11x2 7x. 2. 12x2 3x. 3. 11x2 3x. 4. None of these choices are correct. 4(x-3)+5x-x^2 for x=3 Please I need help!! 3._. I enjoy summer sports likewater skiing and baseball. The weather is usually sunny and hot, so I can go to the beachalmost every day. Gardening is my hobby and I spend many summer days working in mygarden. Unfortunately, the days pass too quickly in summer.A. I like to garden in summer.B. Summer is my favorite season.C. Summer is too short. asexual reproduction can be a disadvantage to a population if How many different numbers are possible?A personal identification number consists of 3 letters followed by 3 digits. The letters X, Y, and Z are not used and the last digit cannot be 0 or 9. PLEASE HELPP URGENT20 points!!! _______ equation can be written in the form ax2 + bx+c=0 where a, b, and c are real numbers, and a is a nonzero number. Fill in the blank. A) quadraticB) quartic C) linearD) cubicWrong answers WILL be reported. Thanks! Select the noun clause to complete the sentence.Mike will eat ____ tonight.A. After he finishes the projectB. His favorite meal for dinnerC. And wash the dishesD. Whatever his father cooks