From 3651a43f09ec1980d86070696a1b28f4b5959f77 Mon Sep 17 00:00:00 2001 From: Yash Shreshtha Raj <162735680+YashShreshthaRaj404@users.noreply.github.com> Date: Mon, 22 Jul 2024 21:09:51 +0530 Subject: [PATCH 1/6] Add files via upload --- Age Calculator.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Age Calculator.py diff --git a/Age Calculator.py b/Age Calculator.py new file mode 100644 index 0000000..420668a --- /dev/null +++ b/Age Calculator.py @@ -0,0 +1,46 @@ +""" + This is an age calculator which will tell you your current age, +by entering your date of birth. +""" + +print("AGE CALCULATOR".center(45) + '\n' + '\n') + +# Function for years.... +import datetime + +current_year = datetime.datetime.now().year + +# Function for months.... + +import datetime + +current_month = datetime.datetime.now().month + +# Function for days.... + +from datetime import date +today = date.today() + +from datetime import datetime + +"""" +current_time = datetime.now() +print(current_time.strftime("%H:%M:%S") + ) +""" + +print("Enter Your Date Of Birth".upper() + '\n' + ) +d1 = int(input("date:".upper() + ) + ) +m1 = int(input("month:".upper() + ) + ) +y1 = int(input("year:".upper() + ) + ) +print('\n' "Age".upper() , "=" , current_year - y1, "Years", current_month - m1, + "Months", + today.day - d1, "Days" + '\n' + ) From d6fd4b27de67997697869848001a6f681d1451a7 Mon Sep 17 00:00:00 2001 From: Yash Shreshtha Raj <162735680+YashShreshthaRaj404@users.noreply.github.com> Date: Sun, 29 Sep 2024 20:57:40 +0530 Subject: [PATCH 2/6] Add files via upload --- Kaun Banega Crorepati (KBC).py | 509 +++++++++++++++++++++++++++++++++ 1 file changed, 509 insertions(+) create mode 100644 Kaun Banega Crorepati (KBC).py diff --git a/Kaun Banega Crorepati (KBC).py b/Kaun Banega Crorepati (KBC).py new file mode 100644 index 0000000..be29e47 --- /dev/null +++ b/Kaun Banega Crorepati (KBC).py @@ -0,0 +1,509 @@ +import random +from email.mime.multipart import MIMEMultipart +from email.mime.text import MIMEText + +# Inroductions.... +intro = print("Kaun Banega Crorepati (KBC)".center(45) + ) +intro1 = print("Welcome to the Kaun Banega Crorepati (KBC) Game".center(12)) +print() + +#Entry intruduction... +name = input("what is Your Name-\n") +greeting = print("Hello,",name,"Welcome to the Kaun Banega Crorepati (KBC) Game") +# end .. +print() +# want to enter or not ?? +st1 = print("Start the Game OR Go Back the Game-") +st = input() +if (st == "Start"): + print("Lets Go!!") +else: + print("Thank You for joining!!") + breakpoint() +# Instructions... +print() +print("Instructions:-") +print() +print("All question are compulsory") +print("Their are total 10 questions") +print("Total prize are 10 crore") +print("All question have points and price will be given accordingly.") +print() + +# Read out or next... +st2 = input("Continue ? Yes or No\n") +print() +if (st2 == "No"): + breakpoint() +else: + ConnectionRefusedError +print() +# Set the prize pool based on score +score = 0 +# Set the total score +prize = 0 +total_score = score # 100 score +total_prize = prize # 100 prize +questions = [ + { + "question": "Q - Current Railway Minister of India is -", + "options": ["A. Mamta Banarjee", "B. Ram Vilash", "C. Ashwini vaishnaw", "D. Piyush Goyal"], + "answer": "C" + }, + # Add more questions here... +] + +# Randomly select a question +selected_question = random.choice(questions) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") + +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 100000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 50000 +# Ask if the user wants to continue +st3 = input("Do you want to continue this game? Yes or No") + +# Check if the total score reaches the prize pool +prize_amount = score +if (st3 == "Yes"): + prize_amount = prize + print("Your final score is:", score) +else: + print("Your totsl score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs ") + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +for _ in range(1): + for _ in range(1): + continue + continue +questions1 = [ + { + "question": "Q. Which god is also known as 'Gauri Nandan'?" , + "options": ["A. Agni" ,"B.Indra" ,"C. Hanuman", "D. Ganesha"], + "answer": "D" + }, + # Add more questions here... +] + +# Randomly select a question +selected_question = random.choice(questions1) +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 200000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 50000 +# Ask if the user wants to continue +st4 = input("Do you want to continue this game? Yes or No") + +# Check if the total score reaches the prize pool +if (st4 == "Yes" ): + prize_amount = prize + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs") + total_score = prize + breakpoint +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +total_score = prize +for _ in range(1): + for _ in range(1): + continue + continue +questions2 = [ + { + "question": "Q. What does not grow on tree according to a popular Hindi saying?" , + "options": ["A. Money" , "B. Flowers" , "C. Leaves" , "D. Fruits"], + "answer": "A" + }, + # Add more questions here... +] +# Randomly select a question +selected_question = random.choice(questions2) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 300000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 50000 +# Ask if the user wants to continue +st5 = input("Do you want to continue this game? Yes or No\n") +# Check if the total score reaches the prize pool +if (st5 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs") + total_score = prize + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +total_score = prize +for _ in range(1): + for _ in range(1): + continue + continue +questions3 = [ + { + "question": "Q. Which city is known as the Pink City of India?" , + "options": ["A. Banglore" , "B. Maysore" , "C. Jaipur" , "D. Kochi" ], + "answer": "C" + }, + # Add more questions here... +] + +# Randomly select a question +selected_question = random.choice(questions3) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 400000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 50000 +# Ask if the user wants to continue +st6 = input("Do you want to continue this game? Yes or No") +# Check if the total score reaches the prize pool +if (st6 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs") + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +total_score = prize +for _ in range(1): + for _ in range(1): + continue + continue +questions4 = [ + { + "question": "Q. Who wrote India's National Anthem?", + "options": ["A. Rabindranath Tagore" , "B. Lal Bahadur Shastri" , "C. Chetan Bhagat" , "D. RK Narayan" ], + "answer": "A" + }, + # Add more questions here... +] + +# Randomly select a question +selected_question = random.choice(questions4) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 500000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 50000 +# Ask if the user wants to continue +st7 = input("Do you want to continue this game? Yes or No\n") +# Check if the total score reaches the prize pool +if (st7 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs") + total_score = prize + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +for _ in range(1): + for _ in range(1): + continue + continue +questions5 = [ + { + "question":"Q. How many major religions are there in India?" , + "options": ["A. 6", "B. 7", "C. 8","D. 9" ], + "answer": "C" + }, + # Add more questions here... +] + +# Randomly select a question +selected_question = random.choice(questions5) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 1000000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 100000 +# Ask if the user wants to continue +st8 = input("Do you want to continue this game? Yes or No\n") +# Check if the total score reaches the prize pool +if (st8 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize}Rs") + total_score = prize + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +for _ in range(1): + for _ in range(1): + continue + continue +questions6 = [ + { + "question": "Q. When is the National Hindi Diwas celebrated?", + "options": ["A. 13 September" ,"B. 14 September" ,"C. 14 July" ,"D. 15 August"], + "answer": "B" + }, + # Add more questions here... +] +# Randomly select a question +selected_question = random.choice(questions6) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 2000000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + score -= 100000 +# Ask if the user wants to continue +st9 = input("Do you want to continue this game? Yes or No\n") +# Check if the total score reaches the prize pool +if (st9 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize}Rs") + total_score = prize + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +for _ in range(1): + for _ in range(1): + continue + continue +questions7 = [ + { + "question": "Q. Which country is the largest producer of coffee in the world?", + "options": ["A. Brazil", "B. Colombia", "C. Vietnam", "D. China"], + "answer": "A" + }, + # Add more questions here... +] +# Randomly select a question +selected_question = random.choice(questions7) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 13000000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 4500000 +# Ask if the user wants to continue +st10 = input("Do you want to continue this game? Yes or No\n") +# Check if the total score reaches the prize pool +if (st10 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs ") + total_score = prize + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +for _ in range(1): + for _ in range(1): + continue + continue +questions8 = [ + { + "question":"Q. Where is India Gate located?" , + "options": ["A. Punjab", "B. Aagra" ,"C. Mumbai", "D. New Delhi"], + "answer": "D" + }, + # Add more questions here... +] +# Randomly select a question +selected_question = random.choice(questions8) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) + +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 12500000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 4900000 +# Ask if the user wants to continue +st11 = input("Do you want to continue this game? Yes or No\n") +# Check if the total score reaches the prize pool +if (st11 == "Yes" ): + print("Your final score is:", score) +else: + print("Your final score is:", score) + print(f"Congratulations! You have won the prize pool of {prize} Rs") + total_score = prize + breakpoint() +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +for _ in range(1): + for _ in range(1): + continue + continue +questions9 = [ + { + "question": "Q. Who wrote Vande Mataram?", + "options": ["A. Sarat Chandra Chattopadhyay", "B. Rabindranath Tagore" ,"C. Bankim Chandra Chatterjee" ,"D.Ishwar Chandra Vidyasagar"], + "answer": "C" + }, + # Add more questions here... +] +# Randomly select a question +selected_question = random.choice(questions9) + +# Display the selected question +print(selected_question["question"]) +for option in selected_question["options"]: + print(option) +# Get user's input for the selected question +user_answer = input("Enter your answer (A/B/C/D): ") +# Check if the user's answer is correct +if user_answer == selected_question["answer"]: + print("Correct!") + score += 10 + prize += 70000000 +else: + print("Wrong! The correct answer is:", selected_question["answer"]) + score -= 5 + prize -= 8000000 +print("Your final score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} Rs") +total_score = prize +print() + +# Set the prize pool based on score.. +# This this a total scored basesed on game... +# And this is total prize cash based on game.... +""" +prize_pool = { + 100: 100000, # 1 lakh + 200: 200000, # 2 lakhs + 300: 300000, # 3 lakhs + 400: 400000, # 4 lakhs + 500: 500000, # 5 lakhs + 600: 1000000, # 10 lakhs + 700: 2000000, # 20 lakhs + 800: 3000000, # 30 lakhs + 900: 4000000, # 40 lakhs + 100: 7000000, # 7 crores +} +""" +print("Result Are Here:") +print() + +print("Your Total score is:", score) +print(f"Congratulations! You have won the prize pool of {prize} crores") +print() +print("Thank You!!") +print("For, playing this game!!") +print() + +# Feedback!!! + +FROM_EMAIL = input("Do you like this (KBC) game, you can write your email id!!\n") +MESSAGE = input("Feedback!!-\n ") +print("Thank You , see you again!!!") + From 3d8a14e7a53088c31268424a3be6ff08c424d717 Mon Sep 17 00:00:00 2001 From: Yash Shreshtha Raj <162735680+YashShreshthaRaj404@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:34:08 +0530 Subject: [PATCH 3/6] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..c436170 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +yashshreshtharaj404.github.in \ No newline at end of file From 27b2d46bfd106876be4e86a315e568cfb52edac4 Mon Sep 17 00:00:00 2001 From: Yash Shreshtha Raj <162735680+YashShreshthaRaj404@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:34:57 +0530 Subject: [PATCH 4/6] Update CNAME --- CNAME | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNAME b/CNAME index c436170..64bd5df 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -yashshreshtharaj404.github.in \ No newline at end of file +yashshreshtharaj404.github.icom \ No newline at end of file From ff79de01f5a659cd5a80cf93d9ecb5b19d5d8196 Mon Sep 17 00:00:00 2001 From: Yash Shreshtha Raj <162735680+YashShreshthaRaj404@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:35:26 +0530 Subject: [PATCH 5/6] Update CNAME --- CNAME | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CNAME b/CNAME index 64bd5df..c436170 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -yashshreshtharaj404.github.icom \ No newline at end of file +yashshreshtharaj404.github.in \ No newline at end of file From 1bf575fbab299197d014c36184f5efa3eef061fb Mon Sep 17 00:00:00 2001 From: Yash Shreshtha Raj <162735680+YashShreshthaRaj404@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:21:47 +0530 Subject: [PATCH 6/6] Add files via upload --- Secret Code Language (1).py | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Secret Code Language (1).py diff --git a/Secret Code Language (1).py b/Secret Code Language (1).py new file mode 100644 index 0000000..7e888a1 --- /dev/null +++ b/Secret Code Language (1).py @@ -0,0 +1,60 @@ +import random + +random.random() + +cho = input("want code or decode message:-") +if cho == "code": + try: + a = input("Enter a message:-") + except: + if len(a) < 2: + raise ValueError("len should atleast 3 cher") + + if len(a) >= 2: + b = a[1:] + a[0] + c = [ + "srk", + "joj", + "yup", + "kok", + "uri", + "xyz", + "jio", + "pok", + "lmn", + "qwe", + "ert", + "frt", + ] + d = [ + "fop", + "zip", + "mop", + "kai", + "sip", + "uih", + "jui", + "zyx", + "qrs", + "frg", + "khi", + "wer", + ] + e = random.choice(c) + f = random.choice(d) + g = e + b + f + h = g.split() + print("Your coded message is:- ", g) + +elif cho == "decode": + a1 = input("Enter a code word ") + if len(a1) < 2: + b2 = a1.split() + print("Your Decode word are:-", b2) + else: + c1 = a1[3:-3] + d1 = c1[-1] + c1[:-1] + print(d1) +else: + raise ValueError("Invalid choice and input, pleasecorrect them!!") + \ No newline at end of file