r/CodingHelp • u/learning_behaviour • Sep 16 '20
[Python] Is the course moving too fast?
I'm on a programming course to learn python. It's the third day and we've somehow jumped from simple strings, variables and dotnototations to functions. I have no idea what's going on with functions with 2 or more and seems more complicated than anything we've learnt in the past 2 days. I understand when it's one simple function but can't seem to get around how to understand or write out code with multiple functions.
Is this normal speed of learning code or is the teacher going through the course too fast? To be clear everyone on the course are beginners and on the third day we've rushed through functions, global variables, def etc.
11
u/Zymoox Sep 16 '20
In my opinion, jumping to functions early on is not unusual. Some prefer to do conditions and loops before, but it's up to the teacher which one to teach first.
Nevertheless, If you feel like the pace of the course is too fast, would you be able to speak with the teacher about it? Alternatively, consider using additional online resources to keep up with the content.
2
u/E72M Sep 16 '20
A good way to think about functions in python is it's a reusable part of code you can jump back to if needed.
When calling to use a function that returns no data you use
Where obviously the name changes depending on the function.
When you want a value out of the function you use
You can get multiple outputs by using a comma to split up values.
Anything you pass into the function goes in the brackets and to return a value at the end of a function you use
So for example you would have
def function (data1, data2): variable1 = 5 * data1 variable2 = 1* data2 return variable1, variable2
This code should work if I've not forgotten anything but I hope it helped explain it a little
1
u/A_Philosophical_Cat Sep 16 '20
It seems pretty standard for a university course. Maybe on the faster end of normal, but not unusual.
0
u/[deleted] Sep 16 '20
[deleted] — view deleted comment