Write a function called name_facts that will take a firstname (string) as an input parameter, and print out various facts about the name, including:
1) its length, 2) whether it starts with the letter A, and 3) whether it contains a Z or X.
To gain full credit for this exercise, you must use string formatting to print out the result. Hints: You will probably want to convert the string to lowercase when checking conditions 2 and 3. You can get by without it, but you'll have to make sure you check both lower and uppercase versions of the letters. You will have to use the in operator for condition 3. You will also probably want to make a separate message for conditions 2 and 3 (depending on the answer) and use string formatting to join them into the final message.

Answers

Answer 1

Answer:

def name_facts(firstname):

   print("Your name is",len(firstname),"letters long",end=", ")

   if(firstname[0] == 'A'):

       print("does start with the letter A",end=", ")

   else:

       print("does not start with the letter A", end=", ")

   if(firstname.count('Z')>0 or firstname.count('X')>0):

       print("and does not contain a Z or X")

   else:

       print("and does not contain a Z or X")

#Testing

name_facts("Allegra")

name_facts("Xander")

Explanation:

Answer 2

Answer:

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare firstname

string firstname;

//Prompt to enter firstname

cout<<"What's your first name: ";

// Accept input

cin>>firstname;

// A. Get string's length

int length = firstname.length();

// Print length

cout<<"Length = "<<length<<endl;

// Copy string to chat array

char char_array[length + 1];

// copying the contents of the string to char array

strcpy(char_array, firstname.c_str());

// B. Check if it starts with letter A

if(char_array[0] == 'A')

{

cout<<"Your Firstname begins with letter A"<<endl;

}

else

{

cout<<"Your Firstname doesn't begin with letter A"<<endl;

}

// Check if it contains X or Z

int k = 0;

for (int i = 0; i < n; i++) {

if(char_array[i] == 'Z' || char_array[i] == 'X')

{

k++;

}

if(k == 0)

{cout<<"Your Firstname doesn't contain Z or X";}

else

{cout<<"Your Firstname contains Z or X";}

}

return 0;

}


Related Questions

You are asked by your supervisor to export NPS configuaration from a server. Your supervisor contacts you and tells you it is missing the log files. What must you do to provide your supervisor with the NPS log files?

Answers

Answer:

You must import the NPS configurations, then manually cnfigure the SQL Server Logging on the target machine.

Explanation:

The SQL Server Logging settings are not in anyway exported. If the SQL Server Logging was designed on the root machine, the a manually configure of SQL Server Logging has to be done on the target machine after the NPS configurations must have been imported.

Although administrator rights is needed at least to import and export NPS settings and configurations, while that isn’t the issue in this case. NPS configurations are moved to a XML file that is non-encrypted by default. There is no wizard or tool whatsoever to export or import the configuration files.

In the lab, you wrote a four-paragraph __________ that summarized your findings, described the approach and prioritization of critical, major, and minor risk assessment elements, included a risk assessment and risk impact summary of the seven domains of a typical IT infrastructure, and provided recommendations and next steps for executive management.

a.management overview
b.risk assessment outline
c.IT infrastructure recap

Answers

Answer:

b

Explanation:

Write the routines with the following declarations: void permute( const string & str ); void permute( const string & str, int low, int high ); The first routine is a driver that calls the second and prints all the permutations of the characters in string str. If str is "abc", then the strings that are output are abc, acb, bac, bca, cab, and cba. Use recursion for the second routine.

Answers

Answer:

Here is the first routine:

void permute( const string &str ) {  // function with one parameter

 int low = 0;

 int high = str.length();

 permute(str, low, high);

}    

Or you can directly call it as:

 permute(str, 0, str.length());

Explanation:

The second routine:

void permute( const string &str, int low, int high)  

//function with three parameters

{ string str1 = str;

 if ( low == high ) {  //base case when last index is reached

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

     cout << str1[i]; }  //print the strings  

 else {

   for (int i=low; i<high; ++i) {  // if base case is not reached

     string temp = str1;   //fix a character

     swap( str1[i], str1[low] ); //swap the values

     permute( str1, low + 1, high );  //calling recursive function (recursion case)

     swap( str1[i], str1[low] );     }  } } //swap again to go to previous position

In this function the following steps are implemented:

A character is fixed in the first position.

Rest of the characters are swapped with first character.

Now call the function which recursively repeats this for the rest of the characters.

Swap again to go to previous position, call the recursive function again and continue this process to get all permutations and stop when base condition is reached i.e. last index is reached such that high==low which means both the high and low indices are equal.

You can write a main() function to execute these functions.

int main() {

 string str;

 cout << "Enter a string: ";

 cin >> str;

 permute(str);  }

Final answer:

The question requires defining two routines to output all permutations of a given string. The first function 'permute' serves as a driver, while the second 'permute' function is a recursive method that systematically swaps characters to produce each permutation.

Explanation:

Routines to Permute a String:

The task is to write routines to generate all permutations of the characters in a given string. The first function serves as a driver, while the second function uses recursion to perform the actual permutation process.

void permute(const string &str) {
   permute(str, 0, str.size() - 1);
}
void permute(const string &str, int low, int high) {
   if (low == high) {
       cout << str << endl;
   } else {
       for (int i = low; i <= high; i++) {
           // Swap the current index with the low element
           swap(str[low], str[i]);
           // Recursively call permute on the substring
           permute(str, low + 1, high);
           // Swap back for the next iteration
           swap(str[low], str[i]);
       }
   }
}
In the above code, permute(const string &str) is the driver function that calls the recursive function permute(const string &str, int low, int high), initiating the process with the full range of the string (from index 0 to the length of the string minus one).

Within the recursive function, when the low index matches the high index, it indicates that a permutation has been generated, and it gets printed. If not, the function enters a for-loop, where recursive calls are made after swapping the current character with the one at the start of the substring defined by low and high. After the recursive call returns, the characters are swapped back to their original position, allowing for correct generation of subsequent permutations.

A __________ grants the authority to perform an action on a system. A __________ grants access to a resource. right, permission login, password permission, right password, login

Answers

Answer:

A right grants the authority to perform an action on a system. A permission grants access to a resource.

Explanation:

In System administration there are different rights and permissions are given to the user as per the requirement to perform some actions and accessing some resources.

Rights are given to the users may be at admin level to perform some action or make some changes in the system. The users who have rights of the system can add, edit or delete data from the system as per requirement of the company.

Many peoples granted by permissions by providing them some passwords to access the resources of the systems. These users did not have the right to change, add, edit or delete any data. They just can use the information.

