Saturday, August 30, 2025

How to upgrade pip module in python ?

anurag@Anurags-MacBook-Air ~ % 

anurag@Anurags-MacBook-Air ~ % python3 -m pip install --upgrade pip

Defaulting to user installation because normal site-packages is not writeable

Requirement already satisfied: pip in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages (21.2.4)

Collecting pip

  Downloading pip-25.2-py3-none-any.whl (1.8 MB)

     |████████████████████████████████| 1.8 MB 4.3 MB/s 

Installing collected packages: pip

  WARNING: The scripts pip, pip3 and pip3.9 are installed in '/Users/anurag/Library/Python/3.9/bin' which is not on PATH.

  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed pip-25.2

WARNING: You are using pip version 21.2.4; however, version 25.2 is available.

You should consider upgrading via the '/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip' command.

anurag@Anurags-MacBook-Air ~ % 

anurag@Anurags-MacBook-Air ~ % 




anurag@Anurags-MacBook-Air ~ % python3 -m pip --version

pip 25.2 from /Users/anurag/Library/Python/3.9/lib/python/site-packages/pip (python 3.9)

anurag@Anurags-MacBook-Air ~ % 

Thursday, August 21, 2025

Tuesday, July 22, 2025

WTP in python - Traffic Light Simulator

 # Traffic Light Simulator

# Input a color (red, yellow, green) and print the corresponding action:


# Red → Stop

# Yellow → Get Ready

# Green → Go


light_type=input("Please enter the light type (red, yellow, green ) : ")



if(light_type=="red"):

    print("Stop")

elif(light_type=="yellow"):

    print("Get Ready")

elif(light_type=="green"):

    print("Go")

else:

    print("wrong input")

WTP in python - Login System

 # Login System

# Ask for a username and password. 

# If both match predefined values, print "Login successful", else show appropriate error messages.

#username : abc

#password : 123



user=input("Please enter username: ")

password= input("Please enter the password:  ")


if(user=="abc" and password == "123"):

    print("Login successful")

elif(user != "abc" and password != "123"):

    print("both Incorrect Username and Password ")

elif (user != "abc"):

    print("Username is not correct ")

else:

    print("password is incorrect ")

WTP in python - Vowel or Consonant

# Vowel or Consonant

# Input a single alphabet and check whether it is a vowel or consonant.


letter=input("Please enter the letter: ")


if (letter == "a" or letter == "e" or letter == "i" or letter == "o" or letter == "u"):

    print(f"{letter} is vowel ") 

else:

    print(f"{letter} is consonant" )

 

WTP in python - Simple Calculator

 # Simple Calculator

# Ask the user to input two numbers and an operator (+, -, *, /) and perform the corresponding operation.


num1=float(input("Please enter the first number : "))

operator= input("Please enter (+,-,/,* ) : ")

num2=float(input("Please enter the second number :"))




if (operator=="+"):

    result=num1+num2

    print(f"{num1} + {num2} = {result}")


elif (operator=="-"):

    result=num1-num2

    print(f"{num1} - {num2} = {result}")


elif (operator=="/"):

    result=num1/num2

    print(f"{num1} / {num2} = {result}")


elif (operator=="*"):

    result=num1*num2

    print(f"{num1} * {num2} = {result}")


else:

    print("function not exsites as of now ")


WTP in python : Input three numbers and print the largest one

# Number Comparison

# Input three numbers and print the largest one.


# Logic Recap:

# First, check if num1 is greater than or equal to both num2 and num3.

# If not, check if num2 is greater than or equal to both num1 and num3.

# If neither is true, then num3 must be the largest.



num1=int(input("Please enter the first number: "))

num2=int(input("Please enter the second number: "))

num3=int(input("Please enter the third number: "))



if(num1 >= num2 and num1 >=num3):

    print(f"{num1} is the largest")

elif(num2>=num1 and num2 >=num3):

    print(f"{num2} is largest ")

else:

    print(f"{num3} is largest ") 

How to create Nano Banana 3D figurine step-by-step?

1. Launch Google Gemini or open Google AI Studio. 2. Select and upload the photo you want to convert. 3. Enter the following nanao banana 3...