0% found this document useful (0 votes)
2 views14 pages

Rutuja Python Programming

The document contains a series of Python programs developed by Rutuja Jadhav, each demonstrating different programming concepts such as loops, conditionals, functions, and data structures. Programs include a triangle pattern generator, number type identifier, character type identifier, multiplication table generator, Fibonacci sequence generator, factorial generator, prime number analyzer, simple calculator, interactive guessing game, task list manager, student enrollment manager, and student record keeper. Each program is accompanied by its title, author details, and a brief description of its functionality.

Uploaded by

jabhijeet9274
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)
2 views14 pages

Rutuja Python Programming

The document contains a series of Python programs developed by Rutuja Jadhav, each demonstrating different programming concepts such as loops, conditionals, functions, and data structures. Programs include a triangle pattern generator, number type identifier, character type identifier, multiplication table generator, Fibonacci sequence generator, factorial generator, prime number analyzer, simple calculator, interactive guessing game, task list manager, student enrollment manager, and student record keeper. Each program is accompanied by its title, author details, and a brief description of its functionality.

Uploaded by

jabhijeet9274
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

​ im:Triangle Pattern Generator Using Loops:Write a Python program to print a triangle​

A
​pattern (give any),emphasizing the transition from C to Python syntax.​

​ Program no.3.1​
#
​#Title:Triangle Pattern Generator​
​Using Loops​
​#Name: Rutuja Jadhav​
​#Roll no:-49​
​#Branch :IT​

​rows = 5​

​for i in range(1, rows + 1):​


​for j in range(i):​
​print("*", end=" ")​
​print()​

​Output:-​
​ im:Number Type Identifier*: Develop a Python program that takes a numerical input and​
A
​identifies whether it is even or odd, utilizing conditional statements and loops.​

​ Program no.3.2​
#
​#Title:Number Type Identifier (Even or​
​Odd)​
​#Name:Rutuja Jadhav​
​#Roll no. 49​
​#Branch :IT​

​num = int(input("Enter a number: "))​

​if num % 2 == 0:​


​print("The number is Even")​
​else:​
​print("The number is Odd")​

​Output​​:-​
​ im:Character Type Identifier: Create a Python program to check whether the given input is a​
A
​digit, lowercase character, uppercase character, or a special character using an 'ifelse-if'​
​ladder​
​ Program no.3.3​
#
​#Title:Character Type Identifier​
​#Name:Rutuja Jadhav​
​#Roll no. 49​
​#Branch :IT​

​ch = input("Enter a character: ")​

​if [Link]():​
​print("It is a Digit")​
​elif [Link]():​
​print("It is a Lowercase Character")​
​elif [Link]():​
​print("It is an Uppercase Character")​
​else:​
​print("It is a Special Character")​

​Output:-​
​ im:Multiplication Table Generator: Write a Python program to take a numerical input from​
A
​the user and generate its multiplication table using loops.​

​ Program no.3.4​
#
​#Title:- Multiplication Table Generator​
​#Name:Rutuja Jadhav​
​#Roll no. 49​
​#Branch :IT​

​num = int(input("Enter a number: "))​

​for i in range(1, 11):​


​print(num, "x", i, "=", num * i)​

​Output:-​
​ im:Fibonacci Sequence Generator: Develop a Python program to print the Fibonacci​
A
​sequence using a while loop.​

​ Program no.3.5​
#
​#Title:Fibonacci Sequence​
​Generator(Using While Loop)​
​#Name:Rutuja Jadhav​
​#Roll no..49​
​#Branch :IT​

​n = int(input("Enter number of terms: "))​

​ = 0​
a
​b = 1​
​count = 0​

​while count < n:​


​print(a, end=" ")​
​c = a + b​
​a = b​
​b = c​
​count += 1​

​Output:-​
​ im:Factorial Generator*: Design a Python program to compute the​
A
​factorial of a given integer N.​

​ Program no.3.6​
#
​#Title:Factorial Generator​
​#Name:Rutuja Jadhav​
​#Roll no. 49​
​#Branch :IT​

​num = int(input("Enter a number: "))​

​fact = 1​

​for i in range(1, num + 1):​


​fact = fact * i​

​print("Factorial is:", fact)​

​Output:-​
​ im:Prime Number Analyzer*: Using function, write a Python program to​
A
​analyze the input number is prime or not.​

​ Program no.3.7​
#
​#Title:Prime Number Analyzer (Using Function)​
​#Name:Rutuja Jadhav​
​#Roll no:-49​
​#Branch : IT​

​def check_prime(n):​
​if n <= 1:​
​return False​

​for i in range(2, n):​


​if n % i == 0:​
​return False​

​return True​

​num = int(input("Enter a number: "))​

​if check_prime(num):​
​print("Number is Prime")​
​else:​
​print("Number is Not Prime")​

​Output:-​
​ im:Simple Calculator Using Functions*: Implement a simple Python​
A
​calculator that takes user input and performs basic arithmetic operations​
​(addition, subtraction, multiplication, division) using functions​

​ Program no.3.8​
#
​#Title:Simple Calculator Using Functions​
​#Name:Rutuja Jadhav​
​#Roll no:-49​
​#Branch : IT​

