R

@rohit_2p

JOIN_ASSIGNMENT

SQL
3 years ago
CREATE TABLE PERSONAL ( name VARCHAR(255), rollno INT, address VARCHAR(255), score INT ); CREATE TABLE RESULT ( rollno INT, marks INT,

sales.sql

SQL
3 years ago
CREATE DATABASE sales; USE sales; CREATE TABLE orders ( order_id INT NOT NULL AUTO_INCREMENT, customer_id INT NOT NULL, order_date DATE NOT NULL, order_total DECIMAL(10,2) NOT NULL, PRIMARY KEY (order_id)

practice_lab_assignment2

SQL
3 years ago
-- Create customer table CREATE TABLE customer ( cust_id varchar(10) PRIMARY KEY, f_name varchar(20), l_name varchar(20), area varchar(10), ph_no varchar(10) ); -- Insert data into customer table

abecedarian.py

Python
3 years ago
import string alphabet = string.ascii_lowercase previous = 'a' for char in alphabet: if char >= previous: print(previous, end=" ") previous = char else:

isaplha

Python
3 years ago
name = input("Enter your name: ") pan = input("Enter your PAN card number: ") if name.isalpha() and pan.isalpha(): print("Name and PAN card number are valid.") else: print("Invalid input.")

Happy

Python
3 years ago
import turtle t = turtle.Turtle() # draw the face t.circle(100) t.penup() t.goto(0, 150) t.pendown() t.circle(50)

Cards

Python
3 years ago
import itertools import random deck = list(itertools.product(range(1,14),['Spade','Heart','Diamond','Club'])) random.shuffle(deck) print("Shuffled deck of cards:") for card in deck: print(card[0], "of", card[1])

Hanoi

Python
3 years ago
def tower_of_hanoi(n, source, auxiliary, destination): if n == 1: print("Move disk 1 from source", source, "to destination", destination) return tower_of_hanoi(n-1, source, destination, auxiliary) print("Move disk", n, "f

F.py

Python
3 years ago
def fibonacci(n): if n <= 1: return n else: return (fibonacci(n-1) + fibonacci(n-2)) nterms = int(input("Enter the number of terms: ")) if nterms <= 0: print("Please enter a positive integer")

gcd.py

Python
3 years ago
def gcd(x,y): if x%y == 0: return y return gcd(y, x%y) print("Enter the two numbers: ") a, b = int(input()), int(input()) print(gcd(a,b))

simple_intrest.py

Python
3 years ago
def simple_intrest(principle, rate , time): intrest = (principle * rate * time )/100 return intrest principle = float(input("Enter the intrest amount: ")) time = float(input("Enter tje time in year: ")) senior = input("Are you a senior

minute

Python
3 years ago
def convert_time(hrs, min): min= hrs*60+min return min h=int(input("Enter the hours:")) m=int(input("Enter the minutes:")) m=convert_time(h,m) print("Total Minutes=",m)

iiikiik

Python
3 years ago
def even_odd(num): if num % 2== 0: return True else: return False num = int(input("Enter the number: ")) if even_odd(num): print("Even")

avg.py

Python
3 years ago
def avg(a, b): return (a+b)/2 a = int(input("Enter 1st num: ")) b = int(input("Enter 2nd num: ")) c = avg(a, b) print(c)

swap

Python
3 years ago
def swap(a, b): temp = a a = b b = temp return a, b a = int(input("Enter first number: ")) b = int(input("Enter the second number: ")) a, b = swap(a, b)

Cgheck_equal

Python
3 years ago
def equal(a,b): if a == b: return True else: return False a = int(input("Enter the first number: ")) b = int(input("Enter the second number: "))

calander

Python
3 years ago
import calendar # Ask the user to enter the year and month year = int(input("Enter year: ")) month = int(input("Enter month: ")) # Create an instance of TextCalendar class with Sunday as the first day cal = calendar.TextCalendar(calendar.SU

square

Python
3 years ago
# Define a function that takes an argument n def summation(n): # Initialize a variable to store the sum sum = 0 # Use a for loop to iterate from 1 to n for i in range(1, n+1): # Check if i is an even number using modulo operator (%

sum of cubes

Python
3 years ago
# Using a for loop to calculate sum of cubes of numbers from 1 to n n = int(input("Enter the value of n: ")) # Get the value of n from user input and convert it to integer sum = 0 # Initialize sum as zero for i in range(1,n+1): # Loop fro

pow

Python
3 years ago
# Using a for loop to calculate pow(x,n) x = int(input("Enter the value of x: ")) # Get the value of x from user input and convert it to integer n = int(input("Enter the value of n: ")) # Get the value of n from user input and convert it to inte