You should see an error. Let's examine why this error occured by looking at the values in the "Total Pay" column. Use the type function and set total_pay_type to the type of the first item from the "Total Pay" column.

Answers

Answer 1

Answer:

See below

Explanation:

Under this topic of functions, this question has been precisely answered in a word file and attached as an image herewith (in proper format). Visualizations and CEO incomes are some of the applications of this concept.

The response to this part shows the relation between total pay and raw compensation.

Hope that answers the question, have a great day!

You Should See An Error. Let's Examine Why This Error Occured By Looking At The Values In The "Total

Related Questions

Which can be used to code a simple web page? CSS JavaScript Text editor Web browser

Answers

Answer:

option (C) Text editor is the correct answer in this question.

Explanation:Used to code a web page, an editor is required that  is a basic requirement.The other options are secondary ,text editors are provided with operating system and software development .Text editor specialized html editors can offer convenience and added functionality.Test editors require of html and any other web technology like Java script,and server-side scripting languages.

Answer:

It is text editor!

Explanation:

What is the main advantage of using DHCP? A. Allows you to manually set IP addresses B. Allows usage of static IP addresses C. Leases IP addresses, removing the need to manually assign addresses D. Maps IP addresses to human readable URLs

Answers

Answer: DHCP (dynamic host configuration protocol)  is a protocol which automatically processes the configuring devices on IP networks.It allows them to to use network services like: NTP and any communication proto cal based on UDP or TCP. DHCP assigns an IP adress and other network configuration parameters to each device on a network so they can communicate with  other IP networks. it is a part of DDI solution.

 

Explanation:

Without data compression, and focusing only on the data itself without any overhead, what transmission rate is required to send 30 frames per second of gray-scale images with resolution 1280 x 1024?

Answers

Answer:

315 Mbps

Explanation:

Given data :

30 frames per second

resolution = 1280 * 1024

what transmission rate is required can be calculated as

frames per second = rendered frames / number of seconds passed

30 = 30 / 1

Transmission rate = the rate at which the images are transmitted from source to destination =315 Mbps without data compression

A bit shift is a procedure whereby the bits in a bit string are moved to the left or to the right.
For example, we can shift the bits in the string 1011 two places to the left to produce the string 1110. Note that the leftmost two bits are wrapped around to the right side of the string in this operation.
Define two scripts, shiftLeft.py and shiftRight.py, that expect a bit string as an input.
The script shiftLeft shifts the bits in its input one place to the left, wrapping the leftmost bit to the rightmost position.
The script shiftRight performs the inverse operation.
Each script prints the resulting string.
An example of shiftLeft.py input and output is shown below:
Enter a string of bits: Hello world!
ello world!H
An example of shiftRight.py input and output is shown below:
Enter a string of bits: Hello world!
!Hello world

Answers

Answer:

Following are the code to this question:

Defining method shiftLeft:

def shiftLeft(bit_string): #defining method shiftLeft, that accepts parameter bit_string

   bit_string= bit_string[1:]+bit_string[0]#use bit_string to provide slicing

   return bit_string#return bit_string value

bit_string =input("Enter value: ")#defining bit_string variable for user input

print (shiftLeft(bit_string))#use print method to call shiftLeft method

Defining method shiftRight:

def shiftRight(bit_string):#defining method shiftRight, which accepts bit_string variable

bit_string=bit_string[len(bit_string)-1]+bit_string[0:len(bit_string)-1]#using bit_string variable for slicing

   return bit_string#return bit_string calculated value

bit_string= input("Enter value: ")#defining bit_string variable for user input

print(shiftRight(bit_string))#use print method to call shiftLeft method

Output:

Please find the attachment.

Explanation:

method description:

In the above-given python code two methods "shiftLeft and shiftRight" are declared, in which both the method accepts a string variable "bit_string". Inside methods, we use the slicing, in which it provides to use all the sequence values and calculated the value in this variable and return its value.  At the last step, the bit_string variable is used to input value from the user end and call the method to print its value.

Discuss the differences between dimensionality reduction based on aggregation and dimensionality reduction based on techniques such as PCA and SVD.

Answers

Answer:

Following are the difference to this question can be defined as follows:

Explanation:

In terms of projections of information into a reduced dimension group, we can consider the dimension structure of PCA and SVD technologies.  In cases of a change in the length, based on consolidation, there's also a unit with dimensions. When we consider that the days have been aggregated by days or the trade of a commodity can be aggregated to both the area of the dimension, accumulation can be seen with a variance of dimension.

