PYTHON AND SQL
PYTHON AND SQL
Class : 11th A
ROLL NO. : 21
T. SIGN.
ACKNOWLWDGEMENT
PYTHON:-
1. Write a program to input a wecome message and print it .
2. Program to obtain three numbers and their sum .
3. Program to obtain length and breadth of a rectangle and calculate
its area .
4. Program to calculate BMI (Body Mass Index) of a person.
5. Write aprogram to input a number and print its cube.
6. Write a program to input a value in kilometres and convert it into
miles .
7. Write a program to input value in tonnes and convert it into
quintals and kilograms .
8. Write a program to enter a small poem verse and print it.
9. Write a program to input two numbers and swap them.
10. Write a program to input three numbers and swap them as
this:1st number becomes the second one ,2nd becomes the 3rd
number and 3rd becomes the 1st number.
11. Write a program and print its output.
12. Write a program by using the given information and predict
its output.
13. Predict the output of following code.
14. What will be the output of following code.
15. Predict the output of given command
➢ Write SQL commands to check if a database by the name
newdb exits on MYSQL . If not then create a new database by
its name .
▪
Python programs
➢ Write a program to input a wecome message and
print it .
Run:
Run:
• Program to obtain length and breadth of a rectangle
and calculate its area .
Run:
Run:
• Write a program to input a number and print its
cube.
Run:
Run:
• Write a program to input value in tonnes and
convert it into quintals and kilograms .
Run:
Run:
• Write a program to input two numbers and swap
them.
Run:
Run:
• Write a program and print its output.
Run:
Run:
• Predict the output of following code:
Run:
• What will be the output of following code:
Run:
• Predict the output:
Run:
Bibliography
• www.youtube.com
• www.ggeksforgeeks.com
• www.pythom.org
• www.wikipedia.com
• www.w3schools.com
• www.codecadamy.com
• www.mysql.com
---------------------------END-------------------------