0% found this document useful (0 votes)
13 views2 pages

Journal Ques

The document outlines a series of Python programming tasks, including file operations, exception handling, graphical drawing, and creating various applications such as a calculator and a calorie counter. It also includes database-related tasks for creating and inserting data into tables. Each task is designed to enhance programming skills in Python and application development.

Uploaded by

xxxjack2018
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Journal Ques

The document outlines a series of Python programming tasks, including file operations, exception handling, graphical drawing, and creating various applications such as a calculator and a calorie counter. It also includes database-related tasks for creating and inserting data into tables. Each task is designed to enhance programming skills in Python and application development.

Uploaded by

xxxjack2018
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Program for Python Journals

Q1) Write a program in Python to create a file "data.txt" and write 5 lines to it.

Q2) Write a program in Python to read the contents of "data.txt" and display them.

Q3) Write a program in Python to copy the contents of "data1.txt" to another file "data2.txt"

Q4) Write a program in Python to raise an “Invalid Marks Exception”

Q5) Write a program in Python to raise an “Invalid Colour Exception”

Q6) Write a program in Python to create a figure which consist of rectangle, a circle, an arc and
line it..

Q7) Write a Python Program to draw the following figures:

i) House

ii) Sun

iii) Smiley

iv) Indian Flag

v) Fish

Q8) Write a program to draw a Mickey Mouse face.

Q9) Write a program in Python to create project to calculate the Area of Rectangle, Perimeter and
Clear button.

Q10) Write a program in Python to create project to calculate the Simple Interest.

Q11) Write a program in Python to create a Simple Calculator using Tkinter

Q12) Write a program in Python to create project which includes label of name, mobile no, Email
Id, a radio for gender and spinbox for age.

Q13) Create a project calorie counter. Your project intakes the amount of proteins, carbohydrates
and fats in a given food item and calculate the amount of calories present in it.

a) 1 gm carbohydrate is 4 cal
b) 1 gm fat is 9 cal
c) 1 gm protein

Your project should have a button next item which would clear the contents of text boxes.

Q14) Create a project for Reshma Beauty Parlor. Include checkboxes for the following services.

a) Hair Styling
b) Manicure & Pedicure
c) Complete Makeover

The charges are fixed for the above services as Rs.200, Rs.300, Rs.400 respectively. Declare
them as constants. She has distributed discount coupons per 5% and 10% to boost her
business. Your Project should display total charges, discount if any, and final amount to be
paid. Include a command button to clear the fields.

Q15) Create an application for an Hiring Agency.

Candidate has to fill his name, age , mobile number=> Text Fields

Course=> B.Sc.(CS)/ B.Sc.(IT)/ B.E.=>Radio Button

Marks in SSC, HSC, FY, SY=> Text Fields

In order to be eligible, candidate has to have more that 60% marks in SSC & HSC and average
55% marks and above in FY/SY

In a Label display whether candidate is eligible or not.

if(ssc_marks>=60 and hsc_marks>=60 and (fy_marks+ sy_marks)/2=55)

Q16) Write a program in Python to create a table cust(custid*,custname,custmob) in customer


database.

Q17) Write a program to create a table student(rollno*, sname , sclass) in the fycs database of
MySQL.

Write a program to insert one row in the student table.

You might also like