0% found this document useful (0 votes)
108 views16 pages

Industrial Training Report PDF

The document is an industrial training report submitted by Pushkar Jain to the Department of Electronics & Communication Engineering at ABES Engineering College. It details Python programming projects completed during an internship at CodSoft, an IT services company. The projects include a to-do list application, calculator application, password generator, and quiz game. Code snippets are provided for each project to demonstrate how they were programmed in Python.

Uploaded by

Pushkar Jain
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)
108 views16 pages

Industrial Training Report PDF

The document is an industrial training report submitted by Pushkar Jain to the Department of Electronics & Communication Engineering at ABES Engineering College. It details Python programming projects completed during an internship at CodSoft, an IT services company. The projects include a to-do list application, calculator application, password generator, and quiz game. Code snippets are provided for each project to demonstrate how they were programmed in Python.

Uploaded by

Pushkar Jain
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/ 16

INDUSTRIAL TRAINING REPORT

on

“PYTHON PROGRAMMING”
Done at
“CODSOFT”
by

PUSHKAR JAIN (2100320310095)


Submitted to
Department of Electronics & Communication Engineering
in partial fulfilment of the requirements for the Degree of
Bachelor of Technology
in
Electronics & Communication Engineering

ABES Engineering College, Ghaziabad


Dr. A.P.J. Abdul Kalam Technical University, Lucknow
August, 2018

1|Page
2|Page
ACKNOWLEDGEMENT
We, express our sincere thanks to our supervisor, Submitted to: Ms.
MANIDIPA ROY of ECE Department, ABES Engineering College, AKTU
University for guiding us right from the inception till successful
completion of the internship. We would also like to thank our HOD
Prof. (Dr.) Sanjay Kumar Singh for his valuable guidance and
cooperation to decide the topic and its content.
Signature:

Name: Pushkar Jain

ROLL NO. : 2100320310095

3|Page
CONTENTS :
1. FRONT PAGE

2. CERTIFICATE

3.ACKNOWLEDGEMENT

4.PROJECT

5.RESULT

6.CONCLUSION

7.REFRENCES

4|Page
ABOUT COMPANY
CodSoft are IT services and IT consultancy that specializes in
creating innovative solutions for businesses. We are
passionate about technology and believe in the power of
software to transform the world. Our internship program is
just one of the ways in which we are investing in the future of
the industry.
At CodSoft, we believe practical knowledge is the key to
success in the tech industry. Our aim is to help students lacking
basic skills by offering hands-on learning through live projects
and real-world examples. Our team consists of industry experts
who are dedicated to equipping interns with the knowledge
and skills needed to succeed in their careers. We foster an
inclusive and supportive environment that encourages learning,
growth, and creativity.

5|Page
PROJECTS
• TO DO LIST
• CALCULATOR
• PASSWORD GENERATOR
• QUIZ GAME

6|Page
ABOUT PROJECTS
• TO DO LISTS : A To-Do List application is a useful project that helps
users manage and organize their tasks efficiently. This project aims to
create a command-line or GUI-based application using Python, allowing
users to create, update, and track their to-do lists .

• CALCULATOR: Design a simple calculator with basic arithmetic


operations. Prompt the user to input two numbers and an operation
choice. Perform the calculation and display the result.

• PASSWORD GENERATOR: A password generator is a useful tool that


generates strong and random passwords for users. This project aims to
create a password generator application using Python, allowing users to
specify the length and complexity of the password. User Input: Prompt
the user to specify the desired length of the password. Generate
Password: Use a combination of random characters to generate a
password of the specified length. Display the Password: Print the
generated password on the screen .

• QUIZ GAME : Develop a quiz game that asks users multiple-choice or


fill-in-the-blank questions on a specific topic. The game should keep
track of scores, provide feedback on correct/incorrect answers, and offer
a variety of questions to make it challenging and engaging. Load Quiz
Questions. Display Welcome Message and Rules. Present Quiz
Questions: Display each question and answer choice. Prompt the user to
select an answer. Evaluate the User's Answer: Compare the user's
answer with the correct answer. Keep track of the user's score. Provide
Feedback: Display if the answer was correct or incorrect. Show the
correct answer for incorrect responses. Calculate the Final Score. Display
Final Results: Print the user's score and performance message. Play
Again: Ask the user if they want to play again.