Dimensionality reduction based on aggregation involves selection of important character and variable from a large variable and dimensionality reduction based on techniques with the use of PCA and SVD.

What is dimensionality?

Dimensionality involves reducing features that have been written or identified or constructing less features from a pool of important features.

Principal components analysis(PCA) and Single value decomposition(SVD) is a form or analysis that can be used to reduce some character that are not important to an information and can also help to select important variables from among many variables.

Therefore, dimensionality reduction based on aggregation involves selection of important character and variable from a large variable and dimensionality reduction based on techniques with PCA and SVD.

Learn more on dimensional analysis here,

https://brainly.com/question/24514347

The statistical report is typically used to set targets for the organization's expenditures for the year and then report actual costs on a monthly or quarterly basis.
A. True
B. False

Answers

Answer:

False

Explanation:

Budget and Financial reports are used to set targets for organization's expenditure. These reports display cost and expenditures related to all assets, raw material, inventory of the organization. The variance is then calculated based on targeted figures and the actual expenses. The deviation from target is found by the variance and then actions are taken for it. Managers rely heavily on these reports. Statistical reports are non financial reports. These focus on customer satisfaction, employee performance, staff turnover rate and assets performance.

Suppose that an engineer excitedly runs up to you and claims that they've implemented an algorithm that can sort n elements (e.g., numbers) in fewer than n steps. Give some thought as to why that's simply not possible and politely explain

Answers

Answer:

The summary including its given problem is outlined in the following section on the interpretation.

Explanation:

That's not entirely feasible, since at least n similarities have to be made to order n quantities. Find the finest representation where the numbers of 1 to 10 have already been arranged.

⇒ 1 2 3 4 5 6 7 8 9 10

Let's say that we identify one figure as the key then compared it towards the numbers across the left. Whether the correct number is greater, therefore, left number, are doing nothing to switch the location elsewhere.

Because although the numbers have already been categorized 2 has always been compared to 1 which would be perfect, 3 becomes especially in comparison to 2 and so much more. This should essentially take 9 moves, or nearly O(n) moves.

If we switch that little bit already

⇒ 1 3 2 4 5 6 7 8 9 10

3 Is contrasted with 1. 2 will indeed be matched against 3 as well as 2. Since 2 has indeed been exchanged, it must, therefore, be matched with 1 as there might be a case whereby each number z exchanged is greater than the number Y as well as the quantity X < Y.

X = 1, Y = 3, and Z = 2.

Only one adjustment expanded the steps which culminated in n+1.

It should be noted that it won't be possible because at least n similarities have to be made to order n quantities.

From the information given, it should be noted that it's not possible for the engineer to implement an algorithm that can sort n elements (e.g., numbers) in fewer than n steps.

This is because there are at least n similarities have to be made to order n quantities. In this case, the numbers of 1 to 10 have already been arranged. When a number is greater, it should be noted that the left number will do nothing to switch the location elsewhere.

Therefore, the information given by the engineer isn't feasible.

Learn more about algorithms on:

https://brainly.com/question/24953880

A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single statement that assigns num_ones with the number of distributed one-dollar bills given amount_to_change. Hint: Use %. Sample output with input: 19 Change for $ 19 3 five dollar bill(s) and 4 one dollar bill(s)

Answers

Answer:

num_ones = amount_to_change % 5

Explanation:

It is given that the cashier has to change the money in the maximum number of 5 dollar bills and remaining as $1 bills.

We have to write a single statement of code to assign the value to variable num_ones to find the value of $1 bills given amount_to_change.

Let us solve this by taking example:

If amount_to_change = $19

Then total number of $5 bills that can be given is 3. And amount that can be given as $5 bills is [tex]\bold{3 \times 5 = \$15}[/tex]

So, the remaining amount i.e. $19 - $15 = $4 will be given as one dollar bills.

Out of these $19, 4 bills of $1 can be found using the Modulus (%) operator.

Modulus operator leaves the remainder i.e.

Output of p % q is the remainder when a number 'p' is divided by 'q'.

19 % 5 = 4

4 is the number of one dollar bills to be given.

So, single line of code for the number of one dollar bills can be written as:

num_ones = amount_to_change % 5

Let us try it for amount_to_change  = $30

We know that 6 number of $5 bills can be used to change the amount of $30 and no one dollar bill required.

num_ones = 30 % 5 = 0 (because 30 is completely divisible by 5 so remainder is 0)

So, the correct statement is:

num_ones = amount_to_change % 5

