Questions
In bash Write a script which receives a list of parameters. If no parameters are received,...

In bash

Write a script which receives a list of parameters. If no parameters are received, output an error message. Otherwise, iterate through the list and, using a case statement, test each item in the list to see if it starts with a capital letter, lower case letter, digit or other. Count each type and output at the end the total for each category (capital, lower case, digit, other).

In: Computer Science

Suppose you have the following list of integers to sort: [1, 5, 4, 2, 18, 19]...

Suppose you have the following list of integers to sort:

[1, 5, 4, 2, 18, 19]

which list represents the partially sorted list after three complete passes of insertion sort?

1 2 4 5 18 19

1 4 5 2 18 19

1 4 2 5 18 19

None of the above

In: Computer Science

Description: budget Students will create a real-life budget that utilizes the mathematical operators to show monthly...

Description: budget

Students will create a real-life budget that utilizes the mathematical operators to show monthly income, semiannual income, and an annual income. Students will use correct recognizable variables to describe each budgeted item. Please do not use single letter variables points will be deducted. Be sure to use proper documentation regarding comments to identify what you are doing in each part of your code.

List of budgeted items:

Monthly donations such as charities, special-needs, offerings, homeless.

Other items that may be included in the budget: food, restaurants, entertainment, animal care, mortgage, rent, property tax, household repairs, Utilities, cell phone, cable bill, internet, shopping and this may be broken into categories in itself, fuel, car maintenance, parking fees, medical in this can be broken into categories such as primary care, dental, medications, Insurance this may include car insurance, homeowners insurance, identity theft protection, and long term care for those who have aging parents, next category can be household items such as toiletries, laundry detergent, cleaning supplies, tools, next we have personal care this may include gym memberships, streaming memberships, salon services, Babysitting services, child support, alimony, this category can be Credit card services, personal loans, student loans, may also want to add School supplies, any professional conferences, Financial coaching, also possibly savings accounts, and finally such as birthdays, weddings, anniversaries and Christmas.

You do not have to use every single item in every single possible category because not everyone has the same expenses.

Your monthly budget might look like the following example:

Monthly= food, Rent, babysitter, groceries, car payments, car insurance, donations, utilities, cell phone, Health insurance, and entertainment

Semiannual = car_ maintenance, water_ bill, optical _visit, property _ tax, school_ supplies

Annual =   special occasion, birthday Celebration, holiday spending

To find out your Weekly and monthly income you would do the following multiply hourly wage by hours _worked per week. To find your annual salary multiply your weekly income by 52 or 26 and maybe 12 if you get paid monthly.

Students should make sure to include the following print statements at the end of your assignment:

Four print statements that display the following: Weekly income, monthly income, semiannual income, and annual income.

The Final print statement we’ll include your monthly budget minus your monthly income and your annual income minus your semiannual budget.

Please be sure to use the proper format when printing a dollar amount.

(Python Coding)

In: Computer Science

if this is considered more than one question then please explain part 'I' (Find the exact...

if this is considered more than one question then please explain part 'I' (Find the exact value of f100, f500, and f1000, where fn is the nth Fibonacci number. What are times taken to find out the exact values?). I am having trouble writing the code for both recursive and iterative functions without having the program crash. I assume its because the numbers are so high.

Goal: The main goal of the project is to let students use their prior knowledge, try to use the skills they have learnt to solve real world problems. Using this assignment students are required to learn to use the skills they have learned in their previous classes, solve the problems given and reflect on how they can apply it to solve real world issues.

Deliverables: The students are required to submit a written report along with the programs they have written. The report has to address all the prompts mentioned under the Report section. The report should be properly presented by using appropriate font (Time new roman, preferably font size 12 till 16) and grammar.

Tasks:

  1. Write an iterative C++ function that inputs a nonnegative integer n and returns the nth Fibonacci number.
  2. Write a recursive C++ function that inputs a nonnegative integer n and returns the nth Fibonacci number.
  3. Compare the number of operations and time taken to compute Fibonacci numbers recursively versus that needed to compute them iteratively.
  4. Use the above functions to write a C++ program for solving each of the following computational problems.
  1. Find the exact value of f100, f500, and f1000, where fn is the nth Fibonacci number. What are times taken to find out the exact values?
  2. Find the smallest Fibonacci number greater than 1,000,000 and greater than 1,000,000,000.
  3. Find as many prime Fibonacci numbers as you can. It is unknown whether there are infinitely many of these. Find out the times taken to find first 10, 20, 30, 40…up to 200 and draw a graph and see the pattern.

Report: Your report should address all of the below mentioned questions

  1. Describe the Fibonacci series and write briefly what you have done in the assignment.
  2. What are the different skills, programming techniques have you used in order to run the experiments?
  3. What did you observe when you did the comparisons in Task 3 and Task 4? Explain the graph that you have drawn from Task 4.III?
  4. List at least three different applications of the Fibonacci numbers to sciences and describe one of them in details. Think of situation or a real world problem where you can apply concept of Fibonacci numbers to solve it. Explain?
  5. Write a paragraph, explaining what you have done in this assignment. What were the challenges you have faced when solving these problems. How can you improve the programs you have written to solve these problems? How can you use what you have learned going forward?

In: Computer Science

BUSINESS PLAN ASSIGNMENT 1.      The Business Plan project (for a new business) is to be completed and...

BUSINESS PLAN ASSIGNMENT

1.      The Business Plan project (for a new business) is to be completed and submitted on Day 15. Most days will allow time for in class work plan. However, it will still be necessary to do other work on it. The assignment is worth 30% of the course grade.

2.      The Business Plan must be based on a new business you would like to establish. It should be detailed and comprehensive. You may use the sample plans provided in the Entrepreneurship textbook and in the MyEntrepreneurshipLab. You will also be provided access to the LivePlan online software for creating the business plan. Your new business could be a service, retail, or manufacturing function. It could combine 2 of these or even all 3 but remember, KEEP YOUR BUSINESS SMALL AND SIMPLE.

Instructions for your Business Plan Assignment

1.                  The plan’s maximum is 25-40 (depending on the size of the business) double-spaced pages with no more than 8-10 pages of exhibits or Appendix.

2.                  The plan must include an Executive summary, Table of Contents, Mission, Vision and Culture, Company Summary, Market Analysis Summary, Strategy and Implementation Summary, Management and Operations Summary, Financial Plan, Funding Request and Exit Strategy. Appendices including: Sales Forecast, Personnel Plan, General Assumptions, Pro Forma Profit and Loss, Pro Forma Cash flow, Pro Forma Balance Sheet, Resumes, Fact Sheet and complete list of references.

3.                  It should include a detailed marketing plan that identifies the principal target market(s), its size, location and all demographic and psychographic characteristics. Students should also identify and growth trends in the market and provide appropriate statistical information to support that conclusion. Detailed sections are required on the needs filled by the product or service offering, market research conducted, pricing methods and the proposed promotional programs and distribution system.

4.                  The plan should also include a detailed financial plan linked to the requirements and objectives of the marketing plan. This section must cover the business’ first five years and include monthly statements (income, cash flow and balance sheet for Year 1, quarterly statements for Year 2 and annual statements for Year 3-5. Optimistic and pessimistic forecasts should be included as well.

5.                  Financial methods and the scheduled amounts.

6.                  An exit or harvest strategy for the business.

7.                  Identification of the key attributes and skills brought to the business by each team member who will be active in the business and description of how these will be of benefit to the business.

8.                  Delineation of a medium to long-term growth strategy for the business, i.e., expansion and diversification plans.

9.                  A brief description of the human resources, ethical and social policies of the business.

Students will be required to make a 40-minute presentation of their plan. Students will be evaluated on their creativity, enthusiasm, use of audio-visual aids (PowerPoint is strongly recommended) and public speaking skills.

In: Operations Management

#This function "binarySearchPythonCode" identifies the elements which is present in the start and end values def...

#This function "binarySearchPythonCode" identifies the elements which is present in the start and end values

def binarySearchPythonCode(list, Element, startElement, endElement):

#Variable which describes whether the element is present or not

isPresent = False

#condition check for start and end values

while startElement<=endElement and not isPresent:

#logic for calculating the mid value

midElement = startElement + endElement//2

# if condition which checks whether the mid value is same as element to be searched

if list[midElement] == Element:

#if condition satisfies it changes the flag to true

isPresent = True

#else condition which displays the end value and start value

else:

# if condition checks whether the element is present in the list or not

if Element < list[midElement]:

#if the element is present it calculates the end value

endElement = midElement-1

#else it will calculate the start value

else:

startElement = midElement+1

# returns the flag bit

return isPresent

list = [10, 20, 30, 40, 50, 60, 70, 80, 90]

print(binarySearchPythonCode(list, 40, 10, 90))

python code gives error, index error, how to fix?

In: Computer Science

I've provided a Node class that implements a node of a simple singly-linked list (with .value...

I've provided a Node class that implements a node of a simple singly-linked list (with .value and .next fields), and an empty LinkedList class. Your task is to implement LinkedList.sort(l), where given the node l as the head of a singly-linked list, LinkedList.sort(l) sorts the nodes in the list into ascending order according to the values in the .value field of each node.

Your implementation should do an in-place update of the list. It is ok to use a simple O(n**2) algorithm.

Examples

1. 'b'->'a'->'d'->'c' sorts to 'a'->'b'->'c'->'d'

2. 3->2->1 sorts to 1->2->3

3. "this"->"that" sorts to "that"->"this

this is the provided code you have to fill it in here:

class ListNode:
    """Simple node for singly-linked list"""

    def __init__(self, value, next=None):
        """Create a new node, with optional next node pointer"""
        self.value = value
        self.next = next

def listsort(l):
        """Simple in-place sort of singly-linked list whose head is l"""
        # TODO Replace "pass" with your sort

IN PYTHON PLEASE!!!

In: Computer Science

Instead of using int.TryParse, use int.Parse instead and use try/catch in C# to handle possible errors...

Instead of using int.TryParse, use int.Parse instead and use try/catch in C# to handle possible errors

using System;
using System.Collections.Generic;
                  
public class Program
{
   public static void Main()
   {
       List<int> list = new List<int>();
      
       Console.WriteLine("Please input integers: (in one line)");
      
      
       string input = Console.ReadLine();
       string[] tokens = input.Split(); // split string into tokens "12 13 10" -> "12" "13" "10"
      
       foreach (string s in tokens) {
           int num;
           bool success = int.TryParse(s,out num); // TryParse returns true if successfully converted s into an int
                   // the converted int is put into the second parameter using keyword "out"  
           // do you know why "out" is used here? why not return the converted integer?
           if (success) {
               list.Add(num); // add num to list if success
           }
       }
      
       Console.WriteLine("Sorted input:");
       list.Sort();
       foreach(int i in list) {
           Console.WriteLine(i);
       }
       Console.WriteLine("Sorted input in reverse:");
       for (int i=list.Count-1;i>=0;i--) {
           Console.WriteLine(list[i]);
       }
      
   }
}

In: Computer Science

In Python And Use List comprehension to solve this question Given a file like this: Blake...

In Python And Use List comprehension to solve this question

Given a file like this:

Blake 4

Bolt 1

De Grasse 3

Gatlin 2

Simbine 5

Youssef Meite 6

Your program when completed should produce output like this:

>>>

In the 2016 100 yard dash the top finishers were:

Blake

Bolt

De Grasse

Gatlin

Simbine

Youssef Meite

The people with a two part name are: ['De Grasse', 'Youssef Meite']

The top three finishers were: ['Bolt', 'De Grasse', 'Gatlin']

Your mission will be to do the following:

1. Develop algorithms to solve all remaining steps in this problem.

2. Use a list comprehension to load the data from a file named “runners.txt”.

3. Use the information read in from the file to print out the names of the top 6 finishers formatted as shown in the example above.

4. Use a list comprehension to create a list of the names that have two parts to them.

5. Use a list comprehension to create a list of the people who finished in the top the positions.

In: Computer Science

Write a program named StringWorks.java that asks the user to input a line of text from...

Write a program named StringWorks.java that asks the user to input a line of text from the keyboard.   Ask the user if they want their answers case sensitive or not. You output should be

  1. the list of words in the sentence including duplicates
  2. A sorted list of the words (alphabetically)
  3. A sorted list of words listed backwards (where z comes before a)
  4. A randomly shuffled list of works
  5. the list of words in the sentence alphabetically removing duplicates.

You need to remove punctuation. Use the Character.isLetterOrDigit() method.

Sample output:

Please type in a sentence:

I love java, and Java loves me! That is cool, yes?

Do you want case sensitivity? (y/n):

n

List of words: i love java and java loves me that is cool yes

Sorted alphabetically: and cool i is java java love loves me that yes

Sorted backwards: yes that me loves love java java is i cool and

Shuffled: java that cool is i love and loves me java yes

Without duplicates, sorted alphabetically: and cool i is java love loves me that yes

In: Computer Science