A right grants the authority to perform an action on a system. A permission grants access to a resource.

In the context of system security and access control:

- A right is a privilege granted to a user or process that allows them to perform a specific action on a system. For example, a right might allow a user to shut down the computer or to modify system settings.  

- A permission is a rule that grants access to a specific resource, such as a file, directory, or network resource. Permissions determine what actions (such as read, write, or execute) can be performed on that resource.

Thus, a right defines the actions a user can perform, while a permission defines what resources a user can access and what they can do with those resources.

Define function multiply(), and within the function: Get user input() of two strings made of whole numbers Cast the input to int() Multiply the integers and return the equation with result as a str()

Answers

Answer:

str(int(input("enter the vale of first whole number: "))*int

          (input("Enter the value of the second whole number: ")))

Explanation:

boom this works bc it does boom

In response to the question, a conceptual code example for a multiply() function has been provided where user input is taken, cast to int, multiplied, and the result is returned as a string.

The question asks to define a multiply() function in a programming context, specifically to use user input, cast string to int, perform multiplication, and return the result as a string. Here is a conceptual example of how you might write such a function:

def multiply():
   # Get user input
   num1 = input('Enter the first whole number: ')
   num2 = input('Enter the second whole number: ')
   
   # Cast the input to integers
   int_num1 = int(num1)
   int_num2 = int(num2)

   # Perform multiplication
   result = int_num1 * int_num2

   # Requate the equation with result as a string
   return str(int_num1) + ' * ' + str(int_num2) + ' = ' + str(result)

The multiply() function first captures two strings from the user, converts them into integers, multiplies them, and then returns the equation with the result as a string.

c++ design a class named myinteger which models integers. interesting properties of the value can be determined. include these members: a int data field named value that represents the integer's value. a constructor that creates a myinteger object with a specified int value. a constant getter that returns the value

Answers

Answer:

#include <iostream>using namespace std;class myinteger {        private:        int value;            public:        myinteger(int x){            value = x;        }               int getValue(){           return value;       }        };int main(){    myinteger obj(4);    cout<< obj.getValue();    return 0;}

Explanation:

Firstly, we use class keyword to create a class named myinteger (Line 5). Define a private scope data field named value in integer type (Line 7 - 8).

Next, we proceed to define a constructor (Line 11 - 13) and a getter method for value (Line 15 -17) in public scope. The constructor will accept one input x and set it to data field, x. The getter method will return the data field x whenever it is called.

We test our class by creating an object from the class (Line 23) by passing a number of 4 as argument. And when we use the object to call the getValue method, 4 will be printed as output.

Read the Security Guide about From Anthem to Anathema on pages 238-239 of the textbook. Then answer the following questions in the format on an essay. Create a heading for each question. Questions: Think about all of the cloud services you use. How vulnerable are you right now to having your data stolen

Answers

Answer:

Answer explained below

Explanation:

Think about all of the cloud services you use. How vulnerable are you right now to having your data stolen?

At its most basic level, “the cloud” is just fancy talk for a network of connected servers. (And a server is simply a computer that provides data or services to other computers). When you save files to the cloud, they can be accessed from any computer connected to that cloud’s network.

The cloud is not just a few servers strung together with Cat5 chords. Instead, it’s a system comprised of thousands of servers typically stored in a spaceship-sized warehouse—or several hundred spaceship-sized warehouses. These warehouses are guarded and managed by companies capable of housing massive loads of data, including the likes of Google (Google Docs), Apple (iCloud), and Dropbox.

So, it’s not just some nebulous concept. It’s physical, tangible, real.

When you save files to the cloud, you can access them on any computer, provided it’s connected to the Internet and you’re signed into your cloud services platform. Take Google Drive. If you use any mail, you can access Drive anywhere you can access your email. Sign in for one service and find your entire library of documents and photos in another.

Why are people concerned with cloud security?

It’s physically out of your hands.

You aren’t saving files to a hard drive at your house. You are sending your data to another company, which could be saving your data thousands of miles away, so keeping that information safe is now dependent on them. “Whether data is being sent automatically (think apps that sync to the cloud) or driven by users uploading photos to social media, the end result is that it’s all there somewhere being logged and stored,” says Jérôme Segura, Senior Security Researcher at Malwarebytes.

And that somewhere is a place that’s not in your direct control.

Risks of cloud storage

Cloud security is tight, but it’s not infallible. Cyber gurus can get into those files, whether by guessing security questions or bypassing passwords. That’s what happened in The Great iCloud Hack of 2014, where unwanted pictures of celebrities were accessed and published online.

But the bigger risk with cloud storage is privacy. Even if data isn’t stolen or published, it can still be viewed. Governments can legally request information stored in the cloud, and it’s up to the cloud services provider to deny access.

Mary from sales is asking about the plan to implement Salesforce.com's application. You explain to her that you are in the process of getting technical specifications and pricing so that you can move forward with the rollout. This would be part of which of the following plans?
a) IT architecture
b) IT infrastructure
c) System architecture
d) Server upgrade program
e) IT strategy

Answers

Answer:

The correct answer to the following question will be Option b ( IT infrastructure).

Explanation:

This refers to either the integrated devices, applications, network infrastructure, as well as facilities needed by an organization This system to function, run, and maintain.

Your technology infrastructure seems to be the nervous system, which is accountable for supplying end customers with a streamlined operation.Total control of both your operating system infrastructure ensures you can guarantee the channel's safety is tracked.

Therefore, it will be a part of the design of Mary.

Final answer:

The process of getting technical specifications and pricing for the rollout of Salesforce.com's application is a part of the organization's IT strategy, as it involves careful and strategic planning.

Explanation:

When explaining to Mary from sales about the plan to implement Salesforce.com's application, and mentioning the process of getting technical specifications and pricing for the rollout, you are discussing a key component of IT strategy.

This is because the process involves planning for the adoption of a significant system, considering its impact on business processes, and assessing the costs and technical requirements. The implementation of an application such as Salesforce.com usually undergoes careful planning within the broader context of the organization's overall technology plan, aligning with business goals and ensuring sustainability and efficiency in operations.

Given a integer, convert to String, using String Builder class. No error checking needed on input integer, However do read in the input integer using Scanner API. This program requires you to use a loop.

Answers

Answer:

The program in Java will be:

// Java program to demonstrate working parseInt()  

public class GFG  

{  

   public static void main(String args[])  