Rosseta Technologies, an information technology service provider to a company based out of Germany, allows its employees to work from home twice a month. Its major concern is the leakage of confidential data from the laptops or an employee making copies of sensitive files on his personal laptop. Which of the following would help the firm enforce access controls and storage guidelines on its laptops?
a. Anenterprise search software
b. A binary search tool
c. A perceptive software pack
d. A Domain search engine

Answers

Answer:

a. An enterprise search software.

Explanation:

In this scenario, Rosseta Technologies, an information technology service provider to a company based out of Germany, allows its employees to work from home twice a month. In order to prevent the leakage of confidential data from the laptops or an employee making copies of sensitive files on his personal laptop, Rosetta technologies should use an enterprise search software.

Enterprise search software is a computer application which is typically used to make relevant data from sources, such as a database, file system and intranet searchable to a specific or defined group of people.

An enterprise search software would help the firm enforce access controls and storage guidelines on its laptops.

On enterprise search software, there are basically two (2) ways to enforce access controls as a security policy on users;

1. Early binding: at the index stage, permissions are analyzed and ascribed to each document in the enterprise search software.

2. Late binding: it involves the process of analyzing permissions and ascribing them to each document at the query stage in the enterprise search software.

Enterprise projects developing Mobile applications are more concerned with security than small scale app development because

Answers

Answer:

Security is a major concern for organisations.

Explanation:

Developing mobile application for companies is usually centered on security because of the fear of beach of sensitive company information.

For example, a company may need to decide what measures to put in place that can prevent or reduce data breaches. They may either give employees customize devices with already installed mobile applications or provide unique login details to employees to access the Enterprise mobile application on their own phone.

What are the links between the operating systems, the software, and hardware components in the network, firewall, and IDS that make up the network defense implementation of the banks' networks.

Answers

Answer:

In several organizations, the operating system (OS) functions at the core of the personal computers in use and the servers. The OS ought to be secure from external threats to its stored data and other resources.

Explanation:

In this regard, Intrusion detection systems play a critical role in protecting the sensitive data, along with software firewalls. Hardware firewalls protect the hardware elements in the network (such as storage drivers etc), the IDS and as well as the IPS.

What are some of the common security weaknesses inherent in Unix or Linux based systems and what techniques can be used to harden these systems against an attack?

Answers

Answer:

The answer is below

Explanation:

1.  Lack of password enforcement

2.  Outdated third party applications: this includes outdated software such as Apache, PHP, MySQL, OpenSSL, and VNC

3.  General lack of patch management for the OS

4.  General lack of system hardening:

5.  Lack of backups

Ways to hardened the Linux/Unix based computer system is do the following:

1.  Perform minimal Installation: this involves, installing softwares that are necessary, and limiting the number of admin users on the computer system.

2.  Carry out Code Auditing: this is a means of preventing security issues, by withing more secure softwares to prevent variable declarations, or otherwise unexpected logic.

3.  Ensure there is a Traffic filter firewall: this will helps to attacks from external users or hackers. Install, Web Applicatio firewall, which helps to filter out traffic.

4.  Carry out Softwares updates: a software update can help prevent or guide against security leaks in a software

5.  Install security updates only: this is done by filtering out the security-related programs and only upgrade packages which are referred to in the custom file.

Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what is the number of page faults for the given reference string?

Answers

Answer:

223 8s an order of algorithm faults refrénce fifio 14 suppose in 14 and 123 no need to take other numbers

The IT department sets up a user account and software. Which stage of the hardware lifecycle does this situation belong to?

Answers

Answer:

"Development" would be the correct answer.

Explanation:

All that would be required to complete the plan is designed mostly during the development or planning process. The production process is finished whenever it's prepared to resume execution.Local participants and perhaps suppliers are helped to bring in, a timetable would be managed to make, parts and equipment are decided to order, employee training should be given and many more.

Write a function wordcount() that takes the name of a text file as input and prints the number of occurrences of every word in the file. You function should be case-insensitive so 'Hello' and 'hello' are treated as the same word. You should ignore words of length 2 or less. Also, be sure to remove punctuation and digits.
>>>wordcount('frankenstein.txt')
artifice 1
resting 2
compact 1
service 3

Answers

Answer:

I am writing a Python program. Let me know if you want the program in some other programming language.        

import string  #to use string related functions

