0% found this document useful (0 votes)
436 views

Python Module 2 Assignment

This document defines various data fields for a cricket player profile, including the data type used for each field such as string for player name and country, integer for total runs, float for run rate, and dictionary and list data types to store statistics and matches played which contain a range of data. The reasons listed for each data type choice are that names may contain letters, runs are whole numbers without decimals, run rate uses decimals, and dictionary and list allow flexible modification of stored data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
436 views

Python Module 2 Assignment

This document defines various data fields for a cricket player profile, including the data type used for each field such as string for player name and country, integer for total runs, float for run rate, and dictionary and list data types to store statistics and matches played which contain a range of data. The reasons listed for each data type choice are that names may contain letters, runs are whole numbers without decimals, run rate uses decimals, and dictionary and list allow flexible modification of stored data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Data Field Idetifier Data Type Example Reason for choosing the

data type mentioned


Player_name String David Warner Name may contain
letters and other
characters
country String Australia Name may contain
letters and other
characters
Total_runs integer 14718 As the runs are
represented by
numbers and no
decimals are included
Run_rate float 23.28 As run rate is
represented by
decimals float() function
is used
Player_statistics dictionary DW={“Name”:”David Statistics contain wide
Warner”, “total runs”: range of data types likes
14718, “sixes”:407, float, integers, string,
“fours”:2081} list etc. to represent run
rates, name, sixes,fours,
number of matches
played etc. Hence dict{}
function is used.
Matches_played lists Matches List[]functionnis used
played=[“test”,”ODI”,”T2 so as to modify the
0”, “IPL”] data whenever
needed instead of
tuple as it cannot be
modified

You might also like