Skip to content

Instantly share code, notes, and snippets.

View oiojin831's full-sized avatar

Eung Jin Lee oiojin831

View GitHub Profile
@oiojin831
oiojin831 / tk-1.py
Last active December 7, 2021 00:06
from tkinter import Tk, Label, Entry, Button
movies = []
window = Tk()
window.title("Movie App")
window.geometry("600x600")
import random
import json
import os
movies = []
file = open(f"{os.getcwd()}/data.json", "r")
line = file.readline()
movies = json.loads(line)
file.close()
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
String name = "not specified";
String artist = "not specifie";
String[] movies = new String[5];
int number;
boolean loop = true;
from tkinter import *
import random
movies = []
def click():
global movies
movies.append({"title": title_entry.get(), "director": director_entry.get()})
click_label = Label(window, text="새로운 영화가 추가됐습니다.")
class Character():
def __init__(self, id, location, inventories):
self.id = id
self.location = location
self.inventories = inventories
def my_location(self):
print(f"{self.id}의 위치는 {self.location}")
print("")
def dollar_to_won(dollar):
return dollar * 1150
def won_to_dollar(won):
return won / 1150
def convert(num, unit):
if unit == "dollar":
return dollar_to_won(num)
elif unit == "won":
def inch_to_cm(inch):
return inch * 2.54
def cm_to_inch(cm):
return cm / 2.54
def convert(num, unit):
if unit == "inch":
return inch_to_cm(num)
elif unit == "cm":
def cm_to_inch(cm):
return cm / 2.54
def inch_to_cm(inch):
return inch * 2.54
def unit_converter(num, unit):
if unit == "inch":
new_cm = inch_to_cm(num)
return f"{new_cm} cm"
def add(a,b):
return a + b
def 안녕(name):
return f"안녕 {name}"
def total(nums):
sum = 0
for x in nums:
sum = sum + x
import random
import os
import json
movies=[]
while True:
print("1. 영화를 추가")
print("2. 영화 보기")