def wordcount(filename):  # function that takes a text file name as parameter and returns the number of occurrences of every word in file

   file = open(filename, "r")  # open the file in read mode

   wc = dict()  # creates a dictionary

   for sentence in file:  # loop through each line of the file

       sentence = sentence.strip()  #returns the text, removing empty spaces

       sentence=sentence.lower() #converts each line to lowercase to avoid case sensitivity

       sentence = sentence.translate(sentence.maketrans("", "", string.punctuation))  #removes punctuation from every line of the text file

       words = sentence.split(" ")  # split the lines into a list of words

       for word in words:  #loops through each word of the file

           if len(word)>2:  #checks if the length of the word is greater than 2

               if word in wc:  # if the word is already in dictionary

                   wc[word] = wc[word] + 1  #if the word is already present in dict wc then add 1 to the count of that word

               else:  #if the word is not already present

                   wc[word] = 1  # word is added to the wc dict and assign 1 to the count of that word                

   for w in list(wc.keys()):  #prints the list of words and their number of occurrences

       print(w, wc[w])  #prints word: occurrences in key:value format of dict        

wordcount("file.txt") #calls wordcount method and passes name of the file to that method

Explanation:

The program has a function wordcount that takes the name of a text file (filename) as parameter.

open() method is used to open the file in read mode. "r" represents the mode and it means read mode. Then a dictionary is created and named as wc. The first for loop, iterates through each line (sentence) of the text file. strip() method is used to remove extra empty spaces or new line character from each sentence of the file, then each sentence is converted to lower case using lower() method to avoid case sensitivity. Now the words "hello" and "Hello" are treated as the same word.

sentence = sentence.translate(sentence.maketrans("", "", string.punctuation))  statement uses two methods i.e. maketrans() and translate(). maketrans() specifies the punctuation characters that are to be deleted from the sentences and returns a translation table. translate() method uses the table that maketrans() returns in order to replace a character to its mapped character and returns the lines of text file after performing these translations.

Next the split() method is used to break these sentences into a list of words. Second for loop iterates through each word of the text file. As its given to ignore words of length 2 or less, so an IF statement is used to check if the length of word is greater than 2. If this statement evaluates to true then next statement: if word in wc:   is executed which checks if the word is already present in dictionary. If this statement evaluates to true then 1 is added to the count of that word. If the word is not already present  then the word is added to the wc dictionary and 1 s assigned to the count of that word.

Next the words along with their occurrences is printed. The program and its output are attached as screenshot. Since the frankenstein.txt' is not provided so I am using my own text file.

As a security engineer, compare and contrast the pros and cons of deploying hetero vs homogenous networks. Which costs more? Which offers more protection? Why?

Answers

Answer:

See below

Explanation:

In case of a homogeneous network, Skype is an example and OpenTable is an example of a heterogeneous network.

Homogeneous networks are easier to get started with since its all pre-integrated, and even the troubleshooting is more convenient if a problem arises. However, it then becomes a security concern if you choose to place all that power to a single vendor - known as ' monoculture'. One event can affect the entire network. On the other hand, a heterogeneous set up does not run this risk. Several different components are utilized which are not as vulnerable to security threats.

In conclusion, homogeneous networks cost more and heterogeneous networks are more secure.

____ enable users to create and edit collaborative Web pages quickly and easily; they are intended to be modified by others and are especially appropriate for collaboration.

Answers

Answer:

Wikis

Explanation:

Wikis can be defined as a database that was designed by users which gives users the opportunity to add, edit and delete collaborative web pages easily.

It lets users to manage contents easily and they are used to create static websites.

some wikis can be accessed by the public. A great example is Wikipedia.

Wikis allows publishing and sharing of documents to be done easily.

Create an application in Java that asks a user for a number of hours, days, weeks, and years. It then computes the equivalent number of minutes (ignoring leap years)

Answers

Answer:

The program written in Java is as follows;

The program takes input for hours, days, weeks and months;

Then the inputs are converted to minutes individually and then summed up

For you to better understand the program,  made use of comments to explain difficult lines,

The program is as follows

import java.util.*;

public class Assignment{

public static void main(String []args){

//This line declares all variables

int hours, days, weeks, years;

Scanner input = new Scanner(System.in);

//This line prompts user for hours input

System.out.print("Hours: ");

//This line accepts input for hours

hours = input.nextInt();

//This line prompts user for days  input        

System.out.print("Days: ");

//This line accepts input for days

days = input.nextInt();

//This line prompts user for weeks input

System.out.print("Weeks: ");

//This line accepts input for weeks

weeks = input.nextInt();

//This line prompts user for years input

System.out.print("Years: ");

//This line accepts input for years

years = input.nextInt();

//This line converts hours to minute

int minute = 60 * hours + 1440 * days + 10080 * weeks + 525600 * years;

//This line prints the equivalent minute of user input

System.out.println(minute +" minutes");

}

}

