Python Libraries

  1. random

    Question 1 of 4

    • Create a guessing game. Computer has to randomly select a number between 1 to 10 and then ask user to guess it. If user guesses correctly display Congratulations!! You Win else display, You Loose. Number was {num}.
    • Modify this game so that user has three attempt to guess. For incorrect guess, display Incorrect!! Guess higher/lower number depending upon if number guessed by user is lower or higher. If user can't guess in 3 attempt display You Loose. Number was {num}.
    • Create a Rock, Scissor, Paper game. Computer chooses one randomly & ask user for input. Display You Win/Loose depending on game logic. [Ask user if he wants to replay]
    • Create a Hangman game. Ask user for level: Easy, Difficult and Hard. Words for game has to be taken from json file that has words separated on the basis of level. If user is able to guess word in 5 attempt display You Win else You Loose, Word was {word}. [Note: 1st & last letter has to be pre-filled and there should be short description as hint for each word].
  2. mailerpy, os

    Question 2 of 4

    • Write a function shuffle_for_flash_game that takes num_of_player as input and return shuffled cards in form [{"p1": [c_1, c_2, c_3]}, …. {"pn": [c4, c5, c6]}]
    • Marketing team has a csv of user eligible in lucky draw. It has headers Name, Number, Email, Address. You need to create program that randomly selects three luck winner & send mail to them as: Congratulation!! {Name}. You won. [Create csv file yourself]
    • Create a folder all_doc. Inside it create multiple python and doc files manually. Write a program that separates python and doc files into two different folder python_files and doc_files respectively. At end display number of files moved to each folder.
    • Create a program that counts and dispays number of exercises done in each course module. Show output as: [{Module: Basics, Exercise: 10, Lines of Code: 100}, {..}]
  3. math, datetime

    Question 3 of 4

    • Find HCF and LCM of list of numbers using math library.
    • Calculate factorial of a number using math library.
    • Assign x_degree = [0, 45, 90, 180] and calculate sin(x), cos(x) and tan(x).
    • Ask user for his/her date of birth:
      1. Calculate and display day of the week he/she was born on. (SUN, MON ..)
      2. Calculate and display his/her current age in years, months and days.
      3. Calculate and display number of days until next birthday.
    • Create a program that takes two dates as input and calculates difference between them in terms of years.
  4. data related

    Question 4 of 4

    • Scrape share data from website and store in csv. Name of csv has to be date of data. E.g. 2026-04-01.csv. Email scrapped csv file to [email protected] with subject Share Data for {date} and body data scrapped from {url}. Keep yourself in cc
    • Load above data as pandas datframe. Filter company that has LTP betwen 500 - 5000.
    • Load scrapped data and plot scatter plot of LTP and Volume