vmtmxmf5 / Python-ML-DNN

4 stars 1 forks source link

AI class - 5.5d #8

Open vmtmxmf5 opened 3 years ago

vmtmxmf5 commented 3 years ago

Say Hi

say_hi('Mike', 45)

Hi! My name is Mike and I'm 45 years old

접기 ``` def say_hi(x, y): print(f'Hi! My name is {x} and I\'m {y} years old') ```

Correct Sentences

correct_sen('greeting friends')

'Greeting friends.'

접기 ``` def correct_sen(x): text = x[0].upper() + x[1:] if not text.endswith('.'): text += '.' return text ```

First word

first_word('Hello, I\'m Jae Hoon')

'Hello'

접기 ``` def first_word(text : str): text = text.replace(',', '').replace('.', '').strip() text = text.split() return text[0] ```
vmtmxmf5 commented 3 years ago

열의 개수

for i in 엑셀.rows:
    col_num = len(tuple(엑셀.rows)