7.8 LAB: Palindrome A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome.

Answers

Answer:

word = input("Write a word: ").strip().lower()

without_space = word.replace(" ","")

condition = without_space == without_space[::-1]

print("Is %s palindrome?: %s"%(word,condition))

"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence. Create a for loop that compares the two strings. For each match, add one point to user_score. Upon a mismatch, end the game. Ex: The following patterns yield a user_score of 4: simonPattern: R, R, G, B, R, Y, Y, B, G, Y userPattern: R, R, G, B, B, R, Y, B, G, Y

Answers

Answer:

user_score = 0  #user score is initialized to 0

simonPattern = 'RRGBRYYBGY'# stores the sequence of characters in simonPattern

userPattern  = input("Enter user pattern: ")  # prompts the user to enter user pattern and stores the pattern in userPattern

for x in range(len(simonPattern)):  #loops through entire length of simonPattern using x as index variable

   if userPattern[x] == simonPattern[x]:  # checks if the element at x-th index of userPattern matches the element at x-th index of simonPattern

       user_score = user_score + 1  # adds 1 to user score if above if condition evaluates to true

   else:  #if a mismatch occurs  

       break  #loop break if mismatch occurs

print("User Score:",user_score) #prints the computed user score

Explanation:

The program first declares a simonPattern string variable and assign it a sequence of characters. You can also prompt to enter the Simon pattern as

simonPattern = input("Enter Simon pattern:")

If you want to hard code the values of both simonPattern and userPattern then change the first two statements after user_score =0 statement as:

simonPattern = 'RRGBRYYBGY'

userPattern  = 'RRGBBRYBGY'

Now I will explain the working of the for loop.

for x in range(len(simonPattern)):

len method is used which returns the length of the string stored in simonPattern. For example if simonPattern = 'RRGBRYYBGY' then len returns 10

range method is used to generate a sequence of numbers for x. This means value of x starts from 0 and it  keeps incrementing to 1 until the length of the simonPattern is reached.

At first iteration:

Let suppose user enters the pattern: RRGBBRYBGY

x starts at index 0. Value of x=0 is less than the length of simonPattern i.e. 10 so the body of loop executes. The body of loop contains the following if statement:

if userPattern[x] == simonPattern[x]:

It matches both the string for the value of x.

if userPattern[0] == simonPattern[0]:

First character (at 0th index) of userPattern is R and in simonPattern is also R so this statement executes:  user_score = user_score + 1  which adds 1 to the user_score. So user_score=1

Next iteration:

x=1

if userPattern[1] == simonPattern[1]:

Second character (at 1st index) of userPattern is R and in simonPattern is also R so this statement executes:  user_score = user_score + 1  which adds 1 to the user_score. So user_score=2

Next iteration:

x=2

if userPattern[2] == simonPattern[2]:

Third character (at 12nd index) of userPattern is G and in simonPattern is also G so this statement executes:  user_score = user_score + 1  which adds 1 to the user_score. So user_score=3

Next iteration:

x=3

if userPattern[3] == simonPattern[3]:

Fourth character (at 3rd index) of userPattern is B and in simonPattern is also B so this statement executes:  user_score = user_score + 1  which adds 1 to the user_score. So user_score=4

Next iteration:

x=4

if userPattern[4] == simonPattern[4]:

Fifth character (at 4th index) of userPattern is B and in simonPattern is R so the if part does not execute and program moves to the else part which has a break statement which means the loop break. The next print(user_score) statement print the value of user_score. As user_score=4 computed in above iterations so output is:

User Score: 4

Answer:

The other answer was so close, but the _ was left out so the answer was wrong.

Written in Python:

user_score = 0

simon_pattern = input()

user_pattern  = input()

for x in range(len(simon_pattern)):

   if user_pattern[x] == simon_pattern[x]:

       user_score = user_score + 1

   else:

       break

print('User score:', user_score)

Explanation:

Write a split_check function that returns the amount that each diner must pay to cover the cost of the meal. The function has 4 parameters: bill: The amount of the bill. people: The number of diners to split the bill between. tax_percentage: The extra tax percentage to add to the bill. tip_percentage: The extra tip percentage to add to the bill.

Answers

Answer:

def split_check(bill, people, tax_percentage, tip_percentage):

   tax = bill * tax_percentage

   tip = bill * tip_percentage

   

   total_bill = bill + tax + tip

   

   return total_bill / people

Explanation:

Create a function called split_check that takes four parameters, bill, people, tax_percentage, and tip_percentage

