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

Int Sri

Uploaded by

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

Int Sri

Uploaded by

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

batsmansNo = int(input("Enter No.

of batsmen played\n",))
batsmans=[]

for i in range (0 ,batsmansNo):


batsman={
'name':'',
'teams':[],
'formats':[],
'matches':0,
'runs':0,
'ballFaced':0,
'fours':0,
'sixes':0,
'strikeRate':0,
}

# name
batsman['name'] = str(input("Name:\n"))

# teams
teamsNo=int(input("no teams he played: \n"))
for i in range (0,teamsNo):
teamname=str(input('team: '))
batsman['teams'].append(teamname)

# formats
formatsNo=int(input("enter the no of formats he palyed\n"))
for i in range(0,formatsNo):
formatName=str(input("format: \n"))
batsman['formats'].append(formatName)

# matches runs balls fours sixes strike rate


batsman['matches']=int(input("matches:\n"))
batsman['runs']=int(input("runs scored:\n"))
batsman['ballFaced']=int(input("ball faced:\n"))
batsman['fours']=int(input("fours:\n"))
batsman['sixes']=int(input("sixers:\n"))
batsman['strikeRate']=(batsman['runs']/batsman['ballFaced'])*100

print(batsman,'\n')

batsmans.append(batsman)

print('batsmans data....\n')
for b in batsmans:
print(b,'\n')

You might also like