   {  

       int decimalExample = Integer.parseInt("20");  

       int signedPositiveExample = Integer.parseInt("+20");  

       int signedNegativeExample = Integer.parseInt("-20");  

       int radixExample = Integer.parseInt("20",16);  

       int stringExample = Integer.parseInt("geeks",29);  

 

       // Uncomment the following code to check  

       // NumberFormatException  

 

       //   String invalidArguments = "";  

       //   int emptyString = Integer.parseInt(invalidArguments);  

       //   int outOfRangeOfInteger = Integer.parseInt("geeksforgeeks",29);  

       //   int domainOfNumberSystem = Integer.parseInt("geeks",28);  

 

       System.out.println(decimalExample);  

       System.out.println(signedPositiveExample);  

       System.out.println(signedNegativeExample);  

       System.out.println(radixExample);  

       System.out.println(stringExample);  

   }  

}

Suppose that one byte in a buffer covered by the Internet checksum algorithm needs to be decremented (e.g., a header hop count field). Give an algorithm to compute the revised checksum without rescanning the entire buffer. Your algorithm should consider whether the byte in question is low order or high order

Answers

Answer:

The algorithm required for the question is given below.

Explanation:

Step 1: The data is shown below for the algorithm.

Original checksum.Byte location is decrementable.Price to decrease by what bit.

Step 2: Get a checksum compliment from one.

Step 3: Whether byte is of lesser importance to still be decremented by x.

Subtract x from those bytes.

Step 4: Whether byte is of higher importance to still be decremented by x.

Subtract 2⁸×x from those bytes.

Step 5: Start taking one's outcome compliment to get amended iterator checksum.

Consider the following architecture. 1 cache block = 16 words. Main memory latency is the time delay for each data transfer, which = 10 memory bus clock cycles. A memory transfer time = 1 memory bus clock cycle, which is also called bandwidth time. For any memory access, it consists of latency time plus the bandwidth time. The cache miss penalty is the time to transfer one block from main memory to the cache. In addition, it takes 1 clock cycle to send the address to the main memory. Compute the miss penalty for the following configurations. Configuration (a): Requires 16 main memory accesses to retrieve a cache block and words of the block are transferred one at a time. Configuration (b): Requires 4 main memory accesses to retrieve a cache block and words of the block are transferred four at a time. Configuration (c): Requires 4 main memory accesses to retrieve a cache block and words of the block are transferred one at a time.

Answers

Answer:

The answers are A)176 B)44 C)56.

Explanation:

According to the information given in the question about the architecture that is used and its communication times;

For option A: The goal is to retrieve one cache block which consists of 16 words. Doing this one word at a time over a period of 16 main memory accesses and the miss penalty for this configuration is 10*16 = 160 bus clock cycles for data transfer and 1*16 = 16 bus clock cycles for memory transfer time which comes up to 176.

For option B: The goal is to retrieve one cache block which consists of 16 words. Doing this four words at a time over a period of 4 main memory accesses and the miss penalty for this configuration is 10*4 = 40 bus clock cycles for data transfer and 1*4 = 4 bus clock cycles for memory transfer which comes up to 44.

For option C: The goal is to retrieve one cache block which consists of 16 words. Doing this 4 words at a time over a period of 4 main memory accesses and the miss penalty for this configuration is 10*4 = 40 bus clock cycles for data transfer and 1*16 = 16 bus clock cycles for memory transfer since words of the block are transferred not 4 but 1 at a time which comes up to 56.

I hope this answer helps.

Write me some pseudocode for one pass of the Selection Sort algorithm through random values stored in an Unordered-List, or Linked-List, of values (rather than a standard "Python" List).
• How would you implement a swap using a Linked-List?
• What is the minimum number of variables required?

Answers

Answer:

Minimum of 6 variables is required

Explanation:

class LinkedList:

def __init__(self, v):

self.data = v

self.next = None

def sortSelections(first):  

x = y = first

while y.next:

z = p = y.next  

while p:

if y.data > p.data:

if y.next == p:

if y == first:

y.next = p.next

p.next = y

y, p = p, y

z = p

first = y

p = p.next

else:

y.next = p.next

p.next = y

x.next = p

y, p = p, y

z = p

p = p.next

else:

if y == first:

r = y.next

y.next = p.next

p.next = r

z.next = y

y, p = p, y

z = p

p = p.next

first = y

else:

r = y.next

y.next = p.next

p.next = r

z.next = y

x.next = p

y, p = p, y

z = p  

p = p.next

else:  

z = p

p = p.next

x = y

y = y.next

return first

def display(first):

while first:

print(first.data, end = " ")

first = first.next

if __name__ == "__main__":

print("Sorted List: ")

first = LinkedList(53)

first.next = LinkedList(14)

first.next.next = LinkedList(2)

first.next.next.next = LinkedList(9)

first.next.next.next.next = LinkedList(92)

first = sortSelections(first)

display(first)

Develop a Python program. Define a class in Python and use it to create an object and display its components. Define a Student class with the following components (attributes):  Name  Student number  Number of courses current semester

Answers

Answer:

class Student:    def __init__(self, Name, Student_Num, NumCourse):        self.Name = Name          self.Student_Num = Student_Num          self.NumCourse = NumCourse   s1 = Student("Kelly", 12345, 4) print(s1.Name) print(s1.Student_Num) print(s1.NumCourse)

Explanation:

Firstly, use the keyword "class" to create a Student class.

Next, create a class constructor (__init__) that takes input for student name, student number and number of course (Line 2) and assign the input to the three class attributes (Line 3-5). All the three class attributes are preceded with keyword self.

Next, create a student object (Line 7) and at last print all the attributes (Line 8-10).

write an assembly language procedure that also performs the binary search. The C program will time multiple searches performed by both the C code and your assembly language procedure and compare the result. If all goes as expected, your assembly language procedure should be faster than the C code.

Answers

Answer:

Let’s identify variables needed for this program.

First variables will be the one which will hold the values present in the Given Numbers in Array list and key of 16-bit and it will be array ARR and KEY. variables will be holding the Messages MSG1 “KEY IS FOUND AT “, RES ”  POSITION”, 13, 10,” $” and MSG2 ‘KEY NOT FOUND!!!.$’ to be printed for the User. Other variables will be holding Length of the Array and it will be LEN, So in all Six variables.

The identified variables are ARR, KEY, LEN, RES, MSG1 and MSG2.

DATA SEGMENT

    ARR DW 0000H,1111H,2222H,3333H,4444H,5555H,6666H,7777H,8888H,9999H

    LEN DW ($-ARR)/2

    KEY EQU 7777H

    MSG1 DB "KEY IS FOUND AT "

    RES DB "  POSITION",13,10," $"

    MSG2 DB 'KEY NOT FOUND!!!.$'