Inside the function, calculate the tax, multiply bill by tax_percentage. Calculate the tip, multiply bill by tip_percentage. Calculate the total_bill, sum bill, tax, and tip. Finally, return the total_bill / people which gives the amount each diner needs to pay.

Assemble a Server computer based on your budget (state the amount in Ghana Cedis), discussing the type of components (giving their exact names, model numbers, types, cost, architecture, etc.) you would need and give reasons why you need them. ​

Answers

Answer:

Following are the answer to this question:

Explanation:

The server would be generally a powerful processor instead of a desktop pc. It must choose the Dell server browser to choose a server for industrial applications.

Dell Poweredge R730 has been its pattern.  There should be the reason whether these servers are efficient, available, flexible, and support the concept of even a virtual environment.  Its same servers are easy to use, as well as the memory will be connected to this server is 8 TB.

NMCI is the name used for a large-scale effort to link Navy and Marine Corps computer systems on bases, boats, and in offices around the world. When completed, this internal WAN will use Internet technology to link soldiers in the field with support personnel on bases, etc. NMCI is an example of a(n):

Answers

Answer:

The answer is "Intranet".

Explanation:

The intranet becomes an information exchange computer network, in which the resources collaborate with OS and other computing infrastructure within the organization. It is usually done without access from third parties and primarily uses for analysis of the data.

Here, the NMCI links the computer network of navy and maritime bodies on the bases of both the boats and the regional offices, that's why we can say that it is the example of the Internet.

Write a program to help a travelling sales person keep up with their daily mileage driven for business. In your main method, the program should first ask the user how many days of mileage they want to enter and then collect the user input for each day's miles, storing the values entered in an appropriately sized array.

Answers

Answer:

The programming language is not stated;

The program written in C++ is as follows (See Explanation Section for detailed explanation);

#include<iostream>

using namespace std;

int main()

{

 int numdays;

 cout<<"Number of days of mileage: ";

 cin>>numdays;

 int miles[numdays];

for(int i=0;i<numdays;i++)

{

 cout<<"Miles traveled on day "<<i+1<<": ";

 cin>>miles[i];

}

 int total = 0;

 for(int i=0;i<numdays;i++)

{

 total+=miles[i];

}

cout<<"Total mileage traveled: "<<total;

 return 0;

}

Explanation:

This line declares the number of days of mileage

 int numdays;

This line prompts user for days of mileage

 cout<<"Number of days of mileage: ";

This line accepts input from the traveler for days of mileage

 cin>>numdays;

This line creates an array

 int miles[numdays];

The italicized is an iteration that collects the user input for each day

for(int i=0;i<numdays;i++)

{

 cout<<"Miles traveled on day "<<i+1<<": ";

 cin>>miles[i];

}

This line initializes variable to 0

 int total = 0;

The italicized is an iteration that adds up the mileage traveled by the traveler each day  

 for(int i=0;i<numdays;i++)

{

 total+=miles[i];

}

This line prints the total miles traveled

cout<<"Total mileage traveled: "<<total;

State and briefly explain six (6) elements of network documentation

Answers

Answer:

I am in the world

Explanation:

monkey is the very largest monkey in the world at Tilak was the captain of the school football team Sudheer and Tilak did not get along at first because he was not a friendly boy

Write a method isSorted that accepts a stack of integers as a parameter and returns true if the elements in the stack occur in ascending (non-decreasing) order from top to bottom, and false otherwise.

Answers

Explanation:

bottom [20, 20, 17, 11, 8, 8, 3, 21 top the following stack is not sorted (the 15 is out of place), so passing it to your method should return a result of false: bottom [18, 12, 15, 6, 11 top an empty or one-element stack is considered to be sorted. when your method returns, the stack should be in the same state as when it was passed in. in other words, if your method modifies the stack, you must restore it before returning.

Multiply each element in origList with the corresponding value in offsetAmount. Print each product followed by a semicolon (no spaces). Ex: If the input is: 4 5 10 12 2 4 7 3 the output is: 8; 20;70; 36; 1 #include 2 3 int main(void) { 4 const int NUM_VALS = 4; 5 int origList[NUM_VALS]; 6 int offsetAmount [NUM_VALS]; 7 int i; 8 9 scanf("%d", &origList[0]); 10 scanf("%d", &origList[1]); 11 scanf("%d", &origList[2]); 12 scanf("%d", &origList[3]); 13 14 scanf("%d", &offsetAmount[0]); 15 scanf("%d", &offsetAmount[1]); 16 scanf("%d", &offsetAmount[2]); 17 scanf("%d", &offsetAmount[3]); 18 19 \* Your code goes here */ 20 21 printf("\n"); 22 23 return 0; 24

Answers

Answer:

Replace /* Your code goes here */  with

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

    printf("%d", origList[i]*offsetAmount[i]);

printf(";");

}

Explanation:

The first line is an iteration statement iterates from 0 till the last element in origList and offsetAmount

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

This line calculates and print the product of element in origList and its corresponding element in offsetAmount

    printf("%d", origList[i]*offsetAmount[i]);

This line prints a semicolon after the product has been calculated and printed

printf(";");

Iteration ends here

}