7|Page
CODES
TO DO LISTS: class ToDoList:
def __init__(self):
self.tasks = []

def add_task(self, task):


self.tasks.append(task)
print("Task added:", task)

def remove_task(self, task):


if task in self.tasks:
self.tasks.remove(task)
print("Task removed:", task)
else:
print("Task not found:", task)

def show_tasks(self):
if self.tasks:
print("Tasks:")
for index, task in enumerate(self.tasks, start=1):
print(f"{index}. {task}")
else:
print("No tasks in the list.")

def main():
todo_list = ToDoList()

while True:
print("\nSelect an option:")
print("1. Add Task")
print("2. Remove Task")
print("3. Show Tasks")
print("4. Quit")

choice = input("Enter your choice: ")

if choice == "1":
task = input("Enter the task: ")
todo_list.add_task(task)
elif choice == "2":
task = input("Enter the task to remove: ")
todo_list.remove_task(task)
elif choice == "3":
todo_list.show_tasks()
elif choice == "4":
print("Quitting the program.")
break

8|Page
else:
print("Invalid choice. Please select a valid option.")

if __name__ == "__main__":
main()

CALCULATOR: import tkinter as tk


import tkinter.messagebox
from tkinter.constants import SUNKEN
window = tk.Tk()
window.title('Calculator by pushkar')
frame = tk.Frame(master=window, bg="black", padx=10)
frame.pack()
entry = tk.Entry(master=frame, relief=SUNKEN, borderwidth=3, width=30)
entry.grid(row=0, column=0, columnspan=3, ipady=2, pady=2)
def myclick(number):
entry.insert(tk.END, number)
def equal():
try:
y = str(eval(entry.get()))
entry.delete(0, tk.END)
entry.insert(0, y)
except:
tkinter.messagebox.showinfo("Error", "Syntax Error")
def clear():
entry.delete(0, tk.END)
button_1 = tk.Button(master=frame, text='1', padx=15,
pady=5, width=3, command=lambda: myclick(1))
button_1.grid(row=1, column=0, pady=2)
button_2 = tk.Button(master=frame, text='2', padx=15,
pady=5, width=3, command=lambda: myclick(2))
button_2.grid(row=1, column=1, pady=2)
button_3 = tk.Button(master=frame, text='3', padx=15,
pady=5, width=3, command=lambda: myclick(3))
button_3.grid(row=1, column=2, pady=2)
button_4 = tk.Button(master=frame, text='4', padx=15,
pady=5, width=3, command=lambda: myclick(4))
button_4.grid(row=2, column=0, pady=2)
button_5 = tk.Button(master=frame, text='5', padx=15,
pady=5, width=3, command=lambda: myclick(5))
button_5.grid(row=2, column=1, pady=2)
button_6 = tk.Button(master=frame, text='6', padx=15,
pady=5, width=3, command=lambda: myclick(6))
button_6.grid(row=2, column=2, pady=2)
button_7 = tk.Button(master=frame, text='7', padx=15,
pady=5, width=3, command=lambda: myclick(7))

