Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
44 views

Python M2Assignment Solution

This document provides a sample solution for a module 2 assignment by listing various data fields, their data types, examples, and reasons for using those data types.

Uploaded by

chandan gowda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Python M2Assignment Solution

This document provides a sample solution for a module 2 assignment by listing various data fields, their data types, examples, and reasons for using those data types.

Uploaded by

chandan gowda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Module 2 Assignment Solution

Sample Solution
There is no single correct solution for this assignment. This is a sample solution.

Data field Data type Example Your reason for using this
identifier data type

player_name String Virat Kohli Names may contain letters


and any other characters.
country String India Country name may
contain letters and any
other characters.
fours Integer 12 Number of fours hit is an
integer, cannot be a
decimal
run_rate Float 2.5 Run rate is the runs
required per delivery. This
can have decimal values.
p_stats Dictionary p1={'name':'Virat Kohli', This is a collection of
'role':'bat', 'runs':112, '4':10, relevant player stats.
'6':0, 'balls':119, 'field':0}
team List india=["v.kohli",""m.s.dhoni", A changeable collection of
"y.singh","r.sharma","r.ashwi player names.
n",""a.rahane"]

Programming with Python

You might also like