This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Zen of Python, by Tim Peters | |
(파이썬 철학, 팀 피터스) | |
Beautiful is better than ugly. | |
(아름다운 것이 추한 것보다 낫다.) | |
Explicit is better than implicit. | |
(명확한 것이 함축적인 것보다 낫다.) | |
Simple is better than complex. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.parse | |
import urllib.request | |
url = 'http://example.com' | |
values = {'name': 'nesffer', | |
'query': 'python'} | |
headers = {'Content-Type': 'text/plain'} | |
data = urllib.parse.urlencode(values).encode('utf-8') | |
req = urllib.request.Request(url, data, headers) | |
f = urllib.request.urlopen(req) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
import java.util.stream.IntStream; | |
public class d2015_11_16_1 { | |
public static void main(String[] args) { | |
Random ran = new Random(); | |
String[] name = {"신지민", "김재권", "송영교", "김명중", "이기현"}; | |
int[][] num = new int[5][5]; | |
int[] sum_row = new int[5]; | |
int[] sum_col = {0, 0, 0, 0, 0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python build finished successfully! | |
The necessary bits to build these optional modules were not found: | |
_bz2 _curses _curses_panel | |
_dbm _gdbm _lzma | |
_sqlite3 _ssl _tkinter | |
readline zlib | |
To find the necessary bits, look in setup.py in detect_modules() for the module's name. | |
sudo apt-get install libbz2-dev libncurses5-dev libgdbm-dev liblzma-dev sqlite3 libsqlite3-dev openssl libssl-dev tcl8.6-dev tk8.6-dev libreadline-dev zlib1g-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# 랜덤 숫자 1~5 | |
from random import randint | |
a = randint(1, 5) | |
b = randint(1, 5) | |
c = randint(1, 5) | |
# 랜덤 숫자 1~5 | |
# a = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from sys import exit | |
pay = int(input("투입할 금액을 입력하세요: ")) | |
price = int(input("제품의 가격을 입력하세요: ")) | |
number = int(input("제품의 갯수를 입력하세요: ")) | |
coin = int(input("동전의 단위를 입력하세요: ")) | |
coin_list = [500, 100, coin] | |
coin_list.sort(reverse=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int male[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | |
int female[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | |
int male_num, female_num; | |
double money = 0; | |
do { | |
printf("남성은 몇명인가요? "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nesffer 21580023 10 20 30 40 50 | |
Nesffer 21580023 60 70 80 90 100 | |
Nesffer 21580023 90 80 70 60 50 | |
Nesffer 21580023 40 30 20 10 20 | |
Nesffer 21580023 30 40 50 60 70 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from time import sleep | |
from tkinter import messagebox | |
from urllib.request import urlopen | |
import urllib.error | |
def net_connection_on(): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define RANGE 10 | |
int main() { | |
int kk[RANGE] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; | |
int i, j, move, temp; | |
printf("몇 번 이동 시키겠습니까? "); | |
scanf_s("%d", &move); |