Create an application in Java that asks a user for a number of hours, days, weeks, and years. It then computes the equivalent number of minutes (ignoring leap years).

Answers

Answer:

//import the Scanner class

import java.util.Scanner;

//Begin class definition

public class NumberOfMinutes{

    //Begin main method

    public static void main(String []args){

   

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //initialize a variable nm to hold the number of minutes

       int nm = 0;

       

       //Prompt the use to enter the number of hours

       System.out.println("Please enter the number of hours");

       

       //Receive the input using the Scanner object and

       //Store the entered number of hours in a variable nh

       int nh = input.nextInt();

       

       //Prompt the user to enter the number of days

       System.out.println("Please enter the number of days");

       

       //Receive the input using the Scanner object and

       //Store the entered number of days in a variable nd

       int nd = input.nextInt();

       

       //Prompt the user to enter the number of weeks

       System.out.println("Please enter the number of weeks");

       

       //Receive the input using the Scanner object and

       //Store the entered number of weeks in variable nw

       int nw = input.nextInt();

       

       //Prompt the user to enter the number of years

       System.out.println("Please enter the number of years");

       

       //Receive the input using the Scanner object and

       //Store the entered number of years in a variable ny

       int ny = input.nextInt();

       

       //Convert number of hours to minutes and

       //add the result to the nm variable

       nm += nh * 60;

       

       //Convert number of days to minutes and

       //add the result to the nm variable

       nm += nd * 24 * 60;

       

       //Convert number of weeks to minutes and

       //add the result to the nm variable

       nm += nw * 7 * 24 * 60;

       

       //Convert number of years to minutes and

       //add the result to the nm variable

       nm += ny * 52 * 7 * 24 * 60;

       

       //Display the number of minutes which is stored in nm

       System.out.println("The number of minutes is " + nm);

    }   //End main method

}  //End of class definition

Sample Output:

Please enter the number of hours

>>12

Please enter the number of days

>>2

Please enter the number of weeks

>>4

Please enter the number of years

>>5

The number of minutes is 2664720

Explanation:

The code contains comments explaining every line of the program. Please go through the comments. The actual lines of executable code are written in bold face to distinguish them from comments.

A sample output has also been provided above. Also, a snapshot of the program file, showing the well-formatted code, has been attached to this response.

