+ 3
How will i get output, help me to find my mistake because simple code i will able to do but find difficult to compute the output
def batscore(d): name=d.get('name') runs=d.get('runs') balls=d.get('balls') batscore=int(runs/2) four=d.get('4') six=d.get('6') batscore=int(runs/2) if batscore>=50: batscore+=2 if batscore>=100: batscore+=10 if runs>0: sr=runs*100/balls if sr>=80 and sr<100: batscore+=2 if sr>100: batscore+=4 batscore=batscore+four batscore=batscore+2*six return{'name':name,'batscore':batscore} https://code.sololearn.com/c1amcWk081VQ/?ref=app https://www.sololearn.com/discuss/2153738/?ref=app
13 Antworten
+ 3
Can you write this program on Sololearn Playground?
+ 3
Oma Falk thanks again bro😊
I found my mistake and i will definately upload more codes and try to practice hard and thanks for your kind helping😊
+ 3
Thank you so muchValerii Mamontov
+ 3
SACKITEY ELIJAH DAVID
Please dont post questions under other peoples question.
Post your own for that.
+ 2
https://code.sololearn.com/cC30CmWoS2vn/?ref=app
Here is the output.
+ 2
Oma Falk
Not found funny😕
It takes time bro but i'm trying that is enough for me
+ 2
Utsav Singh
first time it is always a bit hard.
look here
https://www.sololearn.com/post/75089/?ref=app
It will help u a lot for next posts and after done once it is easy.
+ 2
https://code.sololearn.com/c24cSmlpnQui/?ref=app
p.s. look at my comments in your code (#)
+ 1
Hi,
u defined a function batscore that takes a dictionary abn returns it... a bit modified.
for output now call the function and print the dictionary
print(batscore(aDict))
where aDict is a dictionary.
+ 1
Utsav Singh you are welcome
I saw your cricket code.
+ 1
My freind, use online-visualization: http://pythontutor.com/visualize.html#mode=edit
0
Utsav Singh !!!
dont make me sick!!
hurry up yourself linking your code!!!
😅😅😅
0
Please assuming I what to write a code in Java that will off a mobile phone how can I write that code please I need help