DATA ENDS

CODE SEGMENT  

   ASSUME DS:DATA CS:CODE

START:

     MOV AX,DATA

     MOV DS,AX

   

     MOV BX,00

     MOV DX,LEN

     MOV CX,KEY

AGAIN: CMP BX,DX

      JA FAIL

      MOV AX,BX

      ADD AX,DX

      SHR AX,1

      MOV SI,AX

      ADD SI,SI

      CMP CX,ARR[SI]

      JAE BIG

      DEC AX

      MOV DX,AX

      JMP AGAIN

BIG:   JE SUCCESS

      INC AX

      MOV BX,AX

      JMP AGAIN

SUCCESS: ADD AL,01

        ADD AL,'0'

        MOV RES,AL

        LEA DX,MSG1

        JMP DISP

FAIL: LEA DX,MSG2

DISP: MOV AH,09H

     INT 21H

     

     MOV AH,4CH

     INT 21H      

CODE ENDS

END START

In this Assembly Language Programming, A single program is divided into four Segments which are 1. Data Segment, 2. Code Segment, 3. Stack Segment, and 4. Extra  Segment. Now, from these one is compulsory i.e. Code Segment if at all you don’t need variable(s) for your program.if you need variable(s) for your program you will need two Segments i.e. Code Segment and Data Segment.

Explanation:

The attached Logic is a C like Program to conduct a binary search we need small Algorithm Shown above in a very simple way, So Just we will covert the logic into Assembly There are many things uncommon in the programing Language. There are No While Loops or Modules but this things are to be implemented in different ways.

Create a java program using the following instructions:GymsRUs has a need to provide fitness/health information to their clients including BMI, BMI category and maximum heart rate. Your task is to write a console program to do this. Body Mass Index (BMI) is a measure of body fat based on a person’s height and weight. BMI can be used to indicate if you are overweight, obese, underweight, or normal. The formula to calculate BMI is BMI = weight(lb) x 703 / (height(inches))^2.The following BMI categories are based on this calculation:Category BMI RangeUnderweight less than 18.5Normal 18.5 to less than 25Overweight 25 to less than 30Obese 30 or moreMax heart rate is calculated as 220 minus a person’s age.FUNCTIONAL REQUIREMENTS: This problem will have TWO classes. Design and code a class called HealthProfile (your "cookie cutter") to store information about clients and their fitness data. The following attributes are private instance variables:a. Nameb. Agec. Weightd. Height (total inches)

Answers

Answer:

See attached file for detailed code.

Explanation:

See attached file for explanation.

Which date formats are allowed in Excel for February 14, 2018? Check all that apply.
14-Feb-18
14-Feb
February 14, 2018
2/014/2018
02/14/18
2/14/2018​

Answers

Answer:

1,2,5 and 6

Explanation:

Hope this helps!!!!!!!

Forever friend and helper,

Cammie:)

The date formats which are allowed in Microsoft Excel for February 14, 2018 are:

A. 14-Feb-18.

B. 14-Feb.

E. 02/14/18.

F. 2/14/2018​.

Microsoft Excel can be defined as a software application (program) designed and developed by Microsoft Inc., to avail end users the ability to analyze and visualize spreadsheet documents.

Formatting is simply the appearance of textual information and data in a document such as an Excel spreadsheet.

In Microsoft Excel, an end user can set the display format for the following:

Number.Currency.Percentage.Date.

A date provides information about the day, month and year a document was created, last modified, used, etc.

In Microsoft Excel, the date formats which are allowed for February 14, 2018 are:

14-Feb-18. 14-Feb.02/14/18. 2/14/2018​.

Read more: https://brainly.com/question/23822910

Methods inherited from the base/super class can be overridden. This means changing their implementation; the original source code from the base class is ignored and new code takes its place. Abstract methods must be overridden.

Answers

Answer:

False

Explanation:

Methods inherited from the base/super class can be overridden only if behvior is close enough. The overridding method should have same name, type and number of parameters and same return type.

Answer:

False.this statement is false because, im not sure, but its for sure false.

Methods inherited from the base/super class can be overridden only if behvior is close enough. The overridding method should have same name, type and number of parameters and same return type.

A university begins Year 1 with 80 faculty. They hire 4 faculty each year. During each year 10% (rounded to the nearest integer) of the faculty present at the beginning of the year leave the university. For example, in a year where there are 73 faculty at the beginning of the year, 7 would leave the university at the end of the year. The university wants to know how many faculty they will have at the end of year 10. The resulting spreadsheet can be found below. In cell G9 the first cell address referred to was cell E9. If the formula is entered in cell G9 and is copied down to G10:G18, what is it followed by?

Answers

Answer:

The correct answer to the following question will be "B9:B18-ROUND(0.1*B9:B18,0) +C9:C18".

Explanation:

The ROUND function of Excel seems to be an adaptive feature in excel that calculates the first round amount of a specific number with either the numerical value or digits to be given as just a statement.

For rounding rolling quantities to a defined degree of accuracy you can use this function named ROUND.

The description of the above statement is as follow :

The formula will be used in that manner B9 along with colon B18 after that subtract (-) and using the round function (In this we pass the range i.e B9:B18,0) Plus C9 :C18.

Write a recursive function that has an argument that is an array of characters and two arguments that are the bounds (inclusive) on array indices. The function should reverse the order of those entries in the array whose indices are between the two bounds. For example, if the array is a[0]: ‘A’ a[1]: ‘B’ a[2]: ‘C’ a[3]: ‘D’ a[4]: ‘E’ and the bounds are 1 and 4, then, after the function is run the array elements should be a[0]: ‘A’ a[1]: ‘E’ a[2]: ‘D’ a[3]: ‘C’ a[4]: ‘B’ Consider the following declaration for your function: void flipArray( char arr[], unsigned int from, unsigned int to ); Test your code before writing it out. You may safely assume that from and to are valid indices with respect to arr.

Answers

Answer:

Here is the C++ program:

#include <iostream>   // for input output functions

using namespace std;   // to identify objects like cin cout

/* recursive function to reverse the order of array elements between two bound of array indices */

void flipArray(char arr[], unsigned int from, unsigned int to)  {  

       if (from >= to)  // base case

         return;  

   swap(arr[from], arr[to]);  

//function to swap characters according to specified values in from and to

   flipArray(arr, from + 1, to - 1);  } // recursive function call

