Thứ Tư, 29 tháng 11, 2017

News on Youtube Nov 29 2017

Wondering how you can mix background vocals that sound like the pros?

Keep watching to find out.

Hey, this is Jason Moss from BehindTheSpeakers.com, and today you're gonna learn three simple

tips for mixing background vocals that sound clear, balanced, and radio-ready.

Now, before we dive in, I also put together a free vocal mixing cheatsheet that's packed

with tips and tricks for taking your vocals to the next level.

So if you wanna download this, it's completely free.

You can click the link in the description below or up there in the video to get instant

access right now.

My first tip is to process background vocals independently.

Now, most of the time when we're talking about background vocals, we're not just talking

about one track.

We're talking about eight tracks or 16 tracks, where there are multiple versions of the same

part, or there are multiple parts that make up a background vocal arrangement.

Now, a lot of the time, people will group all of these tracks together and they'll process

them on the group.

Now the problem with this approach is, let's take compression, for example.

If you put a compressor on a group of background vocals, the compressor can't control the level

of individual background vocal tracks within that group.

All it can do is turn down the level of the entire background vocal stack.

And so what ends up happening is, while you might control the level of the background

vocals as a whole, you're not evening out the differences in dynamics and volume between

those individual background vocals.

So instead of processing things on the group or on the bus, it's usually a better approach

to apply processing to each individual track in your background vocal group.

So usually that's gonna give you better results.

You can apply some processing on the group of vocals, maybe some subtle EQ or even some

compression.

But for the most part, I try to do most of the heavy lifting on the individual background

vocal tracks within that group.

The second tip is you wanna tighten up the timing.

Now, timing between background vocals is incredibly important.

And whenever you get one performance that's been recorded multiple times, it's very natural

to have subtle variations in those performances.

So, in one performance, the vocalist might have sang a note a little bit later than another

performance, so you have all these subtle different variations, right?

But over the course of a group of background vocals, it just creates this kind of messy,

sloppy sound where things are kind of starting and ending in different places, and it just

sounds kind of amateur.

So what I like to do is go through the individual tracks and actually tighten up the timing

and make sure that everything's kinda consistent.

Things are starting and ending in the same spot.

There's no kind of weird performance where something just kinda pops out and it comes

way earlier than the rest of them.

And I usually like to use the lead vocal as the guide.

If you match the timing of the background vocals to the lead vocal, that's always gonna

lead you in the right direction.

Now, there's a tool called Vocalign that you can download.

It's a plugin that will allow you to basically do this automatically.

It's not always 100% effective, but this is a great tool when you have tons of background

vocals if you just wanna line things up really quickly.

But I wanna jump into my DAW and show you basically how I approach this manually.

So if you don't have this plugin, don't worry.

I'm gonna show you right now how I do this and clean up the timing on the background

vocals in my mixes.

Okay, so I have a track here called "It Starts Today" by artist Leah Capelle.

I wanna take a listen to the lead vocal and the chorus, along with the background vocals

in solo.

So something just to note here, Leah is an amazing singer and her background vocals always

come in perfect.

I never have to do anything to them.

So I actually had to move things around a little bit just to create this demo.

So don't be deceived—Leah's an amazing singer.

♪Oh I won't tell you to put your hands up ♪

♪ 'Cause we all know we're gonna get stuck on the wire ♪

♪ Our feet to the fire ♪

♪ So tell 'em right now we're gonna be free ♪

So the timing isn't terrible by any means, but I feel like things can be a little bit

tighter.

The background vocals don't quite mesh with the lead vocal.

And when you have tracks like these where there are a lot of words going by very quickly,

it's pretty common to have this, where the timing is just a little bit off.

So if we scroll down here, you can see there are four background vocal tracks.

So what I'm gonna do is drag this first background vocal track up so it's right below the lead

vocal track.

I'm gonna zoom in a little bit and just make this a little bit bigger.

And using the lead vocal as a guide, I'm basically gonna adjust the timing of the background

vocal tracks so that it matches the lead vocal a little bit more closely.

Now, depending on what you're working in, what DAW you're working in, there are different

ways to do this.

In Pro Tools, there's something called elastic audio, and the way that you turn it on is

over here.

