PYTHON FUNCTIONS (Beginner's Guide to Python Lesson 6)

preview_player
Показать описание

---

Welcome to the Beginner's Guide to Python! This is video #6 in the series. In this video, I'm going to show you how to create and use functions in Python.

COURSES I TEACH

OTHER VIDEOS YOU MIGHT LIKE
Рекомендации по теме
Комментарии
Автор

Been struggling grasping functions. This helped more than any video so far. Thanks!

MyechalChannel
Автор

After watching lots of explanation. I understand the concept of function now. Thank you

CV-vbfb
Автор

I am a teacher and I know what does mean teaching? you are a great teacher, others know their topic but they teach mechanically

jaouadelhilaly
Автор

the best explanation of why you would use a function. Every other video I watched did a horrible job. I was never quite sure what they were saying. You just laid it right out..Thank you.

rickjohnson
Автор

Your videos are great quality and VERY informative! Thanks so much! I hope you become successful on Youtube! You've earned yourself a subscriber!

crontsquared
Автор

Perfect explained !! I hve seen other videos but none of them have explained like this.. simple to perfect function code..

mukeshdhiman
Автор

Ty for this super helpful video since i have problems with arguements

nubcops
Автор

One of the best Python videos I've seen. Good job guys! A very simple way to explain Python for beginners like me.

ibukunsokeye
Автор

This was SO helpful thank you so much. Please keep up the amazing work.

jeannielee
Автор

This was the most helpful Vid on functions so

jimbo
Автор

Thanks a lot mahn, couldn't get a video explaining functions as clearly and simple as you did...subscribed 👌

kennedynjogu
Автор

Thank you for this video on defining and calling functions . It helped a lot 😊

smithabb
Автор

THANK YOU SO MUCH FOR MAKING THIS YOU LITERALLY SAVED MY LIFE

caialyu
Автор

Dear sir, words and letters are not enough visible. If you keep the camera on them, it can help us better.

jk
Автор

Brooo i fellow you everywhere you go... Your my way on this quest to start using python. i want to be a python guy before December 2019. you have to make it happen broo.

ernestmbila
Автор

how can I change game to false when the conditions are met in the winner() function? This is a tic tac toe game.




import random

board = ["0", "1", "2", "3", "4", "5", "6", "7", "8"]
def drawBoard():

print(board[6], "|", board[7], "|", board[8])

print(board[3], "|", board[4], "|", board[5])

print(board[0], "|", board[1], "|", board[2])

def check_player_o():
player_o = random.randrange(0, 9)
if board[player_o] != "x" and board[player_o] != "o":
board[player_o] = "o"
else:
check_player_o()

def winner():
if board[0] and board[1] and board[2] == "x":
print ("Player X is the winner")
game = False


drawBoard()
game = True
while game:
player_x = int(input("Enter where you want to place (0-8)"))
if board[player_x] != "x" and board[player_x] != "o":
board[player_x] = "x"
check_player_o()
drawBoard()
winner()
print(game)


else:
print("That Place is Already Occupied")

be
Автор

Great explanation for the beginner like me. Thanks buddy

KiranDevraaj
Автор

very helpful, ThanQ... i was trying to create a function (without any arguments) to print a statement and use this function repeatedly in different blocks (mostly with If Else statements) of the program, but the function is working only in the first block and not in of the rest of the code... can anyone guide where i am going wrong

sivachalla
Автор

How to call a function with arguments like variable, value, and expression? I have trouble understanding this and I don't see much tutorial on this ☹️

angeloalonzo
Автор

I tried to just make the name default to see it work but it shows blank when I run it... how do I get the default name to work?def greet_customer(name='timmy', num_apples=10):
    print('Hello, ' + name)
    print('We have ' + str(num_apples) + ' apples in stock')
greet_customer('Mark', )
greet_customer('brooke', 6)
greet_customer('', 2)

aaronacj