9/28/2020

Internet Abbreviations

 Hello!

Today, I'll show you more Internet Abbreviations!

Are you using?

You can comment it!

So, I'll introduce Internet Abbreviations!

1. LOL

I think you use many time!

LOL stands for laugh out loud.

You can use LOL in like this scene.











2. JK

JK stands for Just kidding.

You can use JK like this scene.















Bye!!!

Python expiation

 Hello!

Today's question is this!

The 2nd of February 2020 is a palindromic date in both dd/mm/yyyy and mm/dd/yyyy format (02/02/2020). Given a date in dd/mm/yyyy format, return True if the date is palindromicin both date formats, otherwise return False.

From : Palindromic Dates // Edabit 

The code is this!

def palindromic_date(date: str) -> bool:
no_slash = date.replace("/", "")
reversed_string = ""
splitted_date = date.split("/")
rearrenged_date = splitted_date[1] + splitted_date[0] + splitted_date[2]
for s in no_slash:
reversed_string = s + reversed_string
if no_slash == reversed_string and rearrenged_date == reversed_string:
return True
else:
return False

So, first, let's see the no_slash variable.

This variable replaces slash(/) to an empty string.

Then, I made a variable reversed string and make a for loop.

In the for loop, we will reverse the date and appending to reversed string.

And then, look at it if the reversed string is same with no slash.

Then, this is the British date but the American date is mm/dd/yyyy format.

I splited the date when the / is not gone.

And we will rearrenge date(which means make it to mm/dd/yyyy format.)

Lastly, we will see if the rearrenged date is same with the reversed string.

Easy code!


So, See ya!




9/23/2020

Python explanations

Hello!
This is the question today.

Write a Composer class that has three instance variables:

  1. name
  2. dob
  3. country

Add an additional class variable .count which counts the total number of instances created.

From : Counting Instances Created from a Class // Edabit 

My code is this.

counter = 0


class Composer:
def __init__(self, name, dob, country):
global counter
self.name = name
self.dob = dob
self.country = country
counter += 1

def count():
global counter
return counter


So, I'll talk about classes.

Classes are Instance's plan, I just made a image to make the think into your mind.



Code is simple, when the instance is made, plus the counter by 1.

Bye!!


9/22/2020

Day 3

 Hello!

 Today, I went to a really long bicycle trip!

First, I woke up and then, I drank a soup.

Then, I went to Gifu, Seki station and rode a train.

It toke in 1 hour to get off.

Then, I went to a really big trip.(By bicycle)

I went to many shops and buy foods!

After when I rode about 80 kilometers, we came back to the car.

It was dark.

Then, It was time to go back home.

So, I went back home by about 4 hours.

The dinner was McDonalds, my favorite!

Then, I came back home!

It was about 22:00 so I slept really fast.

Bye!!!



9/21/2020

Day 2

 Hello!

Today is the second day.

I did Rafting first.

It was really fun!

I moved the boat, swim, Water fall training, and also diving!

After that, I went to the flowing somen restaurant.

That was my first time to do flowing somen so, it was really fun!(And delicious)

But, I needed to wait a moment to flow the somen, so while they are making somen, we went to water fall trecking.

I like nature, so it was beautiful.

The stairs are hard to climb, though.

After we ate the somen, we went to a beautiful pond with Koi fish.

We can't feed the food to the Koi fishes, but it was really beautiful.

It looked like a Luxurious castle garden's pond!

Lastly, we went to the public bathtub!

It was really nice!

And then, we played Nintendo Switch and slept in the car.

Bye!!!



9/20/2020

Day 1

 Hello!

Today, I went to Gifu.

It was really great!

First I went to Gifu, Hida, Takayama.

First I ate Hida beef sushi, and other Hida beef food.

It was really delicious that I can die!!

The Apple juice was also really sweet!

Then, I ate Mitarashi dumpling!

This was also delicious, but not sweet.....

Then, I saw the old street!

I felt that I time slipped!

After that, I went to the Karakuri Museum.

A trick robot or something....

For example, this robot can move the tea when the tea is placed.


This was used by Edo era.

Then we saw the really old street!

Wow!


So, Bye!


9/19/2020

Internet Abbreviations part 3

 Hello!

Today, I 'll show you more Internet Abbreviations!


1. TY

TY is for Thank you.

For example, when your internet friend made your code, you can say, "TYSM(So much)!!!!!!"


2. YW

YW is for you're welcome.

For example, when the internet friend received, the internet friend can say, "YW!'


 ByE!!







d

9/18/2020

Internet Abbreviations part 2

Hello!

I'll show you some internet abbreviations!

1. BBL
BBL is for Be Back Later.
For example, when you go to the gym but when you are taking with you internet friend, you can say, "I'll go to the gym now. BBL!'

2. CMIIW

CMIIW is for Correct me if I'm wrong.
For example, you can say when you are taking about the science about electric, you can say "I'll talk about electrics. Blablablablablablablablablablablablablablablablablablablablablablablablablabla
Thanks and CMIIW"

Bye!!

9/17/2020

Internet Abbreviations

 Hello!

Today, I'll show you some Internet Abbreviations.

1. TLDR

TLDR means Too long; don't read.

For example, If you are commenting about the science about magnets, you can comment on the last : TLDR : The magnets repel by S and S / N and N but it attracts by S and N/N and S.

