Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function that takes, as an argument, an object of one of the seven types of input indicated in the table below (these are

Write a function that takes, as an argument, an object of one of the seven types of input indicated in the table below (these are just examples of the type of input that this function will examine), and returns a description of the type of input, as specified in the table. Name this function whatAmI(thing).

whatAmI(23) should return "Non-Negative Integer", whatAmI("23") should return "String with Digits", whatAmI("yibbie") should return "String with letters", whatAmI(-13) should return "unidentified object", whatAmI("yib4bie") should return "unidentified object", whatAmI(23.0) should return "unidentified object", and whatAmI("23") should return "unidentified object".

If none of these apply, return the stringUnidentified object. Characters for punctuation are neither digits nor letters. They should be classified as Unidentified object at this point.

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

Understand different HR analytics software available in the market

Answered: 1 week ago

Question

3. How would you address the problems that make up the situation?

Answered: 1 week ago

Question

2. What recommendations will you make to the city council?

Answered: 1 week ago