전체 글
-
My projects for Udacity Data Analyst Nanodegree Program책, 강연, 스터디 2019. 2. 16. 14:58
My Projects for Udacity/Data Analyst Nanodegree ProgramThis repository contains all of my projects for Udacity/Data Analyst Nanodegree Program, And projects are written python, jupyter notebook, R-Studio and Tableau.Please refer my project below.https://skysign.github.io/udacity-DANP/ ByeongKeon Kim (skysign at gmail.com)
-
Practice>Python>Collections>Collections.OrderedDict()hackerrank.com 2019. 2. 14. 18:05
Collections.OrderedDict()Problem link : https://www.hackerrank.com/challenges/py-collections-ordereddict/problemDifficulty : easy Tipthe sequence of input should be ordered, so it is good to practice how to use OrderedDict()Utilize rpartition() or rfind() to split name and priceCheck the name is existed in orderedDictIf it is, add priceIf not, add new name and price Solution from collections imp..
-
Practice>Python>Errors and Exceptions>Exceptionshackerrank.com 2019. 2. 14. 13:06
ExceptionsProblem : https://www.hackerrank.com/challenges/exceptions/problemDifficulty : easy TipProblem itself is simple, however, the error message from exception, is different with problem statementTo get same exception error message, to solve problem, you should use '//', not '/'Catch all exception in one place, like this -> 'except Exception as err:'Solution n = int(input()) for _ in range(..
-
Practice>Python>Date and Time>Calendar Modulehackerrank.com 2019. 2. 13. 20:29
Calendar ModuleProblem link : https://www.hackerrank.com/challenges/calendar-module/problemDifficulty : easy TipWe can solve this problem with datetime, but let's try to use calendarcalendar.weekday(y, m, d) return index of the day of weekcalendar.day_name, this is array which contain the days as current localeDon't forget day name should be upper-case! Solution import calendar m, d, y = map(int..
-
Practice>Python>Sets>Symmetric Differencehackerrank.com 2019. 2. 13. 12:52
Symmetric Differenceproblem link : https://www.hackerrank.com/challenges/symmetric-difference/problem?h_r=next-challenge&h_v=zendifficulty : easy Tipsorted() not sort() :-) is to sort items in a listone set = M - Nother set = N - Mone set.update(other set)covert set to listsort listit's not a tip, it is almost solution :) Solution m = int(input()) Ms = set(map(int, input().split())) n = int(inpu..
-
Practice>Python>Sets>Introduction to Setshackerrank.com 2019. 2. 13. 12:32
Introduction to Setsproblem link : https://www.hackerrank.com/challenges/py-introduction-to-sets/problemdifficulty : easy TipIn python, 'list' and 'set' easily is convert to each other set('list') and list('set')We can use mean function, it takes list as a if we import 'from statistics import mean' Solution from statistics import mean def average(array): # your code goes here\ return mean(list(s..
-
Practice>Python>Math>Polar Coordinateshackerrank.com 2019. 2. 12. 12:49
Polar Coordinates problem link : https://www.hackerrank.com/challenges/polar-coordinates/problem difficulty : easy TipIt might seems that it is complex problem, however it is NOTBefore you try to resolve it, you should understand both complex number and polar coordinationcomplex number : https://en.wikipedia.org/wiki/Complex_numbercmath link to use ploar() function : https://docs.python.org/2/li..
-
hackerrank.com Practice>Python>Collections>Collections.namedtuple()hackerrank.com 2019. 2. 11. 13:26
collections.namedtuple()Problem link : https://www.hackerrank.com/challenges/py-collections-namedtuple/problemDifficulty : Easy TipKey point is that we shoiuld use namedtuple() to access MARKS while the position of MARKS column is changedcolumns can be used as the names of namedtuple()columns = input() // ID MARKS NAME CLASSStudent = namedtuple('Student', columns)Initialize Student from input() ..