+ 1
How to do this question.(I'm a beginner.)Can you just type the answer here?('cause I really don't know how to do.) Thank you!
Users need to enter 5 subjects, namely Malay, English, History, Science and Mathematics and will display the average, Users also need to display the status of the minimum proficiency level; if one of the subject scores is less than 40, then the program will display "does not reach the minimum mastery level". If all subjects pass, the program will display "minimum mastery level reached."
14 Antworten
+ 3
abbyyy , Ava Alford ,
please keep in mind that sololearn is a *self-learner* platform. if learners get stuck somewhere, they can post a question. this should include a task description with input and output sample.
> also the current code atrempt of the asker should be linked here.
> it is not seen as a helpful behavior when we are going to post a ready-made code, as long as the asker has NOT shown his attempt here.
> it is helpful to give hints and tips, so that the asker has a chance to find a solution by himself.
+ 1
Here is a more beginner approach to the problem:
https://www.sololearn.com/compiler-playground/c5FgrBnNl302
+ 1
Thank you! Ava Alford
+ 1
I'm a beginner also
+ 1
Lothar I get what you are saying. The reason I posted it was that I figured she could learn from the comments contained within the code. I wasn’t trying to just hand out a solution with no learning opportunity so that’s why I made comments. That being said, I get where you are coming from on wanting to see an attempt at solving the problem, and I am sorry if I violated the rules.
0
Hey, I know there's got to be a better way to do this, but I haven't done Python in a while and am very rusty, but it does work from what I've tested. I left comments in it as well to explain my logic.
https://www.sololearn.com/compiler-playground/cQMT29BBnFPC
0
The link is for the code playground by the way. Let me know if you need me to just type it in the comments. :)
0
Let me help you if you should a this questions you are just to answer this questions !
0
I didn't know, how to do it please , can I get more introduce on it
0
Nnorom chika I left a beginner version and a different way to it in the comments if you want to see it. I left that comment with a different account, but it’s me.
0
Why I can't click the link Ava Alford
0
abbyyy I’m not sure. I’ll post just the text in a comment.
0
Beginner version:
#Gathering inputs lines 2-6 (int specifies that the input be of the integer data type so that comparisons may be made)
sub1 = int(input())
sub2 = int(input())
sub3 = int(input())
sub4 = int(input())
sub5 = int(input())
if sub1 < 40 or sub2 < 40 or sub3 < 40 or sub4 < 40 or sub5 < 40: #Checks to see if any of the inputs are below 40
print('Does not reach the minimum mastery level') #Prints if any of the inputs are below 40
else: #Tells what to do if none of the values are below 40
print('Minimum mastery level reached') #Prints if none of the inputs are below 40
0
I think the other one is too long but I made it public