int main()  {  //start of main() function body

   int size;  //stores the number of elements in array

   cout<<"Enter the size of the array: ";  // prompts user to enter array size

   cin>>size;  // reads array size from user

   

   char array[size];  // array of size specified by user

   cout<<"Enter the characters: ";  //prompts user to enter elements in array

// loop to take input characters in array according to specified size

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

   {cin >> array[i];}  // reads array elements from user

       

   unsigned int i,j;  // stores values of two bounds of indices

   cout<<"Enter the two bounds of array indices:";

// prompts user to enter two bounds of array indices

   cin>>i>>j;  //reads array indices from user

//displays original array elements    

   cout << "The original array is: "<<array<< endl;

   flipArray(array,i,j);  //calls flipArray() function

   cout << "Array after flip from "<< i<<"to "<<j<<" is: "<<array << endl;  }

/*displays elements of array after reversing array characters according to bounds of array indices */

Explanation:

The program is explained in the given comments with every statement. Lets understand the logic of the recursive function for the input array that has characters: A B C D E and two bounds 1 and 4 i.e. from B to E

First the base condition if (from >= to) is checked. Here the value of from is 1 and value of to is 4. So the base condition evaluates to false as 1 < 4

So the program control moves to the next statement: swap(arr[from], arr[to]);  which swaps the array characters from the two indices 1 and 4.

arr [1] = B, arr [4] = E

So B and E are swapped.

A E C D B

Next statement: flipArray(arr, from + 1, to - 1);  is a call to recursive function flipArray,

from + 1 = 1+1 = 2 So now the from index moves one position ahead

to - 1 = 4 - 1 = 3 So now the to index moves one position behind

So new value of from = 2 and to = 3

The base condition is check again which evaluates to false as 2<3

The swap() function swaps the elements at indices 2 and 3 which means:

arr[2] = C

arr[3] = D

So C and D are swapped.

A E D C B

Next is the call to recursive function flipArray()

from + 1 = 2 + 1 = 3

to - 1 = 3 - 1 = 2

So the value of from = 3 and value of to = 2

Now the base condition is checked again and it evaluates to true as 3>2

So this is the stop condition.

Hence the array after flip is:

A E D C B

The program along with its output is attached in the screen shot.

Your supervisor manages the corporate office where you work as a systems analyst. Several weeks ago, after hearing rumors of employee dissatisfaction, he asked you to create a survey for all IT employees. After the responses were returned and tabulated, he was disappointed to learn that many employees assigned low ratings to morale and management policies.

This morning he called you into his office and asked whether you could identify the departments that submitted the lowest ratings. No names were used on the individual survey forms. However, with a little analysis, you probably could identify the departments because several questions were department-related.

Now you are not sure how to respond. The expectation was that the survey would be anonymous. Even though no individuals would be identified, would it be ethical to reveal which departments sent in the low ratings? Would your supervisor’s motives for wanting this information matter?

Answers

Maintaining confidentiality in employee surveys is essential to ensure honest feedback and protect employee trust. Identifying departments with low morale raises ethical considerations, particularly when the survey was intended to be anonymous.

Workplace Confidentiality and Ethical Dilemmas

When managing confidential employee surveys, such as an attitude survey, it is crucial to maintain the confidentiality of employees' responses. This is important for cultivating trust and fostering an environment where employees feel safe to express genuine concerns. The ethical dilemma arises when considering whether to identify departments with low morale based on non-anonymized data, which could breach confidentiality agreements and potentially erode trust. The intention behind identifying these departments is a crucial element to consider: if it's for the purpose of targeted improvements without repercussions, it may be more justifiable than if it were for punitive measures.

Organizational behavior research argues for the importance of maintaining confidentiality to get honest responses and the negative impacts when surveys lead to no action. Actionability from survey results is key, but it must respect the promised confidentiality. This also relates to issues of social desirability bias, where respondents may skew their answers to appear more favorable when anonymity isn't assured. Trust both in the confidentiality and the constructive use of survey data is vital for the ongoing success of such workplace assessments.

Any effort to identify departments from the survey data should be carefully weighed against ethical considerations, and if pursued, it should be done transparently and with a clear, constructive action plan to address the issues without targeting individuals.

You have been asked to write a two-page report that explains the extent to which the IT department can configure the cryptographic features of Word 2010. What is the process involved in configuring encryption?

Answers

Answer:Encryption is the process

of translating plain text data into something that appears to be random and meaningless. A symmetric key is used during both the encryption and decryption process. To decrypt a particular piece of ciphertex, the key that was used to encrypt the data must be used.

Types of encryption

1.Symmetric encryption :This is also known as public key encryption. In symmetric encryption, there is only one key, and all communication patties use the same key for encryption and decryption.

2.Asymmetric encryption :This is foundational technology for SSL(TLS)

How encryption is being configured

Encryption uses algorithms to scramble your information. It is then transmitted to the receiving party, who is able to decode the message with a key.

Explanation:

Write a script that will:

• Call a function to prompt the user for an angle in degrees.
• Call a function to calculate and return the angle in radians. (Note: π radians = 180°)
• Call a function to print the resultWrite all of the functions, also. Put the script and all functions in separate code files.

Answers

Answer:

The solution code is written in Python:

import math   def getUserInput():    deg = int(input("Enter an angle in degree: "))    return deg def calculateRad(deg):    return (deg * math.pi) / 180 def printResult(deg, rad):    print(str(deg) + " is equal to " + str(round(rad,2)) + " radian") degree = getUserInput() radian = calculateRad(degree) printResult(degree, radian)

Explanation:

Since we need a standard Pi value, we import math module (Line 1).

Next, create a function getUserInput to prompt user to input degree (Line 3-5).

Next, create another function calculateRad that take one input degree and calculate the radian and return it as output (Line 7-8).

Create function printResult to display the input degree and its corresponding radian (Line 10-11).

At last, call all the three functions and display the results (Line 13-15).

def c_to_f(): # FIXME return # FIXME: Finish temp_c = float(input('Enter temperature in Celsius: ')) temp_f = None # FIXME: Call conversion function # temp_f = ?? # FIXME: Print result # print('Fahrenheit:' , temp_f)

Answers

Answer:

def c_to_f(celsius):      return celsius * 9/5 + 32 temp_c = float(input('Enter temperature in Celsius: '))  temp_f = None   temp_f = c_to_f(temp_c)  print('Fahrenheit:' , temp_f)

Explanation:

The first piece of code we can fill in is the formula to convert Celsius to Fahrenheit and return it as function output (Line 2).

The second fill-up code is to call the function c_to_f and pass temp_c as argument (Line 7). The temp_c will be processed in the function and an equivalent Fahrenheit value will be returned from the function and assigned it to temp_f.

