Question: Can you help on these problems? Thanks 3. Function One: wordSalad Recall that in Python, functions can take multiple arguments. The argument list, which defines

Can you help on these problems? Thanks

3. Function One: wordSalad Recall that in Python, functions can take multiple arguments. The argument list, which defines the number and names of the inputs a function expects, is a comma-separate list of identifiers. Thus, if I want to define a function that takes one argument (or input variable) named 'a', I could write the following definition line. def func(a): If I want to define a function that takes two arguments named 'a' and 'b' respectively, I could use the following definition line. def func(a, b): Specification The first function you will write should be called 'wordSalad'. Your function should take four (4) arguments, all strings. The function should return one (1) string formatted as follows: 'I love CS 105 - Intro to Computing Non-Tech Spring 3 of 6 and with and .' Note: there are no double spaces anywhere, there is nothing after the final period or before the first capital I. Example Test Case: wordSalad('Bob', 'Joe', 'lemonade', 'pizza') returns I love pizza and lemonade with Joe and Bob.

4. Function Two: distTravel Recall, Python has built-in mathematical operators. The can be used in expressions, the value of which can be assigned to variables. For example, if I wanted to assign a variable named 'x' the value of the expression 'two times four', I could use the following line of code. x = 2 * 4 All the basic operators you would expect are available. Most are what you would expect, hence: + is addition; - is subtraction; * is multiplication; and / is division. One that can be tricky is exponentiation1. If you want to set 'x' to the value of the expression 'two raised to the third power', commonly written 23, you can use the following expression. x = 2 ** 3 Specification: The second function you will write should be called 'distTravel'. Your function should take two (2) arguments: a - an acceleration in f/s (feet per second); and t - time in seconds. The function should return one (1) number containing the meters from a starting point a traveler has moved assuming a starting velocity 1 This can be tricky because many common programming languages and software packages use ^ for the exponentiation operator. However, in Python, ^ is a bitwise operator, something you do not have to know for this class. CS 105 - Intro to Computing Non-Tech Spring 4 of 6 of zero at time zero and an initial distance traveled from the point of 38m. Recall the distance traveled can be calculated using the following formula:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!