diff --git a/.DS_Store b/.DS_Store index 5542d46..6d4577e 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/AI-Powered Joke Bot _ Student Thesis.html b/AI-Powered Joke Bot _ Student Thesis.html new file mode 100644 index 0000000..95ec2ec --- /dev/null +++ b/AI-Powered Joke Bot _ Student Thesis.html @@ -0,0 +1,1017 @@ + + + + + + AI-Powered Joke Bot | Student Thesis + + + + +
+ +
+
+
+

AI-Powered Joke Bot

+

Bringing Humor to Digital Conversations

+
+ +
+
+ Student Thesis Project +
+ +
+ Supervisor: Dr. Johnson +
+ +
+ Student Developer: [Your Name] +
+ +
+ Academic Year 2025-2026 +
+
+
+
+ + +
+
+

Project Overview

+

An intelligent bot that understands and generates humor

+
+ +
+

Project Description

+

An AI-powered bot that generates, categorizes, and delivers jokes based on user preferences, mood, and context. Designed to bring lightheartedness to digital interactions and demonstrate natural language understanding capabilities.

+ +
+

Thesis Focus: Exploring how AI can understand and generate humor while maintaining appropriateness and cultural sensitivity.

+
+
+ +

Key Features

+ +
+
+
1
+
+ Context-Aware Humor - Generates jokes based on user preferences, time of day, and conversation context +
+
+ +
+
2
+
+ Multiple Categories - Supports various joke types including puns, one-liners, knock-knock jokes, and dad jokes +
+
+ +
+
3
+
+ Learning System - Adapts to user preferences by tracking which jokes get the best reactions +
+
+
+
+ + +
+

How Users Interact

+

Simple commands for instant humor

+ +

Basic Commands

+

Users can request jokes using intuitive commands and natural language.

+ +
+

Example 1: Random joke

+
+ User: /joke
+ Bot: "Why don't scientists trust atoms? Because they make up everything!" +
+ +

Example 2: Category-specific

+
+ User: /pun
+ Bot: "I told my computer I needed a break... now it won't stop sending me Kit-Kat ads." +
+ +

Example 3: Mood-based

+
+ User: I need a pick-me-up
+ Bot: "Here's something light: What do you call fake spaghetti? An impasta!" +
+
+ +
+

Joke Generation Example

+
+ "Why did the AI cross the road?" +
+
+ "To optimize the chicken's pathfinding algorithm!" +
+
+
+ + +
+

Joke Categories & Types

+

Diverse humor for different tastes

+ +

Supported Categories

+ +
+
+
๐Ÿ˜„
+
One-Liners
+
+ +
+
๐Ÿ‘จโ€๐Ÿ‘ง
+
Dad Jokes
+
+ +
+
๐Ÿ””
+
Knock-Knock
+
+ +
+
๐Ÿ“š
+
Puns
+
+ +
+
๐Ÿค–
+
Tech Humor
+
+ +
+
๐ŸŽ“
+
Academic
+
+
+ +

Context Awareness

+

The bot considers:

+ +
+ + +
+

Technology Stack

+

Modern AI and development tools

+ +
+

Core Technologies

+ +
+
๐Ÿค–
+
+ Natural Language Processing + GPT-based models for understanding context and generating appropriate humor +
+
+ +
+
๐Ÿ’ฌ
+
+ Telegram Bot API + Platform for deployment and user interaction +
+
+ +
+
๐Ÿ—„๏ธ
+
+ Database + Storing joke collections, user preferences, and interaction history +
+
+ +
+
โš™๏ธ
+
+ Python Backend + FastAPI or Django for bot logic and API management +
+
+
+ +

AI Components

+ +
+ + +
+

Research & Evaluation

+

Measuring humor effectiveness and AI capabilities

+ +

Research Questions

+
+

1. Can AI consistently generate humor that humans find funny?

+

2. How does contextual awareness affect joke reception?

+

3. What metrics best measure "successful" AI-generated humor?

+
+ +

Evaluation Methods