2. IRL

IRL means In real Life.

For example, when you are commenting about Zelda, you can comment: Link can fight enemies such as Bokoblins but, IRL I can't!


So, Bye!!!

9/12/2020

Code expiation 2

 Hello!

This is the code explanation 2!

This is the question today.

Create a function that takes two parameters and, if both parameters are strings, add themas if they were integers or if the two parameters are integers, concatenate them.

From : Edabit/Stupid Addition 

This is my solved code.

def stupid_addition(a, b):
if type(a) !=type(b):
return None
if type(a)==int:
return str(a)+str(b)
else:
return int(a)+int(b)

This question is about some stupid addition.

It should add by the same type.

For example, how about adding "4" + "5"?

It's going to be 45, as it is adding by strings.

How about adding 4+ 5?

It's going to be 9, as it is adding by numbers(integers).

Let's think about the first if.

The first if is about when the type is added by a string and an integer.

Then, is will return None.

The second if is when we add with int, it will add by string.

It should return with a string.

The third one is else, that's going to be when we add with string, it is added by integer.

So, it should return with an integer.

So, Bye!!!






9/10/2020

The bill's face will change

A new bill will print in 2024, and a new bill face was announced.
1 million bill is Shibusawa Eiichi, 5000 bill is Umeko Tsuda, and the 1000 bill is the Shibasaburo Kitasato.


9/09/2020

Kyoto Animation arson attack

 Kyoto Animation arson attack was at July, 18th.

Famous animations like "Suzumiya Haruhi no Yuuutsu" are made in Kyoto Animation, the studio where it was arson attacked.

36 people died, and the suspect person also had a big scald.





9/06/2020

Code explanation part 1

 Hello!

Today, I'll show you the code I solved code.

This is the question.


Create the instance attributes fullname and email in the Employee class. Given a person's first and last names:

  • Form the fullname by simply joining the first and last name together, separated by a space.
  • Form the email by joining the first and last name together with a . in between, and follow it with @company.com at the end. Make sure the entire email is in lowercase.

Question from = Edabit : Fullname and Email 


My solved code

from test import Test
#https://edabit.com/challenge/gB7nt6WzZy8TymCah
class Employee:
def __init__(self, firstname, lastname):
self.firstname = firstname
self.lastname = lastname
self.fullname = firstname + ' ' + lastname
self.email = '{}.{}@company.com'.format(firstname, lastname).lower()


This code is easy.
As you see, there is a class called "Employee".
In this class, there is the info about that employee.
If you want to know about classes, here is the link.
There is four info - first name, last name, full name and email.
The question prepared the classes and the info - first name and last name.
We need to fill up the code!
First, let's think about the full name.
Full name are made by the first name and the last name.
So, we will just plus the first name and the last name!
BUT!!!
There is no spaces!!!
We need to plus the space in the middle of the first name and last name.
Easy peasy lemon squeezy! 🍋
Next is going to be the email.
Emails are also easy.
Let's think.
In the question, it was written that the first name and last name's middle should be the "." and following by "@company.com'
So, we can put the first name, the last name, and the "@company.com" and the "."
Like this.
self.email = self.firstname + '.' + self.lastname + '@company.com'
We can do that but there is more easy way.
We can format it.
This is the link about the format method.
That's more easy!
Easy peasy lemon squeezy!🍋(Second time)




Test code


emp_1 = Employee("John", "Smith")
emp_2 = Employee("Mary", "Sue")
emp_3 = Employee("Antony", "Walker")
emp_4 = Employee("Joshua", "Senoron")
Test.assert_equals(emp_1.firstname, "John")
Test.assert_equals(emp_1.lastname, "Smith")
Test.assert_equals(emp_1.fullname, "John Smith")
Test.assert_equals(emp_1.email, "john.smith@company.com")
Test.assert_equals(emp_2.firstname, "Mary")
Test.assert_equals(emp_2.lastname, "Sue")
Test.assert_equals(emp_2.fullname, "Mary Sue")
Test.assert_equals(emp_2.email, "mary.sue@company.com")
Test.assert_equals(emp_3.firstname, "Antony")
Test.assert_equals(emp_3.lastname, "Walker")
Test.assert_equals(emp_3.fullname, "Antony Walker")
Test.assert_equals(emp_3.email, "antony.walker@company.com")
Test.assert_equals(emp_4.firstname, "Joshua")
Test.assert_equals(emp_4.lastname, "Senoron")
Test.assert_equals(emp_4.fullname, "Joshua Senoron")
Test.assert_equals(emp_4.email, "joshua.senoron@company.com")

If we try with this test, it should success.
So, that's the explanation.
Bye!!!

9/05/2020

Use snow at many places part 1

Use snow at many places!

Hokkaido Sapporo used snow cooler!

Hokkaido snows many times.

So, in June〜September they use snow water to coolers.

The place is in Sapporo-city Emore Park 「Glass pyramid」

The snow melts in March, then they get the snows in the park and put in the storage.




9/03/2020

Use snow in many places Part 2

Local products such as sake(Japanese rice wine)  puts in the snow, and makes more deliciousness.
The product names first「雪中〇〇」・「雪室〇〇」and then the product name such as apple.
Carrots and Chinese cabbage, apple makes more deliciousness by putting in the snow.

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...