Create a class named College Course that includes data fields that hold the department (for example, ENG), the course number (for example, 101), the credits (for example, 3), and the fee for the course (for example, $360). All of the fields are required as arguments to the constructor, except for the fee, which is calculated at $120 per credit hour. Include a display () method that displays the course data. Create a subclass named Lab Course that adds $50 to the course fee. Override the parent class display () method to indicate that the course is a lab course and to display all the data. Write an application named UseCourse that prompts the user for course information. If the user enters a class in any of the following departments, create a LabCourse: BIO, CHM, CIS, or PHY. If the user enters any other department, create a CollegeCourse that does not include the lab fee. Then display the course data. Save the files as CollegeCourse.java, LabCourse.java, and UseCourse.java.

Answers

Answer:

File: clgCourse.java

public class clgCourse

{

  private final double CREDIT_HOUR_FEE = 120.00;

  private String dpt;

  private int courseNo;

  private int credits;

  private double courseFee;

  public clgCourse(String newdpt, int newcourseNo, int newCredits)

  {

      dpt = newdpt.toUpperCase();

      courseNo = newcourseNo;

      credits = newCredits;

      courseFee = CREDIT_HOUR_FEE * credits;

  }

  public String getdpt()

  {

      return dpt;

  }

  public int getcourseNo()

  {

      return courseNo;

  }

  public int getCredits()

  {

      return credits;

  }

  public double getcourseFee()

  {

      return courseFee;

  }

  public void display()

  {

      System.out.println("\n Course Data");

      System.out.println("Course: " + "College Course");

      System.out.println("dpt: " + this.getdpt());

      System.out.println("Course Number: " + this.getcourseNo());

      System.out.println("Credit Hours: " + this.getCredits());

      System.out.println("Course Fee: $" + this.getcourseFee());

  }

}

File: LabCourse.java

public class LabCourse extends clgCourse

{

  private final double LAB_FEE = 50.00;

  private double labCourseFee;

  public LabCourse(String newdpt, int newcourseNo, int newCredits)

  {

      super(newdpt, newcourseNo, newCredits);

      labCourseFee = super.getcourseFee() + LAB_FEE;

  }

  public double getLabCourseFee()

  {

      return labCourseFee;

  }

  public void display()

  {

      System.out.println("\n Course Data");

      System.out.println("Course: " + "Lab Course");

      System.out.println("dpt: " + super.getdpt());

      System.out.println("Course Number: " + super.getcourseNo());

      System.out.println("Credit Hours: " + super.getCredits());

      System.out.println("Course Fee: $" + this.getLabCourseFee());      

  }

}  

File: UseCourse.java

import java.util.Scanner;

public class UseCourse

{

  public static void main(String[] args)

  {

      Scanner keyboard = new Scanner(System.in);

      System.out.print("Enter the dpt of the course: ");

      String dept = keyboard.nextLine();

     

      System.out.print("Enter the number of the course: ");

      int number = keyboard.nextInt();

      System.out.print("Enter the credit hours of the course: ");

      int hours = keyboard.nextInt();

      if(dept.equalsIgnoreCase("BIO") || dept.equalsIgnoreCase("CHM")

              || dept.equalsIgnoreCase("CIS") || dept.equalsIgnoreCase("PHY"))

      {

          LabCourse labCourse = new LabCourse(dept, number, hours);

          labCourse.display();

      }

      else

      {

          clgCourse clgCourse = new clgCourse(dept, number, hours);

          clgCourse.display();

      }

      keyboard.close();

  }

}

Explanation:

Create a getdpt method that returns the dpt of the course .Create a getcourseNo method that returns the number of the course.Create a display method that displays all the data of college course .Check if the user enters any of the lab dpts (BIO, CHM, CIS, or PHY),  then create a LabCourse and then display the course data .Check if the user does not enter any of the lab dpts (BIO, CHM, CIS, or PHY),  then create a clgCourse and then display the course data .

Insect population An insect population doubles every generation. Write a while loop that iterates numGeneration times. Inside the while loop, write a statement that doubles currentPopulation in each iteration of the while loop. Function Save Reset MATLAB DocumentationOpens in new tab function currentPopulation = CalculatePopulation(numGeneration, initialPopulation) % numGeneration: Number of times the population is doubled % currentPopulation: Starting population value i = 1; % Loop variable counts number of iterations currentPopulation = initialPopulation; % Write a while loop that iterates numGeneration times while ( 0 ) % Write a statment that doubles currentPopulation in % each iteration of the while loop % Hint: Do not forget to update the loop variable end end 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Code to call your function

Answers

Answer:

function currentPopulation = CalculatePopulation(numGeneration, initialPopulation)

    i = 1;

    currentPopulation = initialPopulation;

    while(i <= numGeneration)

         currentPopulation = 2* currentPopulation;

         i= i+1;

    end

end

Explanation:

Assign 1 to i as an initial loop value .Assign  initialPopulation to currentPopulation  variable.Run the while loop until i is less than numGeneration.Inside the while loop, double the currentPopulation  variable.Inside the while loop, Increment the i variable also.

In this exercise we have to use the knowledge of computational language in python to describe a code, like this:

The code can be found in the attached image.

To make it easier the code can be found below as:

function currentPopulation = CalculatePopulation(numGeneration, initialPopulation)

   i = 1;

   currentPopulation = initialPopulation;

   while(i <= numGeneration)

        currentPopulation = 2* currentPopulation;

        i= i+1;

   end

end

See more about python at brainly.com/question/26104476

So far we have worked on obtaining individual digits from 4 digits of 5 digit numbers. The added them to find the sum of digits. However, now we know about the loop and we can remove the limit of having a specific number of digits. Write a program to print out all Armstrong numbers between 1 and n where n will be an user input. If the sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number. For example, 153 = (1 * 1* 1)+ ( 5 * 5* 5 ) + ( 3*3*3) In order to solve this problem we will implement the following function: sumDigitCube(): write a function sumDigitCube() that takes a positive integer as a parameter and returns the sum of cube of each digit of the number. Then in the main function, take an integer n as input and generate each number from 1 to n and call the sumDigitCube() function. Based on the returned result, compares it with the value of the generated number and take a decision and print the number if it is Armstrong number

Answers

Answer:

#include<stdio.h>

int sumDigitCube(int n);

int main(){

   int n, i;

   printf("Enter number: ");

   scanf("%d", &n);

printf("The Armstrong numbers are:" );

   for(i=1; i<=n; i++){

       if(sumDigitCube(i)==i){

           printf(" %d", i);

       }

   }

   printf("\n");

   return 0;

}