Can someone help me out with this one? I'm not sure why my code is not working
Now, let's improve our steps() function to take one parameter
that represents the number of 'steps' to print. It should
then return a string that, when printed, shows output like
the following:
print(steps(3))
111
222
333
print(steps(6))
111
222
333
444
555
666
Specifically, it should start with 1, and show three of each
number from 1 to the inputted value, each on a separate
line. The first line should have no tabs in front, but each
subsequent line should have one more tab than the line
before it. You may assume that we will not call steps() with
a value greater than 9.
Hint: You'll want to use a loop, and you'll want to create
the string you're building before the loop starts, then add
to it with every iteration.
Write your function here
def steps(number):
i = 1
while i < number + 1:
string = str(i) * 3
string1 = str(string)
if i != 0:
string1 = (i * 4*' ' + "\b" + "\b" + "\b" + "\b") + string
elif i == 1:
string1 = string
print(string1)
i = i + 1
#The following two lines will test your code, but are not
#required for grading, so feel free to modify them.
print(steps(3))
print(steps(6)

Answers

Answer:

Add this statement at the end of your steps() function

return ""

This statement will not print None at the end of steps.

Explanation:

Here is the complete function with return statement added at the end:

def steps(number):  # function steps that takes number (number of steps to print) as parameter and prints the steps specified by number

   i = 1  #assigns 1 to i

   while i < number + 1:  

       string = str(i) * 3  #multiplies value of i by 3 after converting i to string

       string1 = str(string)  # stores the step pattern to string1

       if i != 0:  # if the value of i is not equal to 0

           string1 = (i * 4*' ' + "\b" + "\b" + "\b" + "\b") + string  #set the spaces between steps

       elif i == 1:  # if value of i is equal to 1

           string1 = string  #set the string to string1

       print(string1)  # print string1

       i = i + 1  # increments i at each iteration

   return "" #this will not print None at the end of the steps and just add a an empty line instead of None.

Screenshot of the corrected program along with its output is attached.

coefficient of x in expansion (x+3)(x-1)

Answers

Answer:

[tex]\boxed{2}[/tex]

Explanation:

[tex](x+3)(x-1)[/tex]

Expand the brackets.

[tex]x(x-1)+3(x-1)[/tex]

[tex]x^2-x+3x-3[/tex]

Combine like terms.

[tex]x^2+2x-3[/tex]

The coefficient of [tex]x[/tex] is [tex]2[/tex].

Other Questions
The shape of a garden is rectangular at the center and semicircular at the ends. Find the area and perimeter of this garden { length of the rectangle is 20 - (3.5+3.5) meters} The First, correct answer gets BRAINLIEST A submarine is 58.8 m from a whale. The sub sends out a sonar ping to locate the whale. The speed of sound underwater is 1520 m/s. How much time does it take for the sound wave to travel to the whale and back? (Unit = s) What is the solution to the inequality below?x < 49 A firm expects to sell 25,200 units of its product at $11.20 per unit and to incur variable costs per unit of $6.20. Total fixed costs are $72,000. The total contribution margin is: Solve this quadratic equation using the quadratic formula. 3x2 + 5x + 1 = 0 list and explain the types of legislation Pls i need help! If 3 is added to the absolute value of the product of a number and 9, the result is 4. FInd the Slope and y-intercept3y-x=18 Para esta actividad, you just need to conjugate the reflevive verbs below, including the vosotros/as form. Keep in mind that some of the verbs are -ar, -er, and -ir and some are stem-changing verbs when conjugated. Repasa! Ejemplo: cuidarse (to take care of oneself) yo: me cuido t: te cuidas l / ella: se cuida Nosotros: cuidamos Vosotros/as: os cuidis ellos/ellas: se cuidan Verbos para conjugar: 1. afeitarse 2. ducharse 3. peinarse 4. dormirse (o - ue stem) 5. vestirse (e - i stem) 6. ponerse Find the local and global extrema for the polynomial function f whose complete graph is provided. The graph of f(x)=4x^3-13x+9x+2 is shown below. How many roots of f(x) are rational numbers? Quick Please!!!! Cul de las siguientes oraciones NO es verdadera? Ella muri en los Estados Unidos. Ella escribi poemas sobre la muerte. Ella trabaj para el gobierno por 25 aos. Ella escribi poemas sobre nios. Tailoring movies slightly to appeal to different markets, such as editing Iron Man 3 for China, best reflects which kind of international strategy? A geographer who studies how people learn to live with nature's challenges, like cold weather, most often studies which of the six essential elements of geography? A. environment and society .B. the world in spatial terms .C. physical systems .D. the uses of geography. Which BEST describes how the editorial format affects the reader's understanding of the topic?es ) 0:A:A)The reader encounters entertaining writing from the author aimed atgetting the reader to laugh about the topic.B)The reader encounters persuasive writing from the author aimed at gettingthe reader to adopt the writer's point of view.The reader encounters artistic writing from the author aimed at getting thereader to see the beauty and aesthetic value of the topic.DThe reader encounters informative writing from the author aimed atgetting the reader to know as much about all sides of the debate aspossible. Find the ratio in which the line joining the points (2, 4, 16) and (3, 5, -4) is divided by the plane 2x 3y+ z+ 6 = 0. Also find the co-ordinates of the point of division Is my answer correct. If not, what is the answer ? Thank you what is the distance between the points (4, 5) and (10, 13) on a coordinte plane a. 12 units b. 8 units c. 10 units d. 14 units Chad washes windows after school to make some extra money. He charges $5.50 to wash each window. If the customer provides the supplies, Chad deducts $3.25 from the total cost. One customer paid a total of $27.50 and did not provide supplies. Which equation could be used to find the number of windows, w , that Chad washed for this customer? A) 5.5 w + 3.25 = 27.5 B) 5.5 w - 3.25 = 27.5 C) 5.5 w = 27.5 D) 5.5 - 3.25 w = 27.5 What is the main function of this organelle in the cell?A. To store enzymes that break down foodB. To store food and other materials inside the cellC. To provide the cell with energy for its activitiesD. To hold and protect the cell's DNA