So I'm just gonna set this to monophonic, 'cause there's only one note at once in this

vocal track.

And then I'm gonna change the view mode on this track to warp.

Now, if you're in another DAW, obviously these steps are gonna be different, but you wanna

just look in your manual for elastic audio, flex time, or something like that that allows

you to adjust the timing of individual tracks.

So I'm gonna zoom in here, and now you can see we have these warp points.

And I can go through and basically adjust the timing of this background vocal track

to match the lead vocal a little bit more closely.

So I'm gonna just do this visually.

I'm not really listening to things right now.

I'll probably listen to it later and make sure that things are lining up and that there's

no kind of weird glitches or anything like that.

Now after I'm done with this background vocal track, I'll go through the rest of the background

vocals and do the same thing.

If you take the time to do this, I know it's kind of a pain and, you know, it's not the

most fun part of the music-making process, but this is the stuff that really is gonna

make a difference when it comes to the sound of background vocals.

And it's just gonna make things sound a lot tighter, cleaner, and a lot more radio-ready.

It's just gonna sound like the stuff you hear on the radio.

The third tip is to remove the breaths on the background vocals.

Now, this might sound a little bit weird; I know a lot of people like to leave the breaths

in.

But I've found that the breaths can often be sources of inconsistencies between the

tracks and the background vocal group.

So often times, one track, the vocalist will have taken a breath in earlier, and in another

one it's kind of late.

And so you get this kind of mish-mosh of different breaths that occur at different times.

And the trick here is you can often get rid of the background vocal breaths completely

and you're not gonna miss them.

Now, I always leave breaths in on the lead vocal, and I'll automate them if they're too

loud so they don't get distracting.

But because you have those breaths on the lead, you can often get away with just taking

them completely out of the picture on the background vocals and you don't miss them.

Because really, they're only a secondary element in the mix.

So by getting rid of those breaths, it's just gonna contribute to a cleaner, tighter background

vocal sound.

You're not gonna have breaths that are all over the place, that are pulling you away

from whatever the primary focus of the track is.

I hope you enjoyed these three tips for mixing background vocals.

And if you want to dive deeper, I put together a free vocal mixing cheatsheet that's packed

with tips and tricks that I didn't have time to cover here.

So if you wanna download this, you can click the link in the description below or in the

video and you'll get free instant access.

Thanks so much for watching.

And if you want more mixing tips like these, you can check out my website, BehindTheSpeakers.com.

Take care.

For more infomation >> 3 Simple Tips For Mixing Background Vocals Like A Pro - BehindTheSpeakers.com - Duration: 7:38.

-------------------------------------------

Newt Gingrich Makes Shocking Reveal, He Said 3 Simple Words That Will End Trump-Russia Investigation - Duration: 3:01.

The Silence Is Broken! Newt Gingrich Makes Shocking Reveal, He Just Said 3 Simple Words

That Will End Trump-Russia Investigation For Good

Newt Gingrich has one justifiable reason motivation behind why you shouldn�t put stock in the

free Russia investigation. Keep in mind a couple of things � the investigation�s

head, Robert Mueller, should be non-partisan. What�s more, in fact, when he was first

contracted, everybody applauded him for being quite recently that.

So it�s a little odd that his activities are currently indicating support to Democrats.

Which might be the reason Gingrich is stating that his investigation is rigged.

Via MSN:

Former House Speaker Newt Gingrich, a key ally to President Trump, [said this morning]

that the ongoing investigation into the Russian interdling of the election, led by Special

Adviser Robert Mueller, is a �rigged game� for its lack of pro-Trump attorneys On the

case.

While Gingrich said he would not recommend that Mr. Trump should fire Mueller, he questioned

the investigation�s impartiality since Mueller has so far hired four Democratic attorneys.�He

apparently could not find a single pro-Trump attorney to hire, and I just think that�s

a rigged game, and I think it�s a mistake to pretend this is going to be some neutral

investigation,� Gingrich said.

Gingrich is right. Mueller has the ability to enlist his own investigative group. Furthermore,

the main individuals he�s employing all originate from the Democrats. Newt knows a

rodent when he notices one.

The most exceedingly awful piece of everything is that it�s a change of heart � Gingrich

