Question: In the cell below try writing a function called check _ for _ strings that takes a value as an input argument and returns the

In the cell below try writing a function called check_for_strings that takes a value as an input argument and returns the Boolean value " True "if the value is a string and the Boolean value "False "if the value is not. While we have been making use of Boolean True / Fatse values in a variety of ways in class up to this point, we may not have discussed them explicitly previously. You can learn a bit about the Boolean data type here. Basically, when we evaluate a conditional statement, we either get a True Boolean value or a False Boolean value -- it really is that simple.
Useful tip: You can use the built-in type() function to determine the type of a variable. You may wanted to experiment with using the type () function to convince yourself how it works.
Once you've completed your function, make sure you also test your function to ensure that it works as you intend!
Important reminder: The moment a function comes across a return statement, it will exit the function and ignore any code that comes later in the function. This can actually be kind of useful if you want a function to return a value based on set of conditional statements.
#Put your code here
def check_for_strings():
 In the cell below try writing a function called check_for_strings that

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 Databases Questions!