9|Page
button_7.grid(row=3, column=0, pady=2)
button_8 = tk.Button(master=frame, text='8', padx=15,
pady=5, width=3, command=lambda: myclick(8))
button_8.grid(row=3, column=1, pady=2)
button_9 = tk.Button(master=frame, text='9', padx=15,
pady=5, width=3, command=lambda: myclick(9))
button_9.grid(row=3, column=2, pady=2)
button_0 = tk.Button(master=frame, text='0', padx=15,
pady=5, width=3, command=lambda: myclick(0))
button_0.grid(row=4, column=1, pady=2)
button_add = tk.Button(master=frame, text="+", padx=15,
pady=5, width=3, command=lambda: myclick('+'))
button_add.grid(row=5, column=0, pady=2)
button_subtract = tk.Button(
master=frame, text="-", padx=15, pady=5, width=3, command=lambda:
myclick('-'))
button_subtract.grid(row=5, column=1, pady=2)
button_multiply = tk.Button(
master=frame, text="*", padx=15, pady=5, width=3, command=lambda:
myclick('*'))
button_multiply.grid(row=5, column=2, pady=2)
button_div = tk.Button(master=frame, text="/", padx=15,
pady=5, width=3, command=lambda: myclick('/'))
button_div.grid(row=6, column=0, pady=2)
button_clear = tk.Button(master=frame, text="clear",
padx=15, pady=5, width=12, command=clear)
button_clear.grid(row=6, column=1, columnspan=2, pady=2)
button_equal = tk.Button(master=frame, text="=", padx=15,
pady=5, width=9, command=equal)
button_equal.grid(row=7, column=0, columnspan=3, pady=2)
window.mainloop()

PASSWORD GENERATOR : import string


import random
length = int(input("Enter password length: "))

print('''Choose character set for password from these :


1. Digits
2. Letters
3. Special characters
4. Exit''')

characterList = ""

while(True):
choice = int(input("Pick a number "))

10 | P a g e
if(choice == 1):

characterList += string.ascii_letters
elif(choice == 2):

characterList += string.digits
elif(choice == 3):

characterList += string.punctuation
elif(choice == 4):
break
else:
print("Please pick a valid option!")

password = []

for i in range(length):

randomchar = random.choice(characterList)

password.append(randomchar)

print("The random password is " + "".join(password))

QUIZ GAME : import java.util.Scanner;

public class GFG {

// Function that implements the


// number guessing game
public static void guessnumber() {
// Scanner Class
Scanner sc = new Scanner(System.in);

// Generate the numbers


int number = 1 + (int) (100
* Math.random());

// Given K trials
int K = 5;

int i, guess;

System.out.println(
"A number is chosen"
+ " between 1 to 100."

11 | P a g e
+ "Guess the number"
+ " within 5 trials.");

// Iterate over K Trials


for (i = 0; i < K; i++) {

System.out.println(
"Guess the number:");

// Take input for guessing


guess = sc.nextInt();

// If the number is guessed


if (number == guess) {
System.out.println(
"Congratulations!"
+ " You guessed the number.");
break;
} else if (number > guess
&& i != K - 1) {
System.out.println(
"The number is "
+ "greater than " + guess);
} else if (number < guess
&& i != K - 1) {
System.out.println(
"The number is"
+ " less than " + guess);
}
}

if (i == K) {
System.out.println(
"You have exhausted"
+ " K trials.");

System.out.println(
"The number was " + number);
}
}

// Driver Code
public static void main(String arg[]) {

// Function Call
guessnumber();
}
}

12 | P a g e
RESULTS
TO DO LISTS:
Select an option:
1. Add Task
2. Remove Task
3. Show Tasks
4. Quit
Enter your choice: 1
Enter the task: ADD
Task added: ADD

• CALCULATOR:

13 | P a g e
PASSWORD GENERATOR:

Enter password length: 4


Choose character set for password from these :
1. Digits
2. Letters
3. Special characters
4. Exit
Pick a number 1
Pick a number 2
Pick a number 3
Pick a number 4
The random password is eA>7

14 | P a g e
CONCLUSION
Python, it has been mentioned, is an object-oriented programming
language. Of course, that begs the question, "What is object-oriented
programming?" After all, it would be nice to know what it meant to be
object-oriented, in order to understand what that buys you as a
programmer. What are objects, and why are they important to us as
programmers? Although we will not specifically look at Python here, the
basic concepts you will learn in this chapter will apply directly to the next
chapter as we talk about how Python implements all of these concepts.
If you have a good background in object-oriented programming (often
abbreviated OOP), please feel free to skip to the next chapter and learn
how Python does it all.

15 | P a g e
REFRENCES
GEEKS FOR GEEKS
YOU TUBE
PYTHON PROGRAMMIN : RYAN TURNER
GOOGLE
CODSOFT TEAM

16 | P a g e

You might also like