Skip to content

Instantly share code, notes, and snippets.

@EwhaWhiteMoon
Created March 7, 2024 05:12
Show Gist options
  • Save EwhaWhiteMoon/92155fa407b4223e66bdc0b304535ccf to your computer and use it in GitHub Desktop.
Save EwhaWhiteMoon/92155fa407b4223e66bdc0b304535ccf to your computer and use it in GitHub Desktop.
# prompt: 수업중인 교수님 코난처럼 재우는 알고리즘
# 1. 수업 내용을 이해하기 어렵게 만든다.
import random
def generate_confusing_lecture(subject):
"""
Generates a confusing lecture on the given subject.
Args:
subject: The subject of the lecture.
Returns:
A string containing the confusing lecture.
"""
# Use complex terminology and jargon.
terminology = ["paradigm shift", "heuristic approach", "epistemological framework"]
# Use abstract concepts and ideas.
concepts = ["the nature of reality", "the meaning of life", "the existence of God"]
# Use confusing examples and analogies.
examples = ["like a fish out of water", "like comparing apples to oranges", "like a square peg in a round hole"]
# Generate the lecture.
lecture = []
for i in range(10):
# Choose a random terminology, concept, and example.
term = random.choice(terminology)
concept = random.choice(concepts)
example = random.choice(examples)
# Combine them into a confusing sentence.
sentence = f"{term} is a key concept in {subject}, and it can be understood as {concept}. For example, {example} is a good way to think about {term}."
# Add the sentence to the lecture.
lecture.append(sentence)
return "\n".join(lecture)
# 2. 수업 중에 졸음을 유발하는 음악을 틀어준다.
import time
def play_sleep_inducing_music():
"""
Plays sleep-inducing music for a specified duration.
Args:
duration: The duration of time to play the music (in seconds).
"""
# Choose a sleep-inducing song.
song = "Moonlight Sonata"
# Play the song for the specified duration.
for i in range(duration // 60):
print(f"Playing {song} for {duration} seconds...")
time.sleep(60)
# 3. 수업 중에 불규칙한 소음을 낸다.
import random
def make_irregular_noise():
"""
Makes irregular noises at random intervals.
"""
# Choose a random noise.
noises = ["cough", "sneeze", "sigh", "grunt"]
noise = random.choice(noises)
# Make the noise at a random interval.
interval = random.randint(30, 60)
time.sleep(interval)
# Print the noise.
print(noise)
# 4. 수업 중에 갑자기 멈춘다.
import time
def pause_lecture():
"""
Pauses the lecture for a random duration.
"""
# Choose a random pause duration.
duration = random.randint(10, 30)
# Pause the lecture.
print("...")
time.sleep(duration)
# 5. 수업 중에 갑자기 질문을 한다.
import random
def ask_random_question():
"""
Asks a random question to the students.
"""
# Choose a random question.
questions = ["What is the meaning of life?", "What is the nature of reality?", "Why are we here?"]
question = random.choice(questions)
# Ask the question.
print(f"Question: {question}")
# 6. 수업 중에 갑자기 웃는다.
import random
def laugh_randomly():
"""
Laughs randomly at random intervals.
"""
# Choose a random laugh.
laughs = ["haha", "hehe", "hoho"]
laugh = random.choice(laughs)
# Laugh at a random interval.
interval = random.randint(30, 60)
time.sleep(interval)
# Print the laugh.
print(laugh)
# 7. 수업 중에 갑자기 잠을 잔다.
import time
def sleep_randomly():
"""
Sleeps for a random duration.
"""
# Choose a random sleep duration.
duration = random.randint(10, 30)
# Sleep.
print("...")
time.sleep(duration)
# 8. 수업 중에 갑자기 깨어난다.
import time
def wake_up_randomly():
"""
Wakes up from sleep at a random interval.
"""
# Choose a random wake-up interval.
interval = random.randint(30, 60)
time.sleep(interval)
# Print a wake-up message.
print("...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment