+ 3

1 point for 2 run scored- what's the condition and loop will applied in this. See the code. Is this true?

Run=2 For 1 point in 2 run: Print("run:",1 points) Fir i in range(i,i+1): Print(i,end=',')

30th Jan 2020, 3:34 PM
Utsav Singh
Utsav Singh - avatar
14 Respostas
+ 6
you mean this? point = Run // 2
30th Jan 2020, 4:06 PM
Oma Falk
Oma Falk - avatar
+ 6
ok for i in range(1,Run+1) : if i %2 == 0: print("run:", i, "1 point)
30th Jan 2020, 4:18 PM
Oma Falk
Oma Falk - avatar
+ 3
Yes Oma Falk this is helpful👍
30th Jan 2020, 4:22 PM
Utsav Singh
Utsav Singh - avatar
+ 3
If you are not in a hurry for your prog, I would really ask you to repeat the first python lessons. It is becoming a bit harder now and it is time for u to sharpen your weapon.
30th Jan 2020, 6:19 PM
Oma Falk
Oma Falk - avatar
+ 2
That code piece you wrote doesn't work. Have you tried it in code playground? I also don't understand your question. Can you try to explain more clearly, what you want to do?
30th Jan 2020, 4:03 PM
HonFu
HonFu - avatar
+ 2
Oma Falk additional 5 points for the half century- is this the correct syntax:- For j in range(50): If j==50: Print("half-century:",j,"+5 points")
30th Jan 2020, 6:02 PM
Utsav Singh
Utsav Singh - avatar
+ 2
almost!! for j in range(1,Run+1): if j%50==0: ......
30th Jan 2020, 6:04 PM
Oma Falk
Oma Falk - avatar
+ 2
if you do it like that you will get into a little trouble : in run 50 u get 1 point and 5 points. you want that?
30th Jan 2020, 6:07 PM
Oma Falk
Oma Falk - avatar
+ 2
Yes, i am practicing and also see the previous lessons.😊
30th Jan 2020, 6:47 PM
Utsav Singh
Utsav Singh - avatar
+ 1
Enter the runs scored. run=int(input()) points=run/2 print("points scored:",points)
30th Jan 2020, 4:04 PM
Avinesh
Avinesh - avatar
+ 1
HonFu yes i can explain,this question is regarding module packages this is for the batting in which i have to apply the condition and run a loop for five players
30th Jan 2020, 4:11 PM
Utsav Singh
Utsav Singh - avatar
+ 1
Thanks Oma Falk but i have to create module packages i think i have to use the if condition and after that run a loop for the five player which is required
30th Jan 2020, 4:14 PM
Utsav Singh
Utsav Singh - avatar
+ 1
No, Oma Falk i want it separately
30th Jan 2020, 6:11 PM
Utsav Singh
Utsav Singh - avatar
+ 1
Utsav Singh we need a case statement.
30th Jan 2020, 6:16 PM
Oma Falk
Oma Falk - avatar