11/08/2020

Python explanation (Edabit // Fizz Buzz Interview Question)

Hello!
Today is going to be Python Explanation!
🐍: ME?😍
Leo618 : Uh, no...😓
🐍 : Oh.....😒
Leo618 : Sorry, uh..... Never mind.😅
 The question is this!

Create a function that takes a number as an argument and returns "Fizz""Buzz" or "FizzBuzz".

  • If the number is a multiple of 3 the output should be "Fizz".
  • If the number given is a multiple of 5, the output should be "Buzz".
  • If the number given is a multiple of both 3 and 5, the output should be "FizzBuzz".
  • If the number is not a multiple of either 3 or 5, the number should be output on its own as shown in the examples below.
  • The output should always be a string even if it is not a multiple of 3 or 5.

Examples

fizz_buzz(3) ➞ "Fizz"

fizz_buzz(5) ➞ "Buzz"

fizz_buzz(15) ➞ "FizzBuzz"

fizz_buzz(4) ➞ "4"
So, this is the solved code!!
def fizz_buzz(num):
if num % 3 == 0 and num % 5 == 0:
return "FizzBuzz"
if num % 3 == 0:
return "Fizz"
if num % 5 == 0:
return "Buzz"
else:
return str(num)

I'll change the font...😎(WHY!)
so, Let's see the code.
The first if is when the number is a multiple of either 3 or 5.
If the answer is 0 when the number ModulO with 3, AND when the answer is 0 when the number Modulo with 5.
Then, we return "FizzBuzz"!
The second if  is when the number is a muLtiple of 3.
If the Answer is 0 when the number Modulo with 3, then we return "Fizz"!
The third if is when the number is a multiple of 5.
If the answer is 0 when the number modulo with 5, then we return "BUZZ"!
Lastly, when the number is not a multiple of 3 or 5, Return the number Stringed.
How was it?
It was really easy!
Piece of a cake!
Bye!!!


11/07/2020

Crazy places at Google maps

 Hello!

Today is crazy!

1. Fire arms....

Oh bad, there is a man with firearms!

We hope that is a toy gun.(No it isn't)


2. 2 Samurai

Wow, there is two samurais fighting! 

Which wins....!


3. Donkey eating garbage

Poor Donkey, he came to a city and eats garbage.....



Bye!!!

11/06/2020

Scary places at google street 2

 Hello!

Today is also scary places at google street!

1. Flamingo legs

You can see woman that's a flamingo legs, it should be google street glitch.


2. Gas baby

There is many gas masks ruled by a baby, you should never go there.


3. Clever boy

I think he's hiding some dead bodies in the sewer while he pretends as a city sewer inspector.



11/05/2020

Scary places at google street

 Hello!

Today I will show you some scary places at google street!

1. Battle Cat

Wow, there is a new cat!


2. Bye-bye safe journey

Let's stay in this side and continue the safe journey.


3. Spider car

There is a car on a wall!

That's funny....


4. Strange clouds

I don't know why this happen, but it is really creepy.....



Bye!!!

11/04/2020

Scary places at google street

 Hello!

Let's see this creepy places at google street.

1. Aliens on Earth?

This can't be real!

Alien are here!


2. A Glitch

There is a glitch!

Don't get traped!

3. The guy in the gas mask
There is a guy in the gas mask looking Google street.
Is there something?





Life hacks

 Today is going to be life hacks!

1. DIY Sprinkler

You can make a DIY Sprinkler with a bottle.


2. Paper clips!

Stick paper clips to the end off the tape.


3. Dust tape opener

You can use a dust tape to open tough lids.



Life hacks!

 Hello!

Today is going to be the Life hacks!

1. Wine opener in a car.

If you are drinking beverages with a bottle cap, you can open with your seat belt buckle.


2. Coffee cups

You can use coffee cups and a brush to make a pallet and brush


3. Posting

You can post important things on the door.


Bye!!


11/03/2020

Life Hacks

 Hello!

We will show you life hacks to you!


1. Time marked water bottle

Draw lines on your water bottle with a marker pen.


2. Fresh Breath 

You can chew an apple to stop your bad breath.


3. Phone wallet 

You can put your money in your phone case to use as a wallet.



11/02/2020

Life hacks

 Today is also going to be Life hacks!

1. Keeper in Beach

You can use this safe keep.


2. Nutella

If you are almost finished your Nutella jar, finish with ice cream


3. The way to eat cupcake

You should eat your cupcake like this.



11/01/2020

Python Explanation(Edabit //Classes For Fetching Information on a Sports Player)

 Hello!

Today it is going to be an python explatnation!

Today's question:

Create a class that takes the following four arguements for a particular football player:

  • name
  • age
  • height
  • weight

Also, create three functions for the class that returns the following strings:

  • get_age() returns "name is age age"
  • get_height() returns "name is heightcm"
  • get_weight() returns "name weighs weightkg"

Examples 

 p1 = player("David Jones", 25, 175, 75)

 p1.get_age() ➞ "David Jones is age 25"
 p1.get_height() ➞ "David Jones is 175cm"
 p1.get_weight() ➞ "David Jones weighs 75kg


My code!

class player():

def __init__(self, name, age, height, weight):
self.name = name
self.age = age
self.height = height
self.weight = weight

def get_age(self):
return '{} is age {}'.format(self.name, self.age)

def get_height(self):
return '{} is {}cm'.format(self.name, self.height)

def get_weight(self):
return '{} weighs {}kg'.format(self.name, self.weight)

Let's see.

There is four instances : Name, Age, height, weight in a class called player.

Next, we have 3 functions,

The first function is about the age off the foot ball player.

You can return the name and the age.

So, you can use format to put the name, and the age.

The second function is similar, return the name and the height.

You can use format to take the name and the height.

It's the same pattern, the third function is to return the name and the weight.

Use the format to take the name and the weight.

It was easy!!!!!


Bye!!!!!


 

Super Leo 4!

  Leo : Let's do this! Reimu : I'll kill those monsters, so you go! Leo : Yeah! I'll go to the goal!  Leo : Let's go〜! ? Wai...