분류 전체보기(231)
-
프로그래밍 시작하기: 파이썬 입문(Inflearn Original) Project
Hangman(행맨) 미니 게임 제작(1) # 기본 프로그램 제작 및 테스트 import time # 처음 인사 name = input("What is your name?") print("Hi, " + name, "Time to play hangman game!") print() time. sleep(1) print("Start Loading...") print() time.sleep(0.5) # 정답 단어 word = "secret" # 추측 단어 guesses = '' # 기회 turns = 10 # 핵심 While Loop # 찬스 카운트가 남아 있을 경우 while turns > 0: # 실패 횟수 failed = 0 # 정답 단어 반복 for char in word: # 정답 단어 내에 추측 문..
2023.01.15 -
[부스트코스] 코칭스터디 9기 : AI Basic 2023 1주차 미션(Q1, Q2) 변형 문제 풀이
Q1. num_list 가 홀수인 데이터만 출력하도록 하는 함수를 작성하시오. Input #주어진 리스트 num_list = [3, 9, 11, 14, 18, 21, 25, 27] def get_odd_num(num_list): for num in num_list[:]: if (num %2 == 0): num_list.remove(num) return num_list print(get_odd_num(num_list)) Output [3, 9, 11, 21, 25, 27] Q2. string 문장을 받아 단어를 역순으로 출력하는 함수를 작성하시오. Input sentence = "Life is too short You need python" def reverse_sentence(sentence): resu..
2023.01.13 -
DACON Python 튜토리얼 Lv2. 결측치 보간법과 랜덤포레스트로 따릉이 데이터 예측하기
데이터 다운로드 # 데이터 다운로드 링크로 데이터를 코랩에 불러옵니다. !wget 'https://bit.ly/3gLj0Q6' import zipfile with zipfile.ZipFile('3gLj0Q6', 'r') as existing_zip: existing_zip.extractall('data') --2023-01-12 03:54:03-- https://bit.ly/3gLj0Q6 Resolving bit.ly (bit.ly)... 67.199.248.10, 67.199.248.11 Connecting to bit.ly (bit.ly)|67.199.248.10|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanen..
2023.01.12 -
DACON Python 튜토리얼 Lv1. 의사결정회귀나무로 따릉이 데이터 예측하기
데이터 다운로드 # 데이터 다운로드 링크로 데이터를 코랩에 불러옵니다. !wget 'https://bit.ly/3gLj0Q6' import zipfile with zipfile.ZipFile('3gLj0Q6', 'r') as existing_zip: existing_zip.extractall('data') --2023-01-11 08:15:16-- https://bit.ly/3gLj0Q6 Resolving bit.ly (bit.ly)... 67.199.248.11, 67.199.248.10 Connecting to bit.ly (bit.ly)|67.199.248.11|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanen..
2023.01.11 -
데이터 과학 기반의 파이썬 빅데이터 분석 Chapter13 텍스트 마이닝
01 [감성 분석 + 토픽 모델링] 영화 리뷰 데이터로 감성 예측하기 데이터 준비 및 탐색 pandas 버전 확인하기 import pandas as pd pd.show_versions() INSTALLED VERSIONS ------------------ commit : 66e3805b8cabe977f40c05259cc3fcf7ead5687d python : 3.8.16.final.0 python-bits : 64 OS : Linux OS-release : 5.10.147+ Version : #1 SMP Sat Dec 10 16:00:40 UTC 2022 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UT..
2023.01.11 -
데이터 과학 기반의 파이썬 빅데이터 분석 Chapter12 군집분석
01 [평균 군집화 분석 + 그래프] 타깃 마케팅을 위한 소비자 군집 분석하기 import pandas as pd import math retail_df = pd.read_excel('/content/Online_Retail.xlsx') retail_df.head() 데이터 정제하기 retail_df.info() Int64Index: 536641 entries, 0 to 541908 Data columns (total 8 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 InvoiceNo 536641 non-null object 1 StockCode 536641 non-null object 2 Description 5351..
2023.01.10