Python 1 - Simple Calculator
num1=float(input('Enter first number: '))
num2=float(input('Enter second number: '))
print('Addition =',num1+num2)
print('Subtraction =',num1-num2)
print('Multiplication =',num1*num2)
if num2!=0:
print('Division =',num1/num2)
else:
print('Division not possible')
Python 2 - Random Number
import random
print([Link](1,100))
Python 3 - Guessing Game
import random
secret=[Link](1,10)
guess=int(input('Guess: '))
if guess==secret:
print('Correct!')
else:
print('Wrong! Secret=',secret)
Python 4 - Fibonacci
n=int(input('Terms: '))
a,b=0,1
for i in range(n):
print(a,end=' ')
a,b=b,a+b
Python 5 - Average
name=input('Name: ')
m1=float(input())
m2=float(input())
m3=float(input())
m4=float(input())
m5=float(input())
print('Average=',(m1+m2+m3+m4+m5)/5)
MySQL
SHOW DATABASES;
CREATE DATABASE management;
USE management;
CREATE TABLE Employee(Employee_ID INT PRIMARY KEY, First_Name
VARCHAR(30), Last_Name VARCHAR(30), Age INT, Department VARCHAR(30), City
VARCHAR(30));
-- Insert the 10 records from the worksheet
SELECT * FROM Employee;
SELECT COUNT(*) FROM Employee;
RENAME TABLE Employee TO Staff;