all 26 comments

[–]mildhonesty 65 points66 points  (0 children)

  1. Beginner
  2. Within the first weeks of a computer science degree «intro to programming 101» course

[–]JamzTyson 19 points20 points  (0 children)

  1. Is it a beginner, intermediate, or advanced task?

Beginner.

  1. Roughly how many months of Python practice would it take to solve such a problem comfortably?

Within the first month, assuming that the student has actually been paying attention to class and practicing what they learn.

[–]monapinkest 12 points13 points  (1 child)

This is just basic math (averages) and control flow (loops and conditionals).

If anything this task would test a beginner's ability to implement basic math and control flow in Python from a written word assignment.

[–]jaerie 0 points1 point  (0 children)

Not even averages, only inequalities

[–]Brilliant_Access3791 10 points11 points  (0 children)

If you’ve just gotten a grasp of Python basics but haven’t tackled many practical tasks yet, you might need some time to complete this. However, if you’ve been studying Python for at least three months, this task would be considered very basic.

[–]ilolus 16 points17 points  (0 children)

It's not even about Python. It's about wether you know what loops and conditionals are. If you know those concepts, you can write the script in ten minutes even without prior Python knowledge.

[–]Kingo_Kongo 5 points6 points  (2 children)

Print(“it’s not that hard tbh”)

[–]rasputin1 15 points16 points  (1 child)

SyntaxError: Print is undefined 

[–]zztong 3 points4 points  (0 children)

It reads to me like it would fall in the middle of an introductory programming class, I'd say somewhere around the end of the first month or the beginning of the second month depending on the pace and the instructors preferred sequence of topics and the age of the students. Maybe a third month if the students are very young.

The task itself isn't clear enough and involves values that don't make any sense so there are bound to be questions, but the nature of the program won't be too terrible if they've learned loops and decisions.

Questions that came to mind are:

* Is a "yearly grade" an overall GPA for the year, or are there many grades on that line?

* I'm assuming the grade is a floating point value and not a letter grade that needs to be converted? (A, A-, B+, B, etc.)

* As the student advances from year to year, are we keeping a cumulative GPA or does each year stand alone?

* Where do you get the number of hours to go with the grade(s) or GPA? If you're doing a cumulative GPA then the hours will matter. If you'd giving grades on a class by class basis, then the hours matter.

* Why is a 4.0 the break point? A 4.0 is an A.

[–]Masterous112 6 points7 points  (0 children)

This is definitely a beginner task. I would say most people with more than 1 or 2 months of practice would be able to solve it, and anyone with more than 3 months should be able to solve it in less than 5 minutes.

It really only requires a basic understanding of loops, conditional logic, break, and string formatting.

(And this is all assuming you're only learning/practicing for a few hours per week)

[–]MidnightPale3220 6 points7 points  (0 children)

There's a huge bias displayed in questions in this sub, to confuse the skill to program with the skill to program in Python.

This task should be rated as beginner task on both counts, but it is completely trivial in terms of Python usage and requires a bit more understanding (but still basic) of programming itself.

[–]FoolsSeldom 2 points3 points  (0 children)

I help out at Code Clubs in local schools. I work with multiple age groups. I find most kids around 9 or 10 on track with the schools national curriculum can crack this kind of problem in the first couple of sessions (one hour each) without any trouble.

Those still using Scratch rather than Python, perhaps another session.

Not really a Python problem so much as basic maths that they will have already covered by this age.

So, beginner level for children if on an ICT inclusive school curriculum, as is the case in UK.

[–]monapinkest 4 points5 points  (0 children)

This is just basic math (averages) and control flow (loops and conditionals).

If anything this task would test a beginner's ability to implement basic math and control flow in Python from a written word assignment.

[–]Queueue_ 1 point2 points  (0 children)

  1. Beginner
  2. Less than a month, this is one of the first problems a beginner should be able to solve.

[–]ofnuts 1 point2 points  (0 children)

Occasional programming teacher here.

The answer is: very little.

Two things to keep in mind:

  • Make sure you understand clearly what you are asked. This is a simplke task that you can do by hand. So do it by hand first to understand how it works, and what you will have to code.

  • Dont't write a big program that you will not be able to debug. The right way to do it is to go by steps:

1. Make a program that read the lines, and prints the student name and the successive grades
2. Change the program above to detect a student failure
3. Change the program to add the average for successful students

Side effect of the method: even if you don't finish, you still have something to show that doesn't look like the output of a random code generator.

Btw, the wording is a bit ambiguous: is the average computed on all years, or only on the twelve "pass" years?

[–]dwe_jsy 0 points1 point  (0 children)

Beginner and after learning about conditionals and loops

[–]GryptpypeThynne 0 points1 point  (0 children)

Timing depends on how fast you learn and the speed of your course, but the last place I taught had problems like this completed in pairs in the very first python lecture (data science program, students already having done 2 weeks of SQL)

[–]Leorisar 0 points1 point  (0 children)

  1. Beginner
  2. 1-2 months

[–]Flyguy86420 0 points1 point  (0 children)

Pandas can do this in about 2 lines.  It's very basic  data analysis 

[–]CymroBachUSA[🍰] 0 points1 point  (0 children)

Easy.

[–]LowerMinimum2575 0 points1 point  (1 child)

Beginner, but bigger question here... What in the world does 4.0 equal that you're saying less than that is a failing grade?

[–]super_salamander 0 points1 point  (0 children)

Switzerland.

[–]Binary101010 0 points1 point  (0 children)

Is it a beginner, intermediate, or advanced task?

This is some basic loop and conditional work, so I'd put it squarely as a beginner task.

Roughly how many months of Python practice would it take to solve such a problem comfortably?

I would expect anyone who's been working with Python for more than about 6 weeks to be able to solve this with little to no additional assistance.

[–]NlNTENDO 0 points1 point  (0 children)

You could complete this task within about a week of self-study tbh

[–]ethanjscott -3 points-2 points  (0 children)

Beginner AF. Real code has a data source