Tuesday, July 22, 2025

WTP in python - Age Group Classifier

Age Group Classifier

Input a person's age and classify them as:


Child (0–12)

Teen (13–19)

Adult (20–59)

Senior (60+)



#take the input from user


age=float(input("Please enter you Age:  "))


if(age>0 and age<=12):

    print(f"{age} , Child")

elif(age>=13 and age<=19):

    print(f"{age} ,Teen ")

elif(age>=20 and age<=59):

    print(f"{age} , Adult")

elif(age>=60):

    print(f"{age} , Senior ")

else:

    print(f"{age} , Invaild Age ")

WTP in python - check the number is Even or Odd

 

Write a program that takes an integer input and checks whether it is even or odd.


num=int(input("Please Enter the Number : "))


num_check = num % 2


if (num_check == 0):

    print(f"{num} even number")

else:

    print("odd number ")

WTP in python - check Positive, Negative, or Zero

 

Ask the user to enter a number and print whether it is positive, negative, or zero.


# Positive, Negative, or Zero Checker

#take the input from user 

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


# check the condition 

if (number>0):

    print(f" {number} is postive")

elif(number<0):

    print(f"{number} is negative")

else:

    print(f"{number} is zero")

Friday, July 18, 2025

How to print in python ?

The print() function in Python is one of the most commonly used tools for displaying output. Whether you're debugging code, showing results, or interacting with users, print() is your go-to function.


print ("Hello world ")



Printing Multiple Items

You can print multiple items separated by commas:


name = "Anurag"

age = 30

print("Name:", name, "Age:", age)


output :

Name: Anurag Age: 30

Download python

To download the python for various platform like Windows, Linux , MacOS 


https://www.python.org/downloads/

Python Introduction

What is python ?

  • Python is very popular programming language  and this is developed by Guido van  Rossum .

  • This is released in 1991 .

  • Python supports multiple programming paradigms, including procedural, object-oriented, and functional programming

Key characteristics
  • Interpreted: Python code is executed line by line, simplifying debugging and allowing for rapid prototyping.
  • Object-Oriented: It supports object-oriented programming, enabling developers to create reusable and modular code.
  • Dynamically Typed: Python automatically determines variable types during runtime, reducing the need for explicit type declarations and making coding more flexible.
  • High-Level: Python handles complex operations like memory management, allowing developers to focus on problem-solving rather than low-level details.
  • Platform Independent: Python code can run on various operating systems (Windows, MacOS, Linux) without modification, promoting portability.
  • Free and Open-Source: Python is freely available to download, use, and distribute, fostering a large and active community that contributes to its continuous development and extensive library ecosystem. 
Good to know :

The most recent version is python3 


Python Bootcamp -: Zero to Hero

Index :

Introduction : 

Oracle 26 ai database free

 https://www.oracle.com/in/database/26ai/ Oracle 26 ai release  Oracle AI Database Free Want to get hands-on with Oracle AI Database 26ai—ab...