This file contains hidden or 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 turtle | |
| import time | |
| from typing import List, Tuple | |
| SPACING = 60 | |
| PAD_RADIUS = 20 | |
| FROG_SIZE = 1.5 | |
| BASELINE_Y = -40 | |
| JUMP_PEAK = 50 |
This file contains hidden or 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 time | |
| def factorial_iter(n): | |
| result = 1 | |
| for i in range(1, n + 1): | |
| result *= i | |
| return result | |
This file contains hidden or 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 time | |
| def factorial_iter(n): | |
| result = 1 | |
| for i in range(1, n + 1): | |
| result *= i | |
| return result | |
This file contains hidden or 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
| # 주어진 화단 둘레의 길이를 사용하여 삼각형 모양의 화단을 만들어야 한다. | |
| # 이때 삼각형 화단의 둘레는 주어진 화단 둘레와 반드시 같아야 하며, | |
| # 화단 둘레의 길이가 9m라면, 다음과 같이 세 가지 경우의 화단을 만들 수 있다. | |
| # 1) 한 변의 길이가 1m, 두 변의 길이가 각각 4m인 화단 | |
| # 2) 한 변의 길이가 2m, 다른 변의 길이가 3m, 나머지 변의 길이가 4m인 화단 | |
| # 3) 세 변의 길이가 모두 3m인 화단 | |
| # 주어진 화단 둘레의 길이를 입력받아 서로 다른 화단의 수를 구하는 프로그램을 작성해 보자. | |
| # 심화: 계산된 화단 모양을 터틀로 모두 출력한다. 각 변의 옆에는 길이도 함께 표시한다. |
This file contains hidden or 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 main(): | |
| n = int(input("숫자를 입력하세요: ")) | |
| sum_alternating_formula(n) | |
| def sum_alternating_formula(n): | |
| if n % 2 == 0: | |
| return n // 2 | |
| else: | |
| return -(n + 1) // 2 |
This file contains hidden or 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 main(): | |
| n = int(input("Number of Fibonacci numbers to generate: ")) | |
| for i in range(n): | |
| print(f"{i+1}: {fibonachi(i)}") | |
| def fibonachi(n: int) -> int: | |
| return n if n <= 1 else fibonachi(n-1) + fibonachi(n-2) |
This file contains hidden or 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 main(): | |
| n = int(input("숫자를 입력하세요: ")) | |
| total = 0 | |
| for i in range(1, n + 1): | |
| total += i | |
| print("합계:", total) | |
| if __name__ == "__main__": |
This file contains hidden or 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
| // 이 페이지 팝업으로 열 때 | |
| // "width=831, height=1754, top=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no" | |
| // [Toss Payments] 2025-04부터는 (신)상점관리자 창으로 REDIRECT | |
| import { redirect } from "next/navigation" | |
| export default async function TossPaymentsFreeInstallment() { | |
| return redirect( | |
| "https://consumer.tosspayments.com/notice/free-installment", | |
| ) |
This file contains hidden or 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
| // ==UserScript== | |
| // @name SparxMaths Questions Download | |
| // @namespace https://maths.sparx-learning.com/ | |
| // @version 2025-03-26 | |
| // @description Download every questions into screenshots. | |
| // @author Minsu Kim <minsu_kim@bishanoi.net> | |
| // @match https://www.sparxmaths.uk/student/* | |
| // @match https://maths.sparx-learning.com/student/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=maths.sparx-learning.com | |
| // @grant none |
This file contains hidden or 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 os import listdir, makedirs | |
| from os.path import exists, dirname, realpath, splitext, join | |
| from PIL import Image | |
| __dirname: str = dirname(realpath(__file__)) | |
| if not exists(join(__dirname, "image-input")): | |
| print('Please create a folder named "image-input" and put your images in it.') | |
| exit() |
NewerOlder