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
from tkinter import Tk, Label, Entry, Button | |
movies = [] | |
window = Tk() | |
window.title("Movie App") | |
window.geometry("600x600") | |
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 random | |
import json | |
import os | |
movies = [] | |
file = open(f"{os.getcwd()}/data.json", "r") | |
line = file.readline() | |
movies = json.loads(line) | |
file.close() | |
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.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; |
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
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="새로운 영화가 추가됐습니다.") |
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
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("") |
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
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": |
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
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": |
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
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" |
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
def add(a,b): | |
return a + b | |
def 안녕(name): | |
return f"안녕 {name}" | |
def total(nums): | |
sum = 0 | |
for x in nums: | |
sum = sum + x |
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 random | |
import os | |
import json | |
movies=[] | |
while True: | |
print("1. 영화를 추가") | |
print("2. 영화 보기") |
NewerOlder