int sumDigitCube(int n){

   int s = 0;

   int digit;

   while(n>0){

       digit = n%10;

       s += digit * digit *digit;

       n = n/10;

   }

   return s;

}

Explanation:

Write a function, named "wait_die_scheduler" that takes a list of actions, and returns a list of actions according to the following rules. The actions given to the scheduler will only consist of WRITE and COMMIT actions. (Hence only exclusive locks need be implemented.) Each transaction will end with a COMMIT action. Before examining each action, attempt to perform an action for each of the transactions encountered (ordered by their names). After all the actions have been examined, continue to attempt to perform an action from each transaction until there are no more actions to be done. You will need to add LOCK, UNLOCK, and ROLLBACK actions to the list of actions to be returned, according to the Wait-Die protocol. If releasing more than one lock (for instance after a COMMIT), release them in order by the name of their object. Use the deferred transaction mode (only requesting locks when needed).

Answers

To implement the `wait_die_scheduler` function according to the Wait-Die protocol for handling WRITE and COMMIT actions in transactions, we'll simulate a scheduler that ensures correct behavior with respect to locks and transaction order. The Wait-Die protocol is used to manage concurrency and handle conflicts between transactions efficiently. Below is a Python implementation of this scheduler function:

def wait_die_scheduler(actions):

   # Data structures to track locks and actions

   locks = {}  # Dictionary to track locks by object name

   results = []  # List to collect final actions to be returned

   # Process the list of actions

   for action in actions:

       transaction_name = action[0]

       action_type = action[1]

       object_name = action[2]

       # If action is WRITE or COMMIT

       if action_type == 'WRITE' or action_type == 'COMMIT':

           # Check if the transaction already has a lock on the object

           if object_name in locks and locks[object_name] != transaction_name:

               # Conflict detected, need to resolve based on Wait-Die protocol

               # Check order of transactions for waiting or aborting

               if transaction_name < locks[object_name]:

                   # Current transaction waits (older transaction, so wait)

                   results.append((transaction_name, 'WAIT', object_name))

               else:

                   # Current transaction aborts (newer transaction, so abort)

                   results.append((transaction_name, 'ROLLBACK', object_name))

                   # Release locks held by the aborted transaction

                   results.extend([(locks[obj], 'UNLOCK', obj) for obj in sorted(locks.keys())])

                   locks.clear()  # Clear all locks after rollback

           else:

               # No conflict, acquire lock for the transaction

               locks[object_name] = transaction_name

           # Add the original action to the results

           results.append((transaction_name, action_type, object_name))

           # If action is COMMIT, release locks held by the committed transaction

           if action_type == 'COMMIT':

               results.extend([(locks[obj], 'UNLOCK', obj) for obj in sorted(locks.keys())])

               locks.clear()  # Clear all locks after commit

   # Final pass to release any remaining locks (should not normally occur)

   results.extend([(locks[obj], 'UNLOCK', obj) for obj in sorted(locks.keys())])

   locks.clear()  # Clear all locks after processing all actions

   return results

# Example usage

actions = [

   ('T1', 'WRITE', 'A'),

   ('T2', 'WRITE', 'B'),

   ('T1', 'COMMIT', 'A'),

   ('T2', 'COMMIT', 'B'),

   ('T1', 'WRITE', 'B'),

   ('T1', 'COMMIT', 'B')

]

result_actions = wait_die_scheduler(actions)

for action in result_actions:

   print(action)

Explanation of the `wait_die_scheduler` function:

1. Initialization: We start by defining empty data structures (`locks` and `results`) to track locks on objects and the resulting list of actions.

2. Processing Actions: Iterate through each action in the provided list (`actions`). Each action is a tuple consisting of transaction name, action type (`WRITE` or `COMMIT`), and the object name.

3. Handling WRITE and COMMIT Actions:

  - For a `WRITE` action:

    - Check if the transaction already holds a lock on the object.

    - If there's a conflict (another transaction holds the lock), resolve it based on the Wait-Die protocol by either making the current transaction wait or aborting it.

  - For a `COMMIT` action:

    - Release all locks held by the committed transaction.

4. Building Resulting Actions:

  - Append the original action to the `results` list.

  - If a transaction commits or aborts, add corresponding `UNLOCK` actions for all locks held by the transaction.

5. Final Cleanup: Ensure all locks are released after processing all actions.

This implementation follows the Wait-Die protocol by managing locks, resolving conflicts between transactions, and ensuring correct order of operations according to the protocol rules. Adjustments may be needed based on specific requirements or variations of the Wait-Die protocol for different scenarios.

An odometer is the gauge on your car that measures distance traveled. In the United States, an odometer measures in miles; elsewhere else, it measures kilometers. Many vehicles with electronic odometer interfaces can switch between miles and kilometers. Something to consider: if an odometer gets replaced, a new one must be able to be set to some specified mileage. a) Write an Odometer class which must include the following methods: • _init__, _str_1_repr__, overloaded add and substract method The constructor must take two arguments mileage, and any other specification that uses units (you choose the unit specification) . Both arguments must have a default value (you may choose the default values) O Addition and subtraction both have one odometer operand and one numeric operand, where the numeric operand represents the miles being added/subtracted (not two odometer operands). o Addition should be commutative (but not subtraction). o Output methods should always be rounded to 1/10 mile (kilometer), but the odometer itself should maintain full floating-point accuracy. b) Include sample code that uses your class and demonstrates the use of all methods as well as demonstrating error handling. c) at the end of your code show an illustrated run of your code "W" "

Answers

Answer:

class Odometer():

   def __init__(self, mileage=0, unit='miles'):

       if mileage < 0:  

           raise ValueError('Mileage cannot be in negative')

       self.mileage = mileage

       if unit in ['miles', 'kilometers']:  

           self.units = unit

       else:

           raise ValueError("Miles and kilometer unit are allowed only")

   def __repr__(self):

       return self.__str__()

   def __str__(self):

       return 'Mileage: {:.1f} {}'.format(self.mileage, self.units)

   def add(self, odometer, distance):

       if odometer.units == self.units:

           self.mileage = odometer.mileage + distance

       elif self.units == 'miles':  

           self.mileage = odometer.mileage / 1.6 + distance

       else:

           self.mileage = odometer.mileage * 1.6 + distance

   def subtract(self, odometer, distance):

       if odometer.units == self.units:

           self.mileage = odometer.mileage + distance

       elif self.units == 'miles':

           self.mileage = odometer.mileage / 1.6 - distance

       else:

           self.mileage = odometer.mileage * 1.6 - distance

honda_odometer = Odometer(100.56, 'miles')