at first had a favorable opinion of Mueller. As did most men and ladies in Congress.It�s

simply subsequent to watching Mueller�s activities that he is starting to have questions.

Asked if he thought the attorneys were �anti-Trump�, Gingrich responded, �Well all four gave

money to the Democrats,� and later laughed off a suggestion that they were the best attorneys

Mueller could find.

�You�re suggesting that in the whole country there are no republican attorneys that Mueller

could have hired,� he added, �I do not give the benefit of the doubt to someone who

could only hire Democrats but claims we should trust him . �

Libs in Congress have your run of the mill reaction � �Gingrich is just trying to

sow distrust in the investigation, blah, blah, blah.� But Gingrich has a straightforward

approach to gauge transparency, and he explained it:

�Let�s just have transparency. Could we have as many pro-Trump lawyers as we have

anti-Trump lawyers? �Something discloses to me that Mueller wouldn�t accept Gingrich�s

recommendation.

What do you think about this? Do not hesitate and write your thoughts in the comment section

below.

For more infomation >> Newt Gingrich Makes Shocking Reveal, He Said 3 Simple Words That Will End Trump-Russia Investigation - Duration: 3:01.

-------------------------------------------

Husqvarna 701 Vitpilen & Svartpilen concept | VITPILEN 701- Simple. Progressive. | Mich Motorcycle - Duration: 1:26.

For more infomation >> Husqvarna 701 Vitpilen & Svartpilen concept | VITPILEN 701- Simple. Progressive. | Mich Motorcycle - Duration: 1:26.

-------------------------------------------

Make grunge simples com glitter | Simple glittery grunge makeup - Duration: 6:45.

Concealer by Vult color R-102

Face powder by Marchetti color Natural 01

Face powder by Mary Kay color Beige 2

Eyebrow pen by Vult color 02

Black eyeliner pencil

Black eyeshadow by Bless Cosmetics

Highlighter pencil by Vult

HD foundation by Vult color B-05

Translucent powder by Mary Kay

Face powder by Mary Kay color Beige 2

Eyeshadow primer (by O Boticário) + Glitter 01 by Vult

Clean brush

Blush by Mary Kay color Shy Blush

Homemade highlighter (link in the description)

Eyelash mascara by Natura

Matte liquid lipstick By Dailus - color Jetés

And u're done! :)

Thank u so much for watching

Don't forget to subscribe!

Luv y'all! Bye :3

For more infomation >> Make grunge simples com glitter | Simple glittery grunge makeup - Duration: 6:45.

-------------------------------------------

Simple Winter / Christmas Nail Art | Streitthema: KVO - Infobox | Carat Nails - Duration: 23:31.

For more infomation >> Simple Winter / Christmas Nail Art | Streitthema: KVO - Infobox | Carat Nails - Duration: 23:31.

-------------------------------------------

One balloon Christmas tree model tutorial - so simple! - Duration: 4:06.

For more infomation >> One balloon Christmas tree model tutorial - so simple! - Duration: 4:06.

-------------------------------------------

new Arabic mehndi design | easy latest simple mehndi design | step by step | design4hobby - Duration: 13:53.

please subscribe to my channel & like my videos, if you like my designs

please subscribe to my channel

please subscribe to my channe & like my videos, if you like my designs

For more infomation >> new Arabic mehndi design | easy latest simple mehndi design | step by step | design4hobby - Duration: 13:53.

-------------------------------------------

Simple Decorating A Christmas Tree! - Duration: 4:53.

hey guys welcome back to my channel and if you're new then welcome actually I'm

I wanna apologize to people who requested Christmas Station ID by abs-cbn now

young Christmas just love song pretty long title but I've tried to actually

react and I did it and it was really good in my opinion but I wouldn't even

publish it like I tried to publish that video and YouTube just say that it's

blocked worldwide the reason is it has copyright claims so I can't really

publish the video so I'm very sorry if I fix that I would definitely publish it I'm

about to actually decorate Christmas tree gonna be there instead of

those chairs it's gonna be there I'm very happy actually I'm very excited for this

Christmas vlog so yeah let's just start a good day first of all I'm

gonna go to the doctor okay this is not a huge Christmas tree so I tried to grab

