Python assignments

M.Sc Python Programming Assignment 1

M.Sc Python Programming Assignments Assignment 1 Question: Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old. Code: import datetime def calculate_year_of_turning_100(age): current_year = datetime.datetime.now().year year_of_turning_100 = current_year + (100 – age) …

M.Sc Python Programming Assignment 1 Read More »

Programming Assignments:TY B.sc(computer application)

TY B.sc(computer application) Control Statements and Loops 1) Write a Python Program to Check if a Number is Positive, Negative or Zero def check_number(num): if num > 0: print(“The number is positive.”) elif num < 0: print(“The number is negative.”) else: print(“The number is zero.”) # Test the program with different numbers check_number(10) # Output: …

Programming Assignments:TY B.sc(computer application) Read More »

SE Computer Engineering Practical 20 solution

SE Computer Engineering Practical 20 solution Question: Write python program to store 10th class percentage of students in array. Write function for sorting array of floating point numbers in ascending order using radix sort and display top five scores Code: Output: Before Radix Sort: [89.5, 56.0, 85.75, 76.2, 93.5, 87.8, 60.25, 48.0, 94.1, 80.9] After …

SE Computer Engineering Practical 20 solution Read More »

SE Computer Engineering Practical 18 solution

SE Computer Engineering Practical 18 solution Question: Write a python program to store names and mobile numbers of your friends in sorted order on names. Search your friend from list using binary search (recursive and nonrecursive). Insert friend if not present in phonebook Code: Output: Enter the details of your friends: Name (or ‘exit’ to …

SE Computer Engineering Practical 18 solution Read More »

SE Computer Engineering Practical 14 solution

SE Computer Engineering Practical 14 solution Question: Write a python program to store 12’th class percentage of students in array. Write function for sorting array of floating point numbers in ascending order using bucket sort and display top five scores Code: Output: ——————–MENU——————– 1. Accept the Percentage of Students 2. Display the Percentages of Students …

SE Computer Engineering Practical 14 solution Read More »

SE Computer Engineering Practical 13 solution

SE Computer Engineering Practical 13 solution Question: Write a python program to store first year percentage of students in array. Write function for sorting array of floating point numbers in ascending order using quick sort and display top five scores. Code: Output: ——————–MENU——————– 1. Accept the Percentage of Students 2. Display the Percentages of Students …

SE Computer Engineering Practical 13 solution Read More »

Tech Amplifier Final Logo