print('Reading of Honda odometer:', honda_odometer)

new_odometer = Odometer(100, 'kilometers')

print('Reading of New odometer:', new_odometer)

new_odometer.add(honda_odometer, 10)

print('Reading of New odometer after adding honda odometer:', new_odometer)

new_odometer.subtract(honda_odometer,20)

print('Reading of New odometer after subtracting honda odometer:', new_odometer)

Explanation:

Create a class only supports miles and kilometers as units .Create the add method that accepts an odometer, distance and adds it to the current object .Create the subtract method that accepts an odometer and distance and subtract it to the current object .

The two mathematical models of language description are generation and recognition. Describe how each can define the syntax of a programming language.

Answers

Answer:

The correct answer to the following question will be "Semantic and Syntax error".

Explanation:

Syntax error:

Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.

Semantic error:

That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.

So, it's the right answer.

In Java, variables of the super class class can point to objects of the subclass. For example, if Student is a super class to Athletes, then any variable (say s) of type Student can point to either Student or Athlete objects. Sometimes we want to know exactly whether s is pointing to Student or pointing to Athlete. This can be accomplished with an if statement. Complete the missing part in the following if statement so it prints YES if the variable s is currently pointing to an Athlete if (s ____________ Athlete) System.out.print("YES");

Answers

Answer:

"instanceof" is the correct answer for the above question.

Explanation:

The "instanceof" is a statement in java, which is used to check for an object that any object is derived from that class or not. The syntax of this statement is "object instanceof class name". If the object is derived from declared class, then it will result in true or otherwise it will result in false.The above question asked about that condition which is used to check that the s object is derived from the Athlete class or not so when the if condition blanks will fill from the "instanceof", then the user will get the if condition which can check. Hence "instanceof" is the correct answer.

Other Questions
Choose the words that make each statement true.A6.0 M solution contains 6.0of solutedissolved in one of solution. The Min6.0 M refers to. Theconcentration of a 6.0 M solution may also beexpressed as A family Visiting a restaurant with a child's menu. The children's menu has options for drink entree and dessert. child shows one option from each section of the minion all the possibilities of the child's male are shown in the diagram. What is the probability that a child can Will randomly choose a meal with a cheeseburger and cookie Which of the following is true regarding LDL: Select one: a. Diets lower in simple carbohydrate and saturated fats, along with regular physical activity, can reduce LDL-cholesterol. b. LDL can adhere to the walls of the blood vessels, contributing to the development of atherosclerosis c. The more LDL-cholesterol circulating in the blood the greater the risk of cardiovascular disease d. All of the above A worksheet A. is an internal document that helps summarize data for the preparation of financial statements. B. is a journal used to record transactions. C. is a ledger listing the account balances and changes in those accounts. Every organization has many resources, capabilities, and routines; however, those few things the company does really well and are performed with a very high proficiency are termed Multiple Choice core competencies. distinct capabilities. sustainable activities. socially complex activities. distributive factors. Carrie started at the southeast corner of Franklin Park, walked north 240 yards, turned and walked west 80 yards, and then turned and walked diagonally back to where she started. What is the area of the triangle enclosed by path she walked? Lists ways that a bikes motion can change What is the answer to 5x-11=34 MULTIPLE CHOICE QUESTIONWhat is the largest estimate for OILreserves?110 years54 years70 years Consider the following possible stages in the evolution of a star like our sun: black dwarf, giant, main-sequence, planetary nebula, supernova, white dwarf. Rank the stages in the order they occur. Leave out any stages that will not occur in the evolution of a star of similar mass to the sun Given that Sine theta = StartFraction 21 Over 29 EndFraction, what is the value of cosine theta, for 0 degrees less-than theta less-than 90 degrees? Are 4(x-3) and 6x-2(x-3) equivalent? Is 8 feet 6 inches greater than 100 A box rests on the floor. If you pull sideways on the box with a 300 N force,but can't move it, what is the net force on the box? ) 0 NO B) less than 300 NOC) more than 300 N The Best Manufacturing Company is considering a new investment. Financial projections for the investment are tabulated here. The corporate tax rate is 40 percent. Assume all sales revenue is received in cash, all operating costs and income taxes are paid in cash, and all cash flows occur at the end of the year. All net working capital is recovered at the end of the project. Year 0 Year 1 Year 2 Year 3 Year 4 Investment $ 43,000 Sales revenue $ 22,000 $ 22,500 $ 23,000 $ 20,000 Operating costs 4,600 4,700 4,800 4,000 Depreciation 10,750 10,750 10,750 10,750 Net working capital spending 490 540 590 490 ? Compute the incremental net income of the investment for each year. (Do not round intermediate calculations.) Year 1 Year 2 Year 3 Year 4 Net income $ $ $ $ b. Compute the incremental cash flows of the investment for each year. (Do not round intermediate calculations. Negative amounts should be indicated by a minus sign.) Year 0 Year 1 Year 2 Year 3 Year 4 Cash flow $ $ $ $ $ c. Suppose the appropriate discount rate is 11 percent. What is the NPV of the project? (Do not round intermediate calculations and round your final answer to 2 decimal places. (e.g., 32.16)) NPV $ Part CIdioms with "tener" - to haveBased on the given sentences, create a logical response using one of the tener expressions that you learned in the Social Networking tutorial. Each sentence should include a subject, the correct form of the verb tener (to have), and an appropriate noun to describe the condition.Example: Yo veo una pelcula de horror. Yo tengo miedo.1. Yo quiero agua.1.2. Ella visita Alaska en diciembre.2. 3. Ellos van al restaurante.3.4. Yo visito Arizona en junio.4.5. Nosotros corremos a escuela.5. 15 is 60% of what number? Scar tissue is the result of ________.A) an abnormally large number of collagen fibers and relatively few blood vessels at the repair site.B) increased numbers of epidermal layers in the area of the injury.C) a thickened stratum germinativum in the area of the injury.D) increased numbers of fibroblasts and mast cells in the injured area.E) a lack of hair follicles and sebaceous glands in the injured area. What is the radius and diameter of the following circle? You are terminating an employee.You need to congratulate your coworker on his recent promotion.You need to inform your boss that she has made a significant error in her data calculations.You need to inform your boss of a new lead.You want to schedule a meeting to update your boss on a client meeting.Which of the following is a situation that might call for an indirect strategy? Check all that apply.You need to congratulate your coworker on his recent promotion.You need to inform your boss that she has made a significant error in her data calculations.You want to schedule a meeting to update your boss on a client meeting.You need to inform your boss of a new lead.You are terminating an employee.