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.

8/29/2020

Typhoon 19 in Japan 2019

 2019, typhoon 19 hit East Japan.

Dies, missing raised 90 in 24th.

Also now, some people evacuate, and it takes time to restore.

13 prefecture heavy rain alert!!!

 

8/28/2020

The new era Reiwa

 In 2019, the new era "Reiwa" was announced.









It changed from "Heisei" to "Reiwa" in April 1st.

It's the first era that quoted from the Japanese book :"Manyoushu".📚

Heisei abdicate the first time after the Meiji era.






8/24/2020

The first person to create snow

 The first person to create snow!

That is, Ukichiro Nakaya.

Ukichiro is a physicist(1900~1962), made the first artificial snow in the world.
He knew that the snow's shape will change by the moisture and temperature.
Ukichiro leaved the word "Snow was a letter from the god."



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