+ + +

Expected Contributions

+
+

To AI Research: Insights into humor generation and natural language understanding.

+

To Practical Applications: A framework for creating engaging, personality-driven chatbots.

+

To Human-Computer Interaction: Understanding how humor affects user engagement.

+
+
+ + +
+
+

Future Possibilities

+

Expanding the bot's capabilities and applications

+
+ +
+

Expansion Opportunities

+ +
+
๐ŸŒ
+
+ Multilingual Support + Generate and understand jokes in multiple languages +
+
+ +
+
๐ŸŽญ
+
+ Personality Customization + Allow users to select joke styles (sarcastic, wholesome, witty, etc.) +
+
+ +
+
๐Ÿ“Š
+
+ Joke Analytics + Track which jokes perform best and identify humor patterns +
+
+ +
+
๐Ÿค
+
+ Collaborative Joke Creation + Allow users to co-create jokes with the AI +
+
+ +
+
๐ŸŽฎ
+
+ Gamification + Add joke-telling games and humor challenges +
+
+ +
+
๐ŸŽจ
+
+ Visual Humor + Generate memes and visual jokes using image generation AI +
+
+
+ +
+

Academic Value: This project contributes to understanding AI's creative capabilities and human-AI interaction dynamics.

+

Practical Applications: Beyond entertainment, humor-generation AI has applications in mental health, education, and customer service.

