8 kyu
Student's Final Grade
32,272 of 62,595ledocod
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Hy Don't know what i'm doing wrong..help!!! it says i passed 1 and failed 1 o should equal 90!
You should look up the difference between logical operators and bitwise operators in python. While you can use bitwise operators here, the difference in operator presedence is likely going to give you unexpected results.
Sorted!!!!Thank you so much:)
i think my problem was i just didnt read the question properly .. just read it carefully and u can solve it easily
Fixed tests are working well while testing, while submitting the same fixed tests are giving errors.
C++:
There are more tests in the submission test compared to the sample tests. (passing sample tests doesn't always mean your code is correct)
Troubleshooting Your Solution - When I run "Test", everything passes, but when I hit “Attempt” tests fail
Your code is failing cases such as:
Hint: Please re-read the description carefully.
Not a kata issue.
instructions unclear >:c
This is what the difficulty of 8kyu should be. Good exercise.
I have never hated a kata so much.
This comment has been hidden.
your code fails fixed test (55, 0)
not a kata issue
This comment has been hidden.
The instructions were kinda unclear but otherwise p easy
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
What else would you return other than
0
? With an exam grade of20
, the only possible output is0
.Not a kata issue. See https://docs.codewars.com/training/troubleshooting#post-discourse.
Sorry for marking my question incorrectly. Thank you, I didn’t read the assignment carefully, apparently I need to rest
This comment has been hidden.
please check the first condition carefully :)
RISCV Translation
seems good, approved
This comment has been hidden.
LGTM, Approved!!!
Java translation
Approved.
good kata for beginners
Finally a kata that has clear and concise description
This kata challenges you to read carefully and twice LOL
yes it does!
True!
This comment has been hidden.
YOu should return the result instead of printing, refer to sample tests, not a kata issue!
This comment has been hidden.
This comment has been hidden.
Test failed: exam = 0, projects = 10: expected 100 to equal +0 Testing for exam = 32, projects = 10: expected 100 to equal +0
Since projects is 10, shouldn't this be 100? What am I missing?
Obviously with exam = 0 and projects = 10 neither of those conditions is true. The same with exam = 32.
Check the conditions and the operators you're using. 10 isn't more than 10.
if I use >= 10 some test cases fail, if I use > 10 other test cases fail. Either way, something is failing.
If it's not difficult for you, then could you tell us which tests give the wrong answer for
projects > 10
andprojects >= 10
.exam >= 90
is also wrong in your code. As well as several other conditions, check them all again.This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
.
There is some issue in conditions. Based on the conditions - in order to get the final grade, you need to pass ONLY one of the conditions, and not two at once. In my opinion this is wrong. In other words, I can fail an exam with 0 points, but still complete 12 or more projects and get 100 points.
It says or, that means one or the other or both.
where was my attention when I read the conditions...OR/AND..
55, 0 --> 0 , so why for the input 99, 0 --> it expects 100 ?
It's in the description, read it again.
Thanks, my fault
Read the question carefully, the devil is in the details!
exam = 0, projects = 0: expected 90 to equal 0
This does not make any sense. Any advice?
Fix your code, it's returning 90.
This comment has been hidden.
"works for me but fails for everyone else" is not really strange. its a very common occurence in software development ;)
Please see if anything here helps: https://docs.codewars.com/training/troubleshooting/#works-but-no
This comment has been hidden.
Without seeing your code, we cannot really trace the chain of checking conditions in your code.
This comment has been hidden.
the question is canceled. The problem is solved
Nice description of Kata
This code is pushing P
i wish i had this genius
This comment has been hidden.
Прочти внимательно условие
По условию нужно минимум сколько-то проектов, т.е. если у нас за экзамен стоит
80
, а сдали мы проектов42
(допустим), то оценка всё равно будет90
.Haskell translation
COBOL translation
approved
This comment has been hidden.
Use question label. And please share your code in spoiler so that we can help you!
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Notice that the grade also matter, as well as
and
: even if you have a lot of projects, but a pretty low amount of exam points, you won't get 100.good one to test my first branchless solution
This comment has been hidden.
This comment has been hidden.
BUMP ~~
Thanks :)
Converted language-specific blocks into language-agnostic description
May I know why?
Remove translation inconsistencies and continous forking
Annoying kata due to poorly worded instructions.
If you have difficulty in writing, please don't try to get tricky with language. Could have been a better worded Kata.
Thanks for making this ASM-friendly, that was fun :D!
Java translation
Superceded by suggestion above
This comment has been hidden.
This comment has been hidden.
Or I don't understand the task or something with tests does not work. If an exam is 0 and projects 11, should not that be a 0? In details is said that must be exams 'and 'projects with specific values, but it does not work when I use 'or' also.
Julia translation
"100, if a grade for the exam is more than 90 or if a number of completed projects more than 10." the magical "OR" in the middle of the sentance does not seem to commpute when student get 0 in exam and do 11 projects, surely student has 100 not 0.
I don't get what the problem is, in Python the expected value for that input is 100.
I have given up on this for now, until it is clarified - if it is intended to be a "or" or "and". As the attempt seems to keep failing due to returning what apears to be the correct logic for what is currently written. Really wish i could screen shot
or
means any of those conditions being true (or both of them), you have to return 100. Why do you think it could beand
instead? As I said, the expected value is 100 for that input. No need to clarify anything, it's written like that in the description.This comment has been hidden.
it returns 100, the attempt says it should have been 0.. from input exam = 0 projects 11.. I'm lost
I've tried your code several times and it passed every time.
ok I just re-ran it.. now it works. Ghost in the machine..
C# TestCases the values of "Expected" and the returned values are switched. E.G.: It shows "expected 75, but was 100", when should show "expected 100, but was 75"
Fixed.
This comment has been hidden.
Added.
python they have problem: 0 shoul equal 75. It is impossible.
The error message in Python is your function returned 0 instead of the expected 75, check your code. I've checked Python translation and it's ok.
JavaScript doesn't work :(
I've just tested it and it works, the problem must be in your code.
This comment has been hidden.
The instructions are ok.
This comment has been hidden.
not an issue: your code is just incorrect. Issues are for dysfunctionning katas, you're currently asking for a "Question".
For instance, read carefully again the different situations in the description and compare to the booleans you used.
note:
print(exam,projects)
is your friend, btw... ;pThis comment has been hidden.
(think about the spoiler flag too, in the comments. ;) )
TypeScript Translation available, Please approve
test ok
test for one banana
Please, NASM Translation
edge cases are insufficiently tested (python at least, but I guess it's common to all languages). See second comment here
Tests updated in all languages.
C translation kumited
please scrutinize for approval
domo!
Ruby translation available! please approve.
Python translation available! Please, approve.
Approved.
Added PHP translation
Fortran Translation Kumited - please accept :D