+ 1
Can anyone tell me why I am getting answers 50
https://code.sololearn.com/cENMaAl3EoI7/?ref=app Here first I enter like this 6 100 100 100 100 100 100 100 Then I expected to get output 100.0but I am getting output as 50.0 Why (´;д;`)
5 Respostas
0
The reason you got 50.0 since when you added subject marks in Addition .
Some of the subject was in new line.
+ 2
Total_Subjects = int(input(""))
Total_Marks = int(input(""))
if Total_Subjects == 6:
Subject1 = int(input (""))
Subject2 = int(input (""))
Subject3 = int(input (""))
Subject4 = int(input (""))
Subject5 = int(input (""))
Subject6 = int(input (""))
Sum = Total_Marks * 6
Addition = Subject1 + Subject2 + Subject3 +Subject4 + Subject5 + Subject6
Step2 = Addition/Sum
Percent = Step2 * 100
print ( Percent )
+ 1
Now check it.
+ 1
check This out
https://code.sololearn.com/cv82cJzjtl2h/?ref=app
0
It will cause an indentation error