Posted: September 15th, 2022
Strategy
Strategy
Building a Python application
Python can be used to develop different applications. In this case, I will be using Python application to store the names, birthdates, and addresses of members of an extended family. In order to determine the data types that I would need for my application, I will utilize the type () function. As such, I will place the variable inside the type () function and Python will return the data type. For instance, in order to establish what data type ‘names’ belong to, I will, for instance, type (Mark) and Python will respond by indicating what type of data the name Mark belongs to.
Notably, data elements denote to values of any Python datatype. In this regard, the first data type to be used is integers. These will represent numeric numbers, and particularly those with whole numbers. In this case, they will be used to represent the addresses of members of the extended family. The second data type is float which stands for ‘floating point number.’ This will be used for rational numbers, and in this case, the birth dates. String is the other data type to be used. Strings basically denote to collections of words, alphabets or other characters (VanderPlas, 2016). Strings will be used to represent the names of the family members. The last data type is dictionary. In Python, dictionaries are lists of Key:Value pairs. As such, the dictionaries will be used to hold the aforementioned information and associate them through keys. It is also important to note that the major operation of a dictionary is to retrieve a value on the basis of the key name (VanderPlas, 2016). Moreover, dictionaries will be utilized to sort, iterate and compare the data.
Reference
VanderPlas, J. (2016). Python data science handbook: Essential tools for working with data.
O’Reilly Media.
Order | Check Discount
Sample Homework Assignments & Research Topics
Tags:
Strategy