it and then it fell down

look at this look at this it's so beautiful it's not like a huge one but

it's so beautiful I like small and simple trees like this

aww so cute this is like a new Christmas tree hey it has like a cute

snowflakes on it I don't know it looks so cute

I mean it's not really good I didn't know there's something wrong in it

but I'm trying to surprise my family when they come back there to find this

Christmas tree and it's gonna be so festive I'm sorry mommy this is not

really good I know that you will fix it and you will see this video as well

here here here what like it looks really cute beautiful there right big this one

so I'm gonna add it to the tree okay I know this is really bad I know this

sucks but it's Christmas guys I don't know to me it looks cute well I know

it's not

some fresh mints in my tea because it tastes even better

Oh Cheers

tastes awesome make it festive

it's starting to look better look at this baby oh yeah

so at the end guys I discovered that we don't have all the things that deep to

dilute it to decorate all the over so I just say they're not decorating the

Christmas tree and I think it looks really good and doesn't have so many

colors it has won the silver golden red I think that duis colors are really good

in my opinion because I like these colors or the treatment under green so

yeah I'm gonna show you my Christmas tree

so yeah that's it for today don't forget to stay tuned because I have a Korean

box full of noodles arriving in my mail soon and I'm gonna

eat that and yeah do kind of like a Muckbang thing so yeah stay tuned for my

channel I hope you guys enjoyed this video and if you did don't forget to

click on the subscribe button like share don't forget the bell bottom mixes the

subscribe button and yeah I'm speaking fire someone right so yeah

seeing this time bye-bye

For more infomation >> Simple Decorating A Christmas Tree! - Duration: 4:53.

-------------------------------------------

My 7 years old brother does voiceover - Simple/Casual makeup look // maddieisnothere - Duration: 5:05.

For more infomation >> My 7 years old brother does voiceover - Simple/Casual makeup look // maddieisnothere - Duration: 5:05.

-------------------------------------------

How to Draw a Simple 3D Effect: Woman With Umbrella - Duration: 4:12.

Hello my friends and welcome to another Tuesday of tutorial!

I am Leonardo Pereznieto and today we will do a simple drawing

of a woman with an umbrella, in 3D.

We begin by sketching the head with the hair, then the shoulders

and we come down through the body… and the legs.

We do the arms, her dress and an umbrella.

I want to do a 3D effect in a very simple way.

Let´s see how it turns out!

We shape the legs a little bit better

and she will be standing in water.

She will be coming out of this water,

but the liquid will be only in a small space.

Similar to a photograph

which will be bending up on the sides, just a little.

I will actually correct this to bend it a little bit more.

Like so.

Good!

And now we can start shading.

I´m using a Tutto3 mechanical pencil, which has leads in three

different sizes and three different hardnesses.

The list of materials is in the description below the video.

Here the trick to make this drawing look tridimensional,

is that we are using two different perspectives.

One is the one of the photograph which is like laying down on a surface.

Now, imagine that that piece of paper that I drew at the bottom was a photo,

and that this photo have printed on it the image of the girl with

the umbrella.

It will be in the same perspective as the piece of paper laying down

which is totally different than how we are looking at this girl.

That is, standing up and we are looking at her practically straight

from behind.

As you see, these are two totally different perspectives, and that

is why it looks like she is coming out of the photo.

At least that´s the idea [laughter].

Let´s shade her legs, and… she is wearing a dark coat,

as you see.

Which I make it a little darker, especially I´ll give it some shape

and some volume by adding some shadows.

I am experimenting on how to do simple but effective

3D effects.

Next week I will try another technique

which I just thought of, and which I will test for the first time.

I actually have a whole video playlist, that is a series of videos,

with 3D and special effect experiments

which I will place at the end of this video, in case you are

interested you can just click on it.

And now let´s draw the shade to the paper.

Like so.

The corners will be lifting a little bit.

Although the paper is bending up, the shadow I draw it flat

so as to create the illusion that is lifting.

Ok, that looks better!

And I clean up the drawing a little bit.

As you have probably noticed, I have been using a kneaded

eraser.

Which is my favorite because it is very clean

and you can shape it exactly as you need it.

Very good!

¡Excelente!

