If statement in function Python -


The quick question I was wondering is where I'm going wrong, I am currently studying Python and where I But this simple grade calculator function is going wrong using a mark as a parameter.

This is my code. I was wondering if you can tell me in the right direction (mark) = 16: return ("A") Alief Mark & ​​gt; = 12 more symbols & lt; 16: Return ("B"):

 Elife Mark & ​​gt; 8 and Mark & ​​lt; 11: Return ("C") Alif Mark & ​​lt; 8: Return ("F")  

First of all I do If the "mark" is an integer, I can get rid of the redundant check for those values ​​which have already been checked, then I can get rid of external brackets (thanks, mathias).

  Count of DFGrade (Mark): Mark = In Mark (Mark) if Mark> = 16: Return "A" Alf Mark> = 12: Return "B" Elif Hitting A & gt; 8: return "C" of return "F"  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -