Posts

Showing posts from December, 2022

Python Advance Programs by Devansh Mishra.

HERE ARE SOME ADVANCE PYTHON PROGRAMS MOST USEFUL FOR PYTHON BEGINNER'S-- 1. Displaying Number Pyramid rows = int(input('Enter the number of rows')) for i in range(rows):     for j in range(i):         print(i, end=' ')     print('')       2.Prgram to find numbers which are divisible by 7 and multiple of 5 in the range 1500 & 2700          nl=[] for x in range(1500, 2701):     if (x%7==0) and (x%5==0):         nl.append(str(x)) print (','.join(nl))       3. Bubble Sort using Python import sys def bubble_sort(arr):      n = len(arr)     for i in range(n):         for j in range(0, n-i-1):             if arr[j] > arr[j+1]:                 temp = arr[j]                 arr[j] = arr[j+1]       ...

Python Intermediate Programs by Devansh Mishra.

Some normal Python programs are given below and is very useful to Python beginner's.  1.  Calculator Program operation = input(''' Please type in the math operation you would like to complete: + for addition - for subtraction * for multiplication / for division ''') number_1 = int(input('Enter your first number: ')) number_2 = int(input('Enter your second number: ')) print('{} + {} = '.format(number_1, number_2)) print(number_1 + number_2) print('{} - {} = '.format(number_1, number_2)) print(number_1 - number_2) print('{} * {} = '.format(number_1, number_2)) print(number_1 * number_2) print('{} / {} = '.format(number_1, number_2)) print(number_1 / number_2)       2. Find vowels in Given String using Python a_string = input("Enter String ") lowercase = a_string.lower() vowel_counts = {} for vowel in "aeiou":     count = lowercase.count(vowel)     vowel_counts[vowel] = count counts = vowel_cou...

Python Basic Programs By Devansh Mishra.

Basic programs are given of python which is very useful for Python Beginner's.  1.Hello World print("Hello World") 2.Square Root  number = int(input("enter a number: ")) sqrt = number ** 0.5 print("square root:", sqrt) 3. cube Root def cube_root(x):         return x**(1/3) print(cube_root(27)) 4. Fahrenheit to Celsius temp = float(input("Enter temperature in Fahrenheit: ")) celsius = (temp - 32) * 5/9 print(f"{temp} in Fahrenheit is equal to {celsius} in Celsius")   5. Area of Triangle Height = float(input("Enter Height: ")) Base = float(input("Enter Base: ")) ans = (0.5) * Height * Base print("Area Of Triangle", ans) 6. Area of Circle rad = float(input("Enter Radius Of Circle :")) area = 3.14 * rad * rad print("Area of Circle", area) 7. Armstrong Number in Python from math import * number = int(input("Enter the number : ")) result = 0 n = 0 temp = number; while (temp != 0)...

Ticket Making Animation

<!DOCtype html> <html> <style>   * {     box-sizing: border-box;   }      body,   html {     height: 100%;     display: grid;     background-color: #aaa;   }      .ticket-machine {     position: absolute;     top: 0;     left: 50%;     transform: translatex(-50%);     width: 600px;     height: 90px;     background-color: #0af;     border: 2px solid #000;     border-top: 0;     border-bottom-left-radius: 15px;     border-bottom-right-radius: 15px;     box-shadow: 5px 4px 0 3.5px #00c, 6px 5px 0 4.5px #000;   }      .slot-wrapper {     position: absolute;     top: 0;     left: 50%;     transform: translatex(-60%);     width: 360px;     height: 40px;     margin: auto;   ...

" Words moving in circular motion as Tiny Particles " Animation

<!DOCtype html> <html> <style>   body {     margin: 0;     overflow: hidden;   }      a {     position: fixed;     display: inline-block;     margin-left: calc(50vw - 70px);     font-size: 20px;     z-index: 1;     color: white;   } </style> <body>   <script>     let canvas = document.createElement('canvas');     canvas.style.background = '#000'     document.body.appendChild(canvas);     let gl = canvas.getContext("webgl",     {       preserveDrawingBuffer: true     });     let clearPass = program(     {       type: gl.TRIANGLES,       vertexSize: 2,       vertices: [-1, 3, -1, -1, 3, -1], // full screen triangle       shaders: [`             attribute vec2...

Burning Animation where you Touch

#made by DEVANSH mishra# <html> <head>  <style>   /*Some styles*/      * {    margin: 0;    padding: 0;   }      #canvas {    display: block;   }  </style>  <script>   window.onload = function()   {    var canvas = document.getElementById("canvas");    var ctx = canvas.getContext("2d");    //Make the canvas occupy the full page    var W = window.innerWidth,     H = window.innerHeight;    canvas.width = W;    canvas.height = H;    var particles = [];    var mouse = {};    //Lets create some particles now    var particle_count = 100;    for (var i = 0; i < particle_count; i++)    {     particles.push(new particle());    }    //finally some mouse tracking    canvas.addEventListener('mousemove...

SWAG ANIMATION WITH SOUND

<!DOCtype html> <html> <style>   /*********************/      *,   *::after,   *::before {     margin: 0;     padding: 0;     box-sizing: border-box;     user-select: none;     outline: none;     appearance: none;     transform-style: preserve-3d;     -webkit-tap-highlight-color: transparent;   }   /***********************/   /***********************/      body {     display: flex;     justify-content: center;     align-items: center;     height: 100vh;     width: 100%;     overflow: hidden;     font-family: "Molle", cursive;     background-color: #7e8181;     color: #ffffff;   }   /**/      .svgs {     position: absolute;     left: 50%;     bottom: 6vmin;     transform: translat...