본문 바로가기

Algorithm/Python

(31)
[프로그래머스] 직사각형 별찍기 (Python) 문제 이 문제에는 표준 입력으로 두 개의 정수 n과 m이 주어집니다. 별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요. 코드 a, b = map(int, input().strip().split(' ')) for _ in range(b) : print(a * '*') a, b = map(int, input().strip().split(' ')) print(("*" * a + "\n") * b) 출처
[stratascratch] Bikes Last Used(Python) 문제 Find the last time each bike was in use. Output both the bike number and the date-timestamp of the bike's last use (i.e., the date-time the bike was returned). Order the results by bikes that were most recently used. 각 자전거가 마지막으로 사용된 시간 찾기. 자전거 번호와 자전거의 마지막 사용 날짜(자전거가 반환된 날짜) 조회 가장 최근에 사용한 순서로 정렬 코드 # Import your libraries import pandas as pd # Start writing code dc_bikeshare_q1_2012.head() d..
[stratascratch] Churro Activity Date(Python) 문제 Find the activity date and the pe_description of facilities with the name 'STREET CHURROS' and with a score of less than 95 points. name이 'STREET CHURROS'와 score가 95미만인 activity date 와 pd_description 조회하기 코드 # Import your libraries import pandas as pd # Start writing code result = los_angeles_restaurant_health_inspections[(los_angeles_restaurant_health_inspections['facility_name'] == 'STREET ..
[stratascratch] Customer Details(Python) 문제 Find the details of each customer regardless of whether the customer made an order. Output the customer's first name, last name, and the city along with the order details. Your output should be listing the customer's orders not necessarily listing the customers. This means that you may have duplicate rows in your results due to a customer ordering several of the same items. Sort records based..