It´s ready!

If you enjoyed it please give it a LIKE! share it

to your friends and subscribe to Fine Art-Tips.

And I will see you on Tuesday ;)

Subtitled by Grethel Trejo

For more infomation >> How to Draw a Simple 3D Effect: Woman With Umbrella - Duration: 4:12.

-------------------------------------------

Simple Sambar Recipe | Easy Sambar | How to Make Sambar | South Indian Sambar Recipe | Sambar recipe - Duration: 1:23.

Add your choice of veggies

Toor dal can be cooked separately as well

For more infomation >> Simple Sambar Recipe | Easy Sambar | How to Make Sambar | South Indian Sambar Recipe | Sambar recipe - Duration: 1:23.

-------------------------------------------

PHOTO – Lily-Rose Depp vêtue d'un simple mini.. - Duration: 2:11.

For more infomation >> PHOTO – Lily-Rose Depp vêtue d'un simple mini.. - Duration: 2:11.

-------------------------------------------

Une astuce simple pour détoxifier votre corps et perdre du poids chaque jour - Duration: 3:11.

For more infomation >> Une astuce simple pour détoxifier votre corps et perdre du poids chaque jour - Duration: 3:11.

-------------------------------------------

Simple Influences for Team Morale - Your Practice Ain't Perfect - Joe Mull - Duration: 4:24.

Morale is one of those things that many leaders

feel called to influence yet few know exactly

how to affect.

Morale is the confidence and enthusiasm of a group, the mental and emotional condition

of your team.

In a phrase, it's the collective psychological well-being of those you supervise.

And it's important.

Really, really important.

That's why, in this episode of Your Practice Ain't Perfect, I'm sharing Simple Influences

for Team Morale.

Don't go anywhere…

Morale is a by-product of many, many factors: organizational culture, institutional support,

the belief that my work matters, my relationships with my teammates and my bosses, the list

is long and complicated.

There's no one tweak that can improve morale over the long-haul.

That said, there are some things leaders can do, day in and day out, to turn the dial on

morale in workplaces.

I want to share 5 that I've found to be most impactful.

First, Make employees laugh.

Have you ever noticed that the majority of

videos that go viral on Facebook

or YouTube are clips that make us laugh?

Laughter is food for our souls.

It's restorative.

Leaders who find the fun at work and can laugh with, not at, their teams, make a deposit

into the piggy bank of morale every single day.

So tell bad jokes, and play games, and do whatever it takes to produce smiles and laughter

at work.

Second, Tell stories of difference making.

Connect the dots between the mundane tasks

and responsibilities of someone's job and

how that makes a difference to others.

Be hyper-specific and do it often because difference making is the most powerful drug

in the workplace.

It inoculates us against the demands of our work while boosting our resilience in the

face of stress and change.

Make sure your employees know they matter and know WHY they matter.

Third, Be positive.

You know, there's an old saying that

"If you think you can or you think you can't,

either way, you'll be right."

Whether you think the workday is a brutal slog or stimulating and compelling, you'll

be right.

When what you say, how you carry yourself, and the energy you put into the workplace

is constantly positive, it impacts morale.

Employees are drawn to leaders who see the glass as half full.

So be positive, and share that positivity out loud when you can.

Fourth, Solicit ideas, opinions, and challenges.

Most leaders are really good at telling.

At sharing info.

At directing, updating, informing, you get the idea.

But many forget how important it is to mine employees for their ideas, their opinions,

and to draw out and understand their challenges.

Ask employees, every chance you get, for their ideas, opinions, and challenges because it

gives them a voice in their workplace, and that influence is a fundamental component

of keeping morale high.

Finally, Remove toxic personnel.

If morale is low on your team,

ask yourself this question.

Is there one person on the team whose removal would instantly transform the atmosphere of

the workplace?

If so, you may have a toxic disrupter on your team.

These are often actively disengaged employees who create and thrive on drama.

Sometimes the biggest fix for morale is removing those who are doing harm, or as I'm fond

of saying in my keynotes and workshops, pulling the weeds.

Now it's your turn.

What have been your most effective methods for influencing team morale?

Tell me in the comments box below and please, if you found this video helpful, share it

on your Facebook or LinkedIn page.