+
+
+ + + +
+ + + + \ No newline at end of file diff --git a/AI-Powered Joke Bot _ Student Thesis_files/css2 b/AI-Powered Joke Bot _ Student Thesis_files/css2 new file mode 100644 index 0000000..d3daecf --- /dev/null +++ b/AI-Powered Joke Bot _ Student Thesis_files/css2 @@ -0,0 +1,315 @@ +/* cyrillic-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 600; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2) format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Inter'; + font-style: normal; + font-weight: 800; + font-display: swap; + src: url(https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/Thesis_AI6_Building a Telegram Joke Bot_ A Student Project.html b/Thesis_AI6_Building a Telegram Joke Bot_ A Student Project.html new file mode 100644 index 0000000..78ee197 --- /dev/null +++ b/Thesis_AI6_Building a Telegram Joke Bot_ A Student Project.html @@ -0,0 +1,257 @@ + + + + + + Building a Telegram Joke Bot: A Student Project + + + +
+

Building a Telegram Joke Bot: A Student Project

+ +
+
Supervisor: Bob Santos
+
+ Developers: ะ”ะฐัˆัƒะฝะธะฝ ะ”ะผะธั‚ั€ะธะน, ะ•ั€ะพั…ะธะฝ ะ”ะฐะฝะธะธะป, ะžะฒะณะฐะฝะพะฒะฐ ะ˜ะฝะฝะฐ, ะŸะพะปะบะพะฒะฝะธะบะพะฒ ะั€ั‚ั‘ะผ +
+
+ +

Introduction

+

A group of students created a Telegram joke bot as a school project. A Telegram bot is a small computer program that can send and receive messages automatically. This particular bot tells jokes to people who message it. The students wanted to make something fun that could bring smiles to people's faces while learning about computer programming.

+ +

Aim

+

The goal of this project was to create a simple, working bot that could:

+ + +

Method

+

The students used these steps to build their bot:

+
    +
  1. Choose Python: They picked Python because it's a beginner-friendly programming language.
  2. +
  3. Use Telegram's Tools: They connected to Telegram's Bot API, which lets programs send and receive messages.
  4. +
  5. Write the Code: They wrote about 30 lines of code that make the bot work.
  6. +
  7. Add Jokes: They created a list of three funny jokes for the bot to tell.
  8. +
  9. Test the Bot: They tested the bot to make sure it worked correctly.
  10. +
+ +

Results

+

The students successfully created a working Telegram bot with these features:

+ + +

Conclusion

+

The students learned that creating technology doesn't have to be complicated. With just basic programming skills, they built a bot that can make people happy. This project showed them that coding is not just about math and logicโ€”it's also a creative tool. They proved that even simple programs can have real value and bring joy to people.

+ +

Future Possibilities

+

This bot could be improved in many ways:

+ + +
+

Addendum: Complete Bot Code

+

Here is the complete Python code for the Telegram joke bot:

+ +
+ Note: For security reasons, the actual bot token has been removed. When using this code, you should replace "YOUR_BOT_TOKEN_HERE" with your actual bot token from @BotFather. +
+ +
from telegram import Update +from telegram.ext import Application, CommandHandler, ContextTypes +import random + +JOKE_LIST = [ + "Why did the robot go to school? To recharge his brain! ๐Ÿ”‹", + "Knock knock!\nWho's there?\nLettuce!\nLettuce who?\nLettuce in!", + "Why don't eggs tell jokes? They'd crack each other up! ๐Ÿฅš" +] + +async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): + await update.message.reply_text("Hi! Type /joke for a funny joke! ๐Ÿ˜„") + +async def send_joke(update: Update, context: ContextTypes.DEFAULT_TYPE): + joke = random.choice(JOKE_LIST) + await update.message.reply_text(joke) + +def main(): + # ๐Ÿ”‘ REPLACE THIS with your bot token from @BotFather + BOT_TOKEN = "YOUR_BOT_TOKEN_HERE" + + app = Application.builder().token(BOT_TOKEN).build() + app.add_handler(CommandHandler("start", start)) + app.add_handler(CommandHandler("joke", send_joke)) + print("Bot is running... Press Ctrl+C to stop.") + app.run_polling() + +if __name__ == "__main__": + main()
+ +

The code is organized in a simple way:

+
    +
  1. It imports necessary tools (like the Telegram library and random number generator)
  2. +
  3. It creates a list of jokes
  4. +
  5. It makes two functions: one for the /start command and one for the /joke command
  6. +
  7. It connects to Telegram using a special bot token
  8. +
  9. It starts the bot and keeps it running
  10. +
+
+
+ + \ No newline at end of file diff --git a/Thesis_AI6_Building a Telegram Joke Bot_ A Student Project.pdf b/Thesis_AI6_Building a Telegram Joke Bot_ A Student Project.pdf new file mode 100644 index 0000000..dc24e32 Binary files /dev/null and b/Thesis_AI6_Building a Telegram Joke Bot_ A Student Project.pdf differ diff --git a/android_game.py b/android_game.py new file mode 100644 index 0000000..2eb0ec8 --- /dev/null +++ b/android_game.py @@ -0,0 +1,35 @@ +# asteroid_game.py - Starter Template +import turtle +import random + +# === SETUP THE GAME WINDOW === +screen = turtle.Screen() +screen.setup(600, 600) +screen.bgcolor("black") +screen.title("Asteroid Game") +screen.tracer(0) # Turn off auto-update for smooth animation + +# === CREATE PLAYER === +player = turtle.Turtle() +player.hideturtle() # Hide the turtle shape +player.color("#00FFFF") # Cyan color +player.penup() +player.goto(0, -250) +player.emoji = "๐Ÿ›ฐ๏ธ" # Satellite emoji +player_speed = 20 + +# === GAME VARIABLES === +game_active = True +asteroids = [] # List to store all asteroids + +# === FUNCTIONS === +def draw_player(): + """Draw the player satellite""" + player.clear() + player.write(player.emoji, align="center", font=("Arial", 32, "normal")) + +# === TEST CODE === +# Uncomment this to test: +# draw_player() +# screen.update() +# turtle.done() \ No newline at end of file diff --git a/dodge_astroid_game/Introduction to Python_ Variables Functions and Loops.html b/dodge_astroid_game/Introduction to Python_ Variables Functions and Loops.html deleted file mode 100644 index 9b562e3..0000000 --- a/dodge_astroid_game/Introduction to Python_ Variables Functions and Loops.html +++ /dev/null @@ -1,1405 +0,0 @@ - - - - - - Introduction to Python: Variables, Functions, and Loops - - - -
- -
-
-

Introduction to Python

-
Slide 1 of 11
-
-

Variables, Functions, and Loops

- -
-
๐Ÿ
-

In this introduction to coding in Python for beginners, you will learn how to use variables, loops, and functions to create visual and interactive artwork, animations, simulations, games, and more.

-
- -

What will I create?

-

Make interactive projects, art, games, and a simulation. By the end of this path you will have created a scalable piece of geometric art.

- -
-

321โ€ฆMake! Learning Path

-

This path follows 321โ€ฆMake! methodology:

-
-
-
3
-

Explore projects

-

Introduce creators to a set of skills and provide step-by-step instructions to help them develop initial confidence.

-
-
-
2
-

Design projects

-

Allow creators to practise skills from the Explore projects, and express themselves creatively while they grow in independence.

-
-
-
1
-

Invent project

-

Encourages creators to use their skills to create a unique project that meets a project brief for a particular audience.

-
-
-
- -

What do I need to know?

- - -

What do I need?

- - -
-

Quick Quiz Instructions

-

Each project contains a quick quiz with three multiple choice questions. You are guided to the correct answer through useful feedback and are awarded a project badge.

-
- -
-

This Design Project

-

This Design project guides you to use your new skills and encourages you to make design choices based on your interests.

-

You will make: Build a scrolling endless runner game where your character has to avoid obstacles - "Dodge asteroids"

-
- - -
- - -
-
-

Set the Scene

-
Slide 2 of 11
-
- -
-

Step 1: Open the starter project

-

Create a variable called safe to store the background colour.

-
- -

In the game, the player is safe if they are touching the background colour.

- -
- def draw():
-     # Put code to run every frame here
-     global safe
-     safe = Color(200, 100, 0)
-     background(safe)
-
- -
-

Test:

-

Run your code and you should see a coloured square.

-

The colour is three numbers - the amount of red, green and blue. Try changing the numbers to any whole number between 0 and 255 to get a different colour.

-
- -

Define a draw_player function

- -
- # Draw player function goes here
-def draw_player():
-    text('๐Ÿค ', 200, 320)
-
- -

Call the draw_player function so that the player is drawn on the screen.

- -
- def draw():
-    # Put code to run every frame here
-    global safe
-    safe = Color(200, 100, 0)
-    background(safe)
-    draw_player()
-
- -
-

Test:

-

Run your code and you should see the emoji appear near the bottom of the screen.

-

You can paste in a different emoji if you want to.

-
- -
-

The Emoji Keyboard

-

Your device might have an emoji keyboard that you can use to select an emoji:

-
    -
  • Mobile or tablet: Press the emoji icon (this is typically a smiley face)
  • -
  • Windows: Windows key + Full stop
  • -
  • Mac: CTRL + CMD + Space
  • -
  • Linux: Ctrl + Alt + E
  • -
-

Below are some of the most popular emojis that you could use in your project. You can copy them from here.

-
- -
- -
- -
-

Important:

-

There are over 3,000 emojis available for you to use. They cover a wide variety of emotions, themes, and activities.

-

Tip: Emojis look slightly different on different devices, so someone else may not see exactly the same image as you. Some emojis are not supported on some devices and these appear as a square instead.

-
- -

To make the player follow the mouse as it moves from side to side, change the player's x position to mouse_x.

- -
- # Draw player function goes here
-def draw_player():
-    text('๐Ÿค ', mouse_x, 320)
-
- -
-

Test:

-

Run your code and check that the player moves left and right when you move the mouse.

-
- - -
- - -
-
-

Create an Obstacle

-
Slide 3 of 11
-
- -

Create the obstacles that you will have to avoid to keep playing the game.

- -
-

Step 1: Define a draw_obstacles function

-

Define a draw_obstacles function to draw a cactus emoji ๐ŸŒต.

-
- -
- # Draw obstacles function goes here
-def draw_obstacles():
-    text('๐ŸŒต', 200, 200)
-
- -

Call the draw_obstacles function so that the cactus is drawn on the screen.

- -
- def draw():
-    # Put code to run every frame here
-    global safe
-    safe = Color(200, 100, 0)
-    background(safe)
-    draw_obstacles()
-    draw_player()
-
- -
-

Test:

-

Run your code and you should see a cactus as well as your player.

-
- -

Add Variables for Obstacle Position

- -
- def draw_obstacles():
-    obstacle_x = 200
-    obstacle_y = 200
-    text('๐ŸŒต', obstacle_x, obstacle_y)
-
- -

Now, add frame_count to the obstacle's y (vertical) position.

- -
- def draw_obstacles():
-    obstacle_x = 200
-    obstacle_y = 200 + frame_count
-    text('๐ŸŒต', obstacle_x, obstacle_y)
-
- -
-

Test:

-

Run your code and the cactus emoji should move down the screen until it reaches the bottom.

-
- -
-

Choose Your Obstacle Emoji

-

Select an emoji for your obstacles:

-
- -
- -
- - -
- - -
-
-

Random Obstacles

-
Slide 4 of 11
-
- -

Currently, the obstacle disappears off the bottom of the screen, because its obstacle_y position becomes larger than the screen size.

- -
-

Step 1: Use the modulo operator

-

Use the modulo (%) operator to divide the y position by the screen size and give you the remainder. This makes the obstacle reappear at the top!

-
- -
- def draw_obstacles():
-    obstacle_x = 200
-    obstacle_y = 200 + frame_count
-    obstacle_y = obstacle_y % screen_size
-    text('๐ŸŒต', obstacle_x, obstacle_y)
-
- -
-

Test:

-

Run your code and you should see the obstacle reach the bottom of the screen and then restart from the top.

-
- -

Add Random Generation

- -
-

Step 2: Add a random seed

-

Add a line of code for a random seed. A seed lets you generate the same random numbers in each frame.

-
- -
- # Draw obstacles function goes here
-def draw_obstacles():
-    seed(1234)
-    obstacle_x = 200
-    obstacle_y = 200 + frame_count
-
- -
-

Step 3: Generate random coordinates

-

Update the code so that the x, y coordinates for the obstacle are generated randomly.

-
- -
- # Draw obstacles function goes here
-def draw_obstacles():
-    seed(1234)
-    obstacle_x = randint(0, screen_size)
-    obstacle_y = randint(0, screen_size) + frame_count
-
- -
-

Test:

-

Run your code and you should see the cactus appear at a random position. Change the 1234 value inside the seed to another number and it will appear somewhere else.

-
- - -
- - -
-
-

Lots of Obstacles

-
Slide 5 of 11
-
- -

Now you will add code to make lots of obstacles to avoid.

- -
-

Step 1: Add a loop

-

Add a loop and indent the code to draw an obstacle. The loop will run this code multiple times.

-
- -
- def draw_obstacles():
-    seed(1234)
-    for i in range(8):
-        obstacle_x = randint(0, screen_size)
-        obstacle_y = randint(0, screen_size) + frame_count
-        obstacle_y = obstacle_y % screen_size
-        text('๐ŸŒต', obstacle_x, obstacle_y)
-
- -
-

Important:

-

Make sure that the code for the seed is before the loop, otherwise all of your obstacles will be generated on top of each other!

-

Change the number inside range() to control how many obstacles are created.

-
- -
-

Test:

-

Run your code and you should see several obstacles.

-
- - -
- - -
-
-

Collisions

-
Slide 6 of 11
-
- -

Recall that in the first step you created a 'safe' colour.

- -
-

Step 1: Create a variable for collision detection

-

Create a variable to store the colour the player emoji is currently touching.

-
- -
- def draw_player():
-    player_on = get(mouse_x, 320).hex
-    text('๐Ÿค ', mouse_x, 320)
-
- -
-

Step 2: Check for collisions

-

If the player is touching the safe colour, draw the player emoji. If it is not, draw an explosion emoji to show they have crashed.

-
- -
- def draw_player():
-    player_on = get(mouse_x, 320).hex
-    if player_on == safe.hex:
-        text('๐Ÿค ', mouse_x, 320)
-    else:
-        text('๐Ÿ’ฅ', mouse_x, 320)
-
- -
-

Test:

-

Run your code and move the player. You should see the explosion emoji if your player touches an obstacle.

-
- -
-

Important Ordering:

-

Make sure that in draw(), the line of code to draw_obstacles() is before draw_player(). If you check for collisions before drawing the obstacles in a frame, then there won't be any obstacles to collide with!

-
- - -
- - -
-
-

Quick Quiz

-
Slide 7 of 11
-
- -
-

Quiz Instructions:

-

Answer the three questions. There are hints to guide you to the correct answer.

-

When you have answered each question, click on your chosen answer to see feedback.

-

Have fun!

-
- -
-

Question 1 of 3

-

You have used a lot of if statements to control your game's behaviour. Some of them might have had more complex conditions, using and to make multiple tests at once. If you ran the following piece of conditional code, what would you expect the output to be?

- -
- score = 5000
-lives = 2

-if score >= 5000 and lives >= 3:
-    print('Great flying!')

-if score >= 5000:
-    print('Doing well!')
-    if lives > 1:
-        print('Keep going!')
-    else:
-        print('But be careful!')

-elif lives > 1:
-    print('Push harder!')

-else:
-    print('Head for base!')
-
- -
-
- A) Great flying! -
-
- B) Doing well! Keep going! -
-
- C) Doing well! -
-
- D) Push harder! -
-
- -
- Try again! While score >= 5000 is true, for an and condition both parts must be true, and lives >= 3 is false. -
- -
- Correct! This is correct โ€” score >= 5000 is true, and so is lives > 1 on the nested if statement. -
- -
- Try again! Close, but score >= 5000 isn't the only condition the program would find true as it ran. -
- -
- Try again! While lives > 1 is true, only the code inside the first true condition in an if/elif/else statement is executed, and lives > 1 is not the first condition that is true. -
-
- - -
- - -
-
-

Quick Quiz (Continued)

-
Slide 8 of 11
-
- -
-

Question 2 of 3

-

In this project you used procedural generation โ€” having the computer create and place parts of your world for you. While doing this is a great time saver, particularly if you're creating very large levels, it can create some issues. Which of these issues should you look out for when testing your procedural generation?

- -
-
- A) All of them -
-
- B) Obstacles could be generated that leave the player with no route forward. -
-
- C) Obstacles appear directly underneath the player. -
-
- D) The obstacles are all grouped together, leaving too much open space elsewhere. -
-
- -
- Correct! All of these can happen when using procedural generation. You can either add more code to check for and work around these issues, or try different seeds until you find one that works. -
- -
- Try again! This can happen with procedurally generated obstacles, particularly when the game first starts.

- Tip: You could work around this issue by preventing obstacles from appearing too close to the player's starting position. Can you think of other solutions? -
- -
- Try again! This can happen either at the start of the game, or when new obstacles are added as a result of increasing the difficulty level, if they happen to choose a position close to the player's.

- Tip: A potential solution might be to make the player temporarily immune to collision with all obstacles, or even only newly created obstacles, for a short time after a level increase. What problems might having the obstacle choose a new position create if it was too close to the player? -
- -
- Try again! Because random generation can choose groups of numbers that are close together, this can be a problem.

- Tip: One solution might be to switch to semi-random generation โ€” break the screen up in to pieces and use random numbers to generate obstacles inside each of those pieces. Can you think of how you could use this sort of procedural generation to make your game more interesting, or more challenging? -
-
- - -
- - -
-
-

Quick Quiz (Continued)

-
Slide 9 of 11
-
- -
-

Question 3 of 3

-

You made a game that you're really pleased with and shared it. A player has reviewed it and has shared some thoughtful feedback with some changes they would like to see.

-

What would be the best way to react to their suggestions?

- -
-
- A) Immediately make all the changes they have suggested. -
-
- B) Ignore the suggestions because you know best. -
-
- C) Consider their feedback with other feedback and decide how to improve your game. -
-
- D) Feel really sad that the player didn't think your game was perfect. -
-
- -
- Try again! It's great to get feedback, but you shouldn't change your game just to keep one player happy, maybe other players might give different feedback. -
- -
- Try again! Not quite. It's usually worth listening to what your users have to say about your work. If a player has given constructive feedback, then you should consider it. -
- -
- Correct! You should consider any feedback you get โ€” while always trying to get more than one point of view โ€” and make decisions to improve the game for all players. -
- -
- Try again! No! You shouldn't feel sad if someone suggests improvements to your game. Constructive feedback is really useful and can help improve your game. You should be pleased that they were interested enough in your game to give feedback. -
-
- - -
- - -
-
-

Learning Outcomes

-
Slide 10 of 11
-
- -
-
-

Variables Mastered

-

โœ“ Create and use variables like safe, player_on, obstacle_x, obstacle_y

-

โœ“ Understand RGB color values (0-255)

-

โœ“ Use frame_count for animation

-
- -
-

Functions Implemented

-

โœ“ Create functions: draw_player(), draw_obstacles()

-

โœ“ Call functions in proper order

-

โœ“ Use def keyword to define functions

-
- -
-

Loops & Control Flow

-

โœ“ Use for loops with range()

-

โœ“ Implement if/else statements for collision detection

-

โœ“ Use modulo operator (%) for wrapping

-
- -
-

Game Development Skills

-

โœ“ Procedural generation with randint() and seed()

-

โœ“ Collision detection using color checking

-

โœ“ Player movement with mouse_x

-

โœ“ Game state management

-
-
- -
-

What You've Accomplished

-

You've built a complete endless runner game with:

-
    -
  • Player character that follows mouse movement
  • -
  • Randomly generated obstacles that scroll down the screen
  • -
  • Collision detection system
  • -
  • Visual feedback for collisions (explosion emoji)
  • -
  • Wrap-around obstacle system using modulo operator
  • -
-
- - -
- - -
-
-

Challenge

-
Slide 11 of 11
-
- -

Now it is over to you! Use the skills you have learned to finish the game.

- -
-
-
- Use different emojis to represent the player and the obstacles. -
- -
-
- Draw the player or the obstacles using shapes instead (you learned this in the Make a face project). -
- -
-
- Draw the player or the obstacles using images instead (you learned this in the Rocket launch project). -
- -
-
- Change one line of code to make the obstacles move faster. -
- -
-
- Create a variable and add one to it each time the player crashes. -
- -
-
- Make the obstacles move faster after every crash. -
- -
-
- Add an item for the player to pick up, which disappears when the player touches it. -
- -
-
- Add a variable to keep track of the player's score. -
- -
-
- Stop the game if the player crashes. -
- -
-
- Display a text message on the screen to say 'Game over'. -
-
- -
-

Your Game Progress

-

0/10 challenges completed

-
-
-
-

Complete these challenges to enhance your game!

-
- -
-

Tips for Success

-
    -
  • Start with one challenge at a time
  • -
  • Test your code after each change
  • -
  • Use the emoji keyboard shortcuts provided earlier
  • -
  • Remember to save your project regularly
  • -
  • Share your completed game with others for feedback!
  • -
-
- - -
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/dodge_astroid_game/main.py b/dodge_astroid_game/main.py deleted file mode 100644 index 3f996d6..0000000 --- a/dodge_astroid_game/main.py +++ /dev/null @@ -1,26 +0,0 @@ -from p5 import * -from random import randint, seed - -# Include global variables here -screen_size = 400 - -# Draw player function goes here - - - -# Draw obstacles function goes here - - -def setup(): - # Put code to run once here - size(screen_size, screen_size) - text_size(40) - - -def draw(): - # Put code to run every frame here - - - -# Keep this to run your code -run()