Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Homework 3 - Vectors and Strings Function Name: vineCompilation Inputs: 1. (char) The first vine quote 2. (char) The second vine quote Outputs 1. (char)

image text in transcribed
Homework 3 - Vectors and Strings Function Name: vineCompilation Inputs: 1. (char) The first vine quote 2. (char) The second vine quote Outputs 1. (char) A compilation of the vines Background: It's Sunday afternoon and you're hanging out in your lounge, finishing off your Sprite Cranberry. Your Mom Friend (Jared, 19) waks in and yells at you for drinking soda for breakfast Aggravated, you YEET the empty can down the hall as Jared drags you to the kitchen to make breakfast. You open the fridge to find some tortillas, eggs, and wow! Look at all hat chicken! Jared says he could make the perfect breakfast tacos if he only had some fre sha voca do. You guys get your fre sha voca dos and Jared makes you some scrumptious breakfast tacos. To repay him, you make him a compilation of his favorite vines, with a little help from your friend MATLAB Function Description Given two string inputs, swap the first and second halves of the first input and sort the second input in reverse alphabeical order. Then, "compile" the two strings by inserting the first string into the odd indices of the output, and the second string into the even indices of the output. If one string is longer than the other, add exclamation points to the end of the shorter string so the strings are the same length. Example: vine1- This can empty. YEET vine2- fre sha voca do compilation-vineCompilation(vinel, vine2) inelpty. YEETIThis can em vine2 vsroohfedcaa Notes If the first string's length is an odd number, split it into two unequal halves with the first half being longer than the second, then swap them. Hints The sort) function can take in two parameters. . The ceil) function may be useful

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

How much can you spend?

Answered: 1 week ago

Question

Takes a confident approach to leading the efforts of others.

Answered: 1 week ago