/codewayy_python_series-1

All the tasks from codewayy_python_series will be uploaded here.

Primary LanguagePython

Task 1:

  1. A program in Python which would include some code working with integers and float variables.
  2. A program in Python in which you should display your following details: a) Full Name (String concatenation should be used) b) College name with address (Use string concatenation) c) Initialize marks of 5 different subjects with good variable names. d) Calculate and display the total marks, percentage.

Task 2:

  1. A program in Python which demonstrates the use of lists, sets, tuples, dictionaries,
  2. Question Answers

Task 3:

  1. A program in Python for calculating and printing details(full name, total marks, percentage, grade) of a student using functions.
  2. A program in Python to calculate the length of two strings by concatenating them.
  3. A program in Python to print all the numbers from 1 to 10 except 3 and 7 using for and while loops.

Task 4:

  1. A program in Python to print all the prime numbers in n*n matrix.
  2. A program in Python which imports files as modules. The modules contain user defined list functions, string functions and logical operator functions.

Task 5:

  1. A program in Python which makes use of the Python error handling, your program should include try, catch, and raise keyword.
  2. A program in Python which makes use of the different match functions(min 3) and the sort function for list, tuples, sets etc.
  3. A program in Python to read a text file and print it’s content.
  4. A program in Python which should take a string of 3-4 lines and write it to a txt file.

Task 6:

  1. A function for checking the speed of drivers. This function should have one parameter: speed. If speed is less than 70, it should print “Ok”. Otherwise, for every 5km above the speed limit (70), it should give the driver one demerit point and print the total number of demerit points. For example, if the speed is 80, it should print: “Points: 2”. If the driver gets more than 12 points, the function should print: “License suspended”
  2. A Python program to remove an empty tuple(s) from a list of tuples. Sample data: [(),(), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')] Expected output: [('',), ('a', 'b'), ('a', 'b', 'c'), 'd']
  3. A Python function that accepts a string and calculate the number of upper case letters and lower case letters.
  4. Find all occurrences of “at” in given string ignoring the case(take string as input from user.)
  5. Create a function to count number of words in a sentence (Take input from user)
  6. A positive integer, n, is said to be perfect if the sum of its proper divisors equals the number itself. (Proper divisors include 1 but not the number itself.) If this sum is less than n, the number is deficient, and if the sum is greater than n, the number is abundant. Use the function name and the argument as: def findType (n): The Function should return 1 if the given integer is a deficient number, return 0 if it is a perfect number and return -1 if it is a abundant number.
  7. A function named check_marks. This method checks whether the marks is greater than or equal to 90 and if it is greater than or equal to 90, the method returns true. If the marks are less than 90, a custom Exception named NotEligibleException is raised and an appropriate message as shown in the sample output is displayed.

Task 7:

  1. A python program to print student details using class and objects.

Task 8:

  1. A program to help the registrar’s office of the university to prepare the grade reports for the students.