0% found this document useful (0 votes)
415 views1 page

Module 2 Internshala Solutions

The document discusses different data types needed to store cricket player information like names as strings, runs as integers, strike rate as floats, teams as lists, and player stats as dictionaries.

Uploaded by

cazzkiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
415 views1 page

Module 2 Internshala Solutions

The document discusses different data types needed to store cricket player information like names as strings, runs as integers, strike rate as floats, teams as lists, and player stats as dictionaries.

Uploaded by

cazzkiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Module 2 : Assignment Solutions

Data field Data type example Reason


identifier
player_name string Kieron Pollard Names may contain letters and any other
characters.
country string West Indies Country name may contain letters and any
other characters.
total_runs Integer 7687 Runs is integer
strike_rate float 149.57 Strike rate is calculated and may be float
team list West_indies = Teams players change with time so list
[“K.Pollard”,”Sunil selected as list is mutable
Narine”,”Chris Gayle”]
p_stats dictionary P1={‘name’:’Kieron These are like key and cupboard pairs so
Pollard’,’role’:’All dictionary type is used
rounder’,’bowling
style’:’spin’}

You might also like