Posts

Featured post

Internet Speed Test App

Image
 Internet Speed Test App (Tkinter GUI) This Python program creates a simple Internet Speed Test application using the Tkinter library for the graphical user interface and the speedtest module to measure internet speed. When the user clicks the “Check Speed” button, the program connects to the nearest Speedtest.net server to measure both download and upload speeds. The results are displayed on the window in Mbps (Megabits per second). ---Features: 🎨 User Interface : Built with Tkinter, featuring a pink background and white display boxes for clear visibility. ⚡ Download & Upload Speed Measurement: Uses the speedtest library to check your internet speed in real time. 🔘 One-Click Testing: A single “Check Speed” button triggers the test and updates the labels with accurate results. --- How It Works: 1. The app window (500×500) opens with labels for Download and Upload speed. 2. When you click “Check Speed”, the speedcheck() function runs. 3. It uses speedtest.Speedtest() to:Con...

Maths Problem Generator

Image
 import random Maths Problem Generator in Python – Description A Maths Problem Generator is a Python program designed to automatically create random arithmetic problems for practice, quizzes, or learning purposes. The program can generate problems involving basic arithmetic operations like addition, subtraction, multiplication, and division. It can also check the user’s answer and provide immediate feedback. Key Features: 1. Random Problem Generation – Uses Python’s random module to generate numbers within a specified range. 2. Multiple Operations – Supports addition (+), subtraction (-), multiplication (×), and division (÷). 3. User Interaction – Prompts the user to solve each problem and enter an answer. 4. Automatic Evaluation – Compares the user’s input with the correct answer and provides feedback. 5. Customizable Difficulty – Users can adjust the range of numbers or the type of operations to increase or decrease difficulty. 6. Score Tracking (Optional) – Can keep track of cor...

Rock paper scissors

Image
 Rock–Paper–Scissors – Description Rock–Paper–Scissors is a simple hand game usually played between two people. Each player chooses one of three options at the same time: Rock(✊️) Paper (✋) Scissors (✌️) The winner is decided by the rules: Rock beats Scissors (crushes them) Scissors beat Paper (cuts it) Paper beats Rock (covers it) If both players choose the same option, it’s a draw. It’s often used as a quick decision-making game or just for fun. import random user_wins = 0 computer_win = 0 options = ["rock", "paper", "scissors"] while True:     user_input = input("Type rock/paper/scissors or q for quit? ")     if user_input == "q":         break     if user_input not in options:         continue     random_number = random.randint(0, 2)     computer_pick = options[random_number]     print("computer picked", computer_pick)     if user_input == "rock" and computer_pick == "s...

Dice game

Pig Game (Dice Game) – Description Pig is a simple two-player dice game where the goal is to be the first player to reach a target score (often 100 points). On each turn, a player rolls a die repeatedly until either: 1. They roll a 1 – in which case they score nothing for that turn, and it becomes the other player’s turn. 2. They choose to “hold” – which means they stop rolling and add their turn total to their overall score. The risk is that if you roll a 1, you lose all points accumulated in that turn. The strategy is deciding when to keep rolling for more points or when to “hold” and secure your current turn score. The game is called “Pig” because it’s about greed vs. caution – players must decide whether to be greedy and risk it all, or play safe. import random def roll():  min_value = 1  max_value = 6  roll = random.randint(min_value,max_value)  return roll value = roll() print(value) while True:  players = input("Enter the number of players ?")  if ...