​def add(a, b):​


​return a + b​

​def subtract(a, b):​


​return a - b​

​def multiply(a, b):​


​return a * b​

​def divide(a, b):​


​return a / b​

​ = float(input("Enter first number: "))​


a
​b = float(input("Enter second number: "))​

​ rint("Addition:", add(a, b))​


p
​print("Subtraction:", subtract(a, b))​
​print("Multiplication:", multiply(a, b))​
​print("Division:", divide(a, b))​

​Output:-​
​ im:Interactive Guessing Game: Develop a number guessing game​
A
​where the program generates a random number, and the user has to​
​guess it. Implement loops and conditional statements for user interaction​

​ Program no.3.9​
#
​#Title:Interactive Guessing Game​
​#Name:Rutuja Jadhav​
​#Roll no:-49​
​#Branch : IT​

​import random​

​number = [Link](1, 10)​

​guess = int(input("Guess the number (1-10): "))​

​while guess != number:​


​print("Wrong guess, try again!")​
​guess = int(input("Guess again: "))​

​print("Congratulations! You guessed the correct number.")​

​Output:-​
​ im: Task List Manager*: Develop a Python program to manage a task list​
A
​using lists and tuples, including adding, removing, updating, and sorting tasks.​

​ Program no.2.1​
#
​#Title:Task List Manager (Using Lists and Tuples)​
​#Name:Rutuja Jadhav​
​#Roll no.49​
​#Branch : IT​

​tasks = []​

​while True:​
​print("\n1. Add Task")​
​print("2. Remove Task")​
​print("3. Update Task")​
​print("4. View Tasks")​
​print("5. Sort Tasks")​
​print("6. Exit")​

​choice = input("Enter your choice: ")​

​if choice == '1':​


​task = input("Enter task: ")​
​[Link](task)​
​print("Task added successfully")​

​elif choice == '2':​


​task = input("Enter task to remove: ")​
​if task in tasks:​
​[Link](task)​
​print("Task removed")​
​else:​
​print("Task not found")​

​elif choice == '3':​


​old = input("Enter task to update: ")​
​if old in tasks:​
​new = input("Enter new task: ")​
​index = [Link](old)​
​tasks[index] = new​
​print("Task updated")​
​else:​
​print("Task not found")​

​elif choice == '4':​


​print("Your tasks:", tasks)​

​elif choice == '5':​


​[Link]()​
​print("Tasks sorted")​

​elif choice == '6':​


​print("Exiting program")​
​break​

​else:​
​print("Invalid choice")​

​Output:-​
​ im:Student Enrollment Manager *: Create a Python code to​
A
​demonstrate the use of sets and perform set operations (union,​
​intersection, difference) to manage student enrollments in multiple​
​courses / appearing for multiple entrance exams like CET, JEE, NEET​
​etc.​

​ Program no.2.2​
#
​#Title:Student Enrollment Manager (Using Sets)​
​#Name:Rutuja Jadhav​
​#Roll no:-49​
​#Branch : IT​

c​ et_students = {"Rahul", "Anita", "Karan"}​


​jee_students = {"Anita", "Ravi", "Karan"}​
​neet_students = {"Rahul", "Pooja", "Ravi"}​

​ rint("CET Students:", cet_students)​


p
​print("JEE Students:", jee_students)​
​print("NEET Students:", neet_students)​

​ ll_students = cet_students.union(jee_students, neet_students)​


a
​print("\nStudents appearing for any exam:", all_students)​

​ intersection operation​
#
​common_students = cet_students.intersection(jee_students)​

​print("Students appearing for both CET and JEE:", common_students)​

​ nly_cet = cet_students.difference(jee_students)​
o
​print("Students only in CET:", only_cet)​

​Output:-​
​ im: Student Record Keeper *: Write a Python program to create, update, and manipulate a​
A
​dictionary of student records, including their grades and attendance​

​ Program no.3​
#
​#Title:-Student Record Keeper(Using Dictionary)​
​#Name:Rutuja Jadhav​
​#Roll no:-49​
​#Branch : IT​

​students = {}​

​while True:​
​print("\n1. Add Student Record")​
​print("2. Update Student Record")​
​print("3. Display Records")​
​print("4. Exit")​

​choice = input("Enter your choice: ")​

​if choice == '1':​


​name = input("Enter student name: ")​
​grade = input("Enter grade: ")​
​attendance = input("Enter attendance: ")​
​students[name] = {"Grade": grade, "Attendance": attendance}​
​print("Record added")​

​elif choice == '2':​


​name = input("Enter student name to update: ")​
​if name in students:​
​grade = input("Enter new grade: ")​
​attendance = input("Enter new attendance: ")​
​students[name] = {"Grade": grade, "Attendance": attendance}​
​print("Record updated")​
​else:​
​print("Student not found")​

​elif choice == '3':​


​for name, details in [Link]():​
​print(name, ":", details)​

​elif choice == '4':​


​print("Exiting program")​
​break​

​else:​
​print("Invalid choice")​

​Output:-​

You might also like