TIL/202103
210324 TIL
벽을넘다
2021. 3. 25. 00:13
1.English
what would you done if I had said yes?
2.python
for loop, why we should check wider coverage question first?
I could find the reason checking by Thonny
for i in range(1, 101):
if i % 3 == 0 and i % 5 == 0:
print("FizzBuzz")
elif i % 5 ==0:
print("Buzz")
elif i % 3 == 0:
print("Fizz")
else:
print(i)
for i in range(1, 101):
if i % 3 == 0:
if i % 5 ==0:print("FizzBuzz")
else:print("Fizz")
elif i % 5 == 0:print("Buzz")
else:print(i)
make random password
password_list = []
for letter in range(nr_letters):
password_list += random.choice(letters)
for letter in range(nr_symbols):
password_list += random.choice(symbols)
for letter in range(nr_numbers):
password_list.append(random.choice(numbers))
print(password_list)
random.shuffle(password_list)
print(password_list)
password = ''
for word in password_list:
password += word
print(f"your password is {password}")
3.sql from goormedu
join for data efficiency
RDBMS - relational database management system
Separate tables once, use depends on situations.
inner join produces only the set of records that match in both table a and b
https://sql-joins.leopard.in.ua/
ERD - entity relationship diagram
Crucial factor to cooperate as a team.
INNER JOIN
SELECT country.continent, floor(avg(city.population))
FROM city
INNER JOIN country ON city.countrycode = country.code
GROUP BY country.continent;
SELECT city.name
FROM city
INNER JOIN country ON city.countrycode = country.code
WHERE continent = 'Africa';