Thanks for watching, I'll see you next time.

For more infomation >> Simple Influences for Team Morale - Your Practice Ain't Perfect - Joe Mull - Duration: 4:24.

-------------------------------------------

Une astuce simple pour déshydrater les fruits à la maison - Duration: 4:14.

For more infomation >> Une astuce simple pour déshydrater les fruits à la maison - Duration: 4:14.

-------------------------------------------

Une astuce simple pour détoxifier votre corps et perdre du poids chaque jour - Duration: 2:41.

For more infomation >> Une astuce simple pour détoxifier votre corps et perdre du poids chaque jour - Duration: 2:41.

-------------------------------------------

06 Beginner's Guide to Python - Simple Functions - Duration: 13:55.

In this video I'm going to show you how to use functions in Python. Okay so let's

load up our atom editor with our project that we had from our last lesson. We're

going to create a new file here and let's call it functions.py okay so this

is our new blank functions file now a function in Python is just a way of

defining a block of code that you can repeat elsewhere in the... in your source

code. The difference between a function and a while loop or something like that

is that a function you can pass in various variables to customize the

variables in the code that you execute so I'm going to demonstrate how

you do this and then you'll understand how it works and how they can be useful in

your code. Ok so let's pretend we're writing a piece of code for a store and

let's stick with the same theme that we've had in the previous two videos

we're going to be selling apples in our store and let's say we want to write a

simple script that greets the customer when they come in so we want to greet

them by their name and we want to tell them how many apples we have in stock. Ok

so let's start by just writing these lines out individually so let's print

"Hello, Mark" and under that print "We have 6 apples in stock". Ok so I'm gonna save

that file and let's copy and paste these two lines and paste them two more so we

have this 3 kind of blocks a code here and let's change the name so let's

say we have Brooke and then we have Greg coming to the store. Alright so save the

file and then load up the terminal or command prompt window and let's run our

function script by typing python functions.py. Okay so you can see that

it outputs on the screen the name of each person and how many apples we

have in stock. Alright so you can see that this code is a bit repetitive we've

repeated the same thing three times we literally had to copy and paste and all

we've done is changed the text in here and there's a lot of repeating text that

we've entered more times than we need to. So for example "hello" here this is the

same for all of them. And "we have" and "apples in stock"... well this actual string

is the same for all of them but let's pretend that this may change so we're

basically...You can see that it's repeating the code here. We're also repeating the print

functions and there's a lot of repetitiveness going on. Good source code

has limited repetitiveness. There's a concept called DRY which is do not

repeat yourself and that means don't repeat unnecessary blocks of code in

your application because then if we ever wanted to change this text we would have

to change it in all of these three places as opposed to just changing it in

one. So I'm going to show you how you can use functions to reduce code

duplication. Alright so before we actually reduce the code duplication I'm

just going to show you how to make a simple function in Python. Alright so the

way you define a function in Python is you use the DEF - it's short for define and

then the name of the function that you want to define. So let's create a

function called greet mark so I'm going to define def and I'm going to create a

function called greet_mark and each function that you define needs to

end in two brackets I'll explain why a bit later in this video. Alright so you

write def, the name of the function, open and close brackets and then a colon. If you

hit enter after the codon you can see that Atom automatically indents this

here because as with the while loops that we learnt in the previous lesson

the function code is grouped by the indentation so any code we want to

include in this function needs to be indented by one tab underneath this

function. Okay so that's our first function let's create one for each of

these blocks so I'm gonna copy and paste this here, copy and paste this here

then I change this to Brooke and I'm going to change this to Greg and then I'm

gonna indent these two here, save that. The best practice is to use two spaces in

between these functions when you're doing it in a single Python file like

this. So now we've defined our function if we go to our command

prompt and we run the code you actually see that it doesn't output anything now

and that's because defining the function just isn't enough you actually need to

call the function after you defined it. So underneath these functions we're

going to call the function so make sure that we're indented back to the base

level of the file and the way you call the function is you simply provide the

function name and the brackets without the def because

we've already defined it. We just want to call it now so if I write greet

mark and then again I'm gonna copy and paste that I'm gonna put greet Brooke

greet Greg and then save the file and if you load up command prompt push up and

