Function Parameters and Typing - Python 3 Programming Tutorial p.7

preview_player
Показать описание
In this tutorial, we're going to be covering function parameters. The idea of function parameters is that we can make our functions fairly dynamic by allowing them to take in parameters and do something specific with them. Let's see a basic example.

#python #programming #tutorial
Рекомендации по теме
Комментарии
Автор

was confused about just_display, but finally understood.

if just_display=False, then run all lines; if true, then skip lines 8-9, which means all inputs would be ignored, and python would just display the board as is.

If you add just_display=true to line 14, then it would essentially ignore your inputs and just show you the board as it currently stands.

referencing lines in video as of 11:40

mrSz
Автор

your videos are very good..but for a novice like me, it becomes difficult to follow when you drift from the problem at hand, and you do that often :)

romilkumar
Автор

When I first watched your tutorial series, I was so frustrated because couldn't understand the functions at all but after coming back from C language I started understanding everything as clear as crystal and these series are just amazing!!! Thank you very much

khamidullokh
Автор

This style of learning really works well for me, I had tried many times to learn Python and gave up at the point of not really knowing why or how these commands are useful. Your delivery is great and the videos are engaging. Keep up the good work.

sndrcve
Автор

You haven't got into if statements but you use them in this video. I know it is easy to understand python statements, but I think some people will get confused anyways. Apart from that, I love your tutorials :)

quas-r
Автор

i was totally fine before reaching this 7th tutorial and i derailed when just_displayed got created.

SpookyGaming
Автор

At minute 3:33 what you've typed is correct but not to force the type of value, it will just give the user a hint/warning about the expected value type, but will not stop you from passing anything. I'm using Pycharm, and when I try to call the function with a string argument, and at the same time, I used this form of x: int inside the function definition as you did, then when I hover my mouse over the string in the calling statement Pycharm will give me a tooltip saying "Expected type 'int', got 'str' instead"

MiledRizk
Автор

Thank you for the excellent explanations. I'm trying to learn Python and realized I'm struggling to write something from scratch, so I must not understand it well enough yet. You're definitely helping.

XIsleTheWanderer
Автор

Can't wait until the next lesson! Tks a lot for helping a hopeless person want to learn programming:))

KhanhNguyen-qopc
Автор

I could only follow up till part 6, I was fine till then but got lost in this chapter with just _display and != etc. Will come back to this after reading up more on the basics.

TrueThat
Автор

This was all incredibly confusing. You have a ton of knowledge which is great. But what happens is it leads to random tangents. It happens at least a few times a video and these are short videos. So say you spend a literal minute on the random tangent that you state we "don't need to know yet" as your saying it. After you do this 3 or 4 times in 12 minute video 1/3 of the video becomes irrelevant information that only leads to confusion. When your learning something new you only get so many "spoons" a day. The spoons are too valuable to be spent on information not currently needed for today's learning. I think you would really benefit from working out a flow chart for the vid and then forcing yourself to stick to it or edit out whatever isn't needed. Like writing clean code.

All in all tho I appreciate you taking the time. Its awesome of you. Being able to teach others clearly and concisely is a skill in itself that does take developing. I think youll accomplish some great things here with time.

kenosabi
Автор

Quite new to programming and a big fan of the quality work/insight in your tutorials. Regarding the line: "game[row][column] = player", please explain the significance of the "player" variable in that line of code. Thanks for all you do!

bayojengo
Автор

Would people stop talking about the mug and concentrate more on the content? `:
It's such an amazing video with so many things taught in just 13 mins and instead of appreciating the pedagogy people are busy talking about the mug

aranavkacker
Автор

this guy is killing me with all his differents mugs :D

MultiSplas
Автор

Loved this way of learning Python... others going through all theory and basics need so much patience and sound so abstract :)

guptagsaurabh
Автор

Wanted to make a comment... in an earlier video you said we could use whatever for column names so I kept mine as a, b, c. This however created an issue when we started feeding parameters because it won't accept a string, it has to be an int or slice. I was able to fix it by declaring a = 0, b = 1, c = 2, this allowed me to feed a, b, c as the column parameter without it getting pissy at me.

Twiztidpenguinz
Автор

Guys I myself had the doubt about the just display parameter. I cleared it with help from discord members.
So the just_display parameter is a luxury for just displaying. We can simply just display the gameboard by setting the player, row and column value to 0 and just typing gameboard() as sentdex had done initially.
But we use just_display parameter because when our code becomes much more complicated we might not remember how we can just display the gameboard; Hence using a just_display
parameter is handy.

nrm
Автор

Thank you.Because of you now I understand the concept and made the program thank you again

amardeep
Автор

For anyone who was wondering, you define what data type a variable is like this:
number = int(16)
You can replace the int with whatever data type you want, for example, you could replace it with 'str' to make it a string, or 'float' to make it a float.

michelleh
Автор

Your tutorials are so good and easy to catch up . Also that' s a very cool collection of Mugs :)

ankitaburman