Wednesday, December 14, 2022

 for i in range (65,91):

    print(chr(i))

Triangle pattern

 for i in range(1,6):

    for j in range(1,i+1):

        print(j,end=' ')

    print('')



Monday, September 12, 2022

How to make a simple login form using HTML

<!DOCTYPE html>

<html lang="en">


<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Login Page</title>

</head>

<style>

    * {

        padding: 0;

        margin: 0;

    }


    body {

        background: rgb(43, 49, 99);

    }


    .container {

        display: flex;

        flex-dierection: column;

        justify-content: center;

        align-items: center;

        margin-top: 100px:

    }


    .heading {}


    .heading h2 {

        color: #c5c5c5;

        margin-bottom: 60px;

    }


    .email {}


    .email input {

        margin-bottom: 50px;

    }


    .password {}


    .password input {

        margin-bottom: 50px;

    }


    .button {}


    .button button {}

</style>


<body>

    <div class="container">

        <div class="heading">

            <h2>Login Form</h2>

        </div>

        <div class="email">

            <input type="email" placeholder="Enter Email">

        </div>

        <div class="password">

            <input type="password" placeholder="Enter Password">

        </div>

        <div class="button">

            <button>Login</button>

        </div>

    </div>

</body>


</html>

Monday, August 29, 2022

How to access the operating system of your device using python

import os
a=input("Enter the name of the file you wish to open")
c=os.startfile(a)
print("opening",a)
b=input("Do you wish to do it again(Y/N)-->")
if(b.lower()=="y"):
    d=input("Enter the name of the file you wish to open")
    e=os.startfile(d)
    print("opening",d)
    f=input("Do you wish to do it again(Y/N)-->")
elif(b.lower()=="n"):
    print("Operation Ended")
else:
    print("Invalid Input")

Sunday, August 28, 2022

How to make a code to insult the user using python

import random


a=input("Enter your name -->")


test_list1 = ["I never forget a face, but in your case I'll be glad to make an exception.","If you were twice as smart, you'd still b stupid.","I'm jealous of all the people who haven't met you","Somewhere out there is a tree working very hard to rplace th oxygen you consume.Now go apologize to it","It's better to let others think you are an idiot ,rather to open your mouth and prove it","They say beauty is on th inside.You better hope it's true","Don't compare yourself to others,you'd just be insulting yourself.","you're about as intresting as watching paint dry.","I wish we were better strangers.","If there is ever a price over your head take it.","you're so stupid that you can't get from A to B without going through the rest of the alphabt.","you are the kind of human that would be used as a bluprint to build an idiot","People say god cannot do a mistake but it's not true in your case.","were you born on a highway cause that's where most accidents happen","you're so dense that light bends around you"]


random_num = random.choice(test_list1)


print(a," ,",str(random_num))


b=input("Do you wish to continue (Y/N)-->")


while(b.lower()=='y'):

        

    c=input("Enter your name -->")


    test_list2=["I never forget a face, but in your case I'll be glad to make an exception.","If you were twice as smart, you'd still b stupid.","I'm jealous of all the people who haven't met you","Somewhere out there is a tree working very hard to rplace th oxygen you consume.Now go apologize to it","It's better to let others think you are an idiot ,rather to open your mouth and prove it","They say beauty is on th inside.You better hope it's true","Don't compare yourself to others,you'd just be insulting yourself.","you're about as intresting as watching paint dry.","I wish we were better strangers.","If there is ever a price over your head take it.","you're so stupid that you can't get from A to B without going through the rest of the alphabt.","you the kind of human that would be used as a bluprint to build an idiot","People say god cannot do a mistake but it's not true in your case.","were you born on a highway cause that's where most accidents happen","you're so dense that light bends around you"]


    random_num2=random.choice(test_list2)


    print(c,",",str(random_num2))


    d=input("Do you wish to continue (Y/N)-->")


    if(d.lower()=='y'):

        print("Let's continue")

    elif(d.lower()=='n'):

        print("Insulter ended")

        break

    else:

        print("Invalid Input")


Tuesday, August 23, 2022

How to make 9 green colored squares using turtle in python

from turtle import *

import turtle

bgcolor('white')

speed(5)

s=int(input("Enter the length of the rectangle"))

t=int(input("Enter the breadth of the rectangle"))

hideturtle()

fillcolor('green')

begin_fill()

forward(s)

left(90)

forward(t)

left(90)

forward(s)

left(90)

forward(t)

left(90)

forward(s)

right(90)

forward(t)

right(90)

forward(s)

right(90)

forward(t)

right(90)

back(s)

right(90)

back(t)

right(90)

back(s)

right(90)

back(t)

right(90)

back(s)

left(90)

back(t)

left(90)

back(s)

left(90)

back(t)

left(90)

forward(s+s)

left(90)

forward(t)

left(90)

forward(s)

left(90)

forward(t)

left(90)

forward(s)

right(90)


forward(t)

right(90)


forward(s)

right(90)


forward(t)

right(90)



forward(s)

right(90)


forward(t+t)

right(90)


forward(s)

right(90)


forward(t)

right(90)


back(s)

right(90)


forward(t)

right(90)


forward(s)

right(270)


back(s+s)

right(90)


back(s)

left(90)


end_fill()

Monday, August 22, 2022

Drawing Tom Holland Using Python

 from sketchpy import library

myObject = library.tom_holland()
myObject.draw()

Output:



 for i in range (65,91):     print(chr(i))