do Python functions you can see their outputs exactly the same as before

and it may seem backwards because we've actually created more lines of code

instead of reducing the lines of code which was the goal but I'm

just demonstrating how you define functions now I'm going to demonstrate

how you can use functions to save...reduce...or sorry to reduce the lines of code in

the application. Okay so one of the things that you can do with functions is

you can pass in arguments to the function, so you can define various

arguments that you can provide when you call the function and then the function

can use those arguments in the source code. Alright so if we delete these two

here because they're pretty much the same, and we can also delete the calls to

them here as well and let's rename our function instead of greet mark which is

very specific and doesn't help with... it doesn't help with reducing duplication

let's just call the function greet customer. And then in between the

brackets here we're going to define a variable and we're going to call or it's

actually an argument, we're gonna define an argument for our function and we're

going to call the argument name. Okay so if we call the argument name and then we

hit save and now when we call our function....actually before we do that

we're going to change this print here and instead of printing mark which we've

hard-coded here we're going to update this to include our variable. So print

hello and we'll leave the string there before the end of the print the last

bracket in the print use the plus symbol and this will concatenate our name

variable with this string. So what this is now doing is its greeting a customer

and it's allowing us to provide the name of the customer and it will include that

name in the code that it prints out. Okay so below this let's write again

greet_customer and then we need to provide the name of the customer we want

to greet. So you define the variables when you call the function, you define the

variables in the same order that you put them in the greet customer arguments and

since we only have one we can just type it here. We'll just put the

name mark and then we'll copy and paste this and we'll call it Brooke...and we'll call

it Greg. Save that. Now load up the command prompt

and let's run our file again and now you can see it outputs the same again except

this time we have a lot a lot less lines of code than we had before.

Okay so let's say we wanted to update this function and we want to actually be

able to change the number of apples that we have in stock because if Mark comes

into the store then after he's left the store there may be less apples in there

when Brooke comes in. Okay so you can actually define multiple arguments for a

function here and you do that just by comma separating the list of argument

names in the function argument bracket. So let's just call a new argument called

num_apples just short for number of apples and then similar to what we did

here where we added the value of this to our string I'm going to delete this and

then add the quotes here so we now have two strings and do +. And we actually need to

convert this number type into a string so that we can add it to our

string because you can't just add numbers into strings using the plus

symbols so we'll just type STR and then num_apples

so what this STR does is it converts this whatever variable this is into the

string type so it basically converts our number into a string so instead of it

being the number six it will just be a string saying six. Okay so now we need to

add this argument to the call when we call our function so let's add... let's

start with seven and then let's say there's six

and then let's say when Greg comes in there's two left. Save that and then go

back to our command prompt, hit up and run. Now you can see that it actually

changes the number of apples that outputs based on the arguments that we provide.

Okay so there's one more thing I'm going to show you about these function

arguments and that's that you can actually set a default for the function

arguments. Okay so a default means you can provide a default value for this so

you don't even need to provide it here. So let's just say there's a default of

seven apples, we always start with seven. The first time you call it you can

actually remove that and you can run it again and you see it still says seven we

changed the default to ten. Save that and run it. Now you can see it says ten. Now

the only thing to remember about setting defaults is you can only set defaults on

the last or multiple last items in a function argument list. So another way of

putting it is you cannot have a non default function after you...or sorry a

none default argument after you defined an argument with a default. So we wouldn't

be able to provide name equals mark as a default and then put a non default

argument here. If you try that it will give you an error telling you a

non-default argument follows a default argument. So basically once you've

defined your first default argument you need to either move it to the end of the

list like this...

oops copy that you even need to move it to

the end of the list or you need to set a default for the items in front and then

you would need to reorder when you call the function reorder the...you would

need to put the number of apples first in this case because we've changed it

around. Okay so let's just move that back just so we have a finished working

version. And yeah you can set a default for any type of argument as long as

you don't put any non default ones

after the default. Okay so that's how you create functions in Python. Thank you so

much for watching. If you have any questions at all please leave them in

the comments below and I'll try and answer them or someone else might answer them

for you. So thank you very much for watching and I'll see you in the next

video.

Không có nhận xét nào:

Đăng nhận xét