Git Product home page Git Product logo

python-miniprojects-lpu2022's Introduction



Python Mini Projects

An open source repo consisting of all the Python projects



Table of Contents



Thanks to all contributors!



Project-List

Contribute to the projects which are tagged as Need Solution

Project-1

Need Solution

Design a project where as an input student will give a static number (between 1 to 6) and then roll the dice which randomly generate some value between 1 to 6. The winning situation arrives when the given static/fixed number exactly same to the number came after rolling the dice.

User can play the game as many numbers of times he wants until user wants to exit, and whenever winning situation occur some scores must be given to the user, and these scores goes on adding if user play this game multiple number of times. Note: Dice contains face value’s (1 to 6)

Hint: Make use of random.randint() function

(Student is free to decide the input and output layout for this mini project)

Project-2

Need Solution

Create the Rock, Paper and Scissors game with Python, we need to take the user’s choice and then we need to compare it with the computer choice which is taken using the random module in Python from a list of choices, and if the user wins, then the score will increase by 1.

Example:
User: Rock, Paper or Scissors?
CPU: rock
Tie
User: Rock, Paper or Scissors?
CPU: paper
You win! Paper covers Rock
User: Rock, Paper or Scissors?
CPU: scissors
You lose… Rock smashes Scissors
Rock, Paper or Scissors?
End the game
Final Scores:
CPU:1
User:1


Hint: Make use of random module to design the game (Student is free to decide the input and output layout for this mini project)



Project-3

Need Solution

Email Slicer is just a simple tool that will take multiple email address as an input and slice it to produce the username and the domain associated with it. The email must be divided into two strings by using ‘@’ as the separator.

So, user provides n number of email addresses and you have to design a logic to slice the username and the domain out of those email addresses. The domain part must print in capitals. Note: Email addresses must be stored first in some container and then operate the required logic on it.

Example:
[email protected]
[email protected]
after slicing
username :abc and domain: GMAIL.COM
username: xyz and domain: YAHOO.COM
(Student is free to decide the input and output layout for this mini project)


Project 4

Solved

Create a program that takes the length of the password as input and generates a random password of the same length. The strength of the password depends equally on the 4 properties mentioned below. If the password generated randomly following the rules or constraints given below, then that password is treated as good in terms of strength and accepted otherwise ignore that password.

The properties to be followed for a strong password are:

  • At least 12 characters.
  • A mixture of both uppercase and lowercase letters.
  • A mixture of letters and numbers.
  • Inclusion of at least one special character, e.g., @ #?]

Note: do not use < or > in your password, as both can cause problems in Web browsers.
(Student is free to decide the input and output layout for this mini project)

Solution



Project-5

Need Solution

The task is to create a script that generates a random number between a fixed range, and if the user guesses the number right in three chances, then user wins otherwise user lose. This game user can play as many numbers of times and whenever user wins a score is to be given to the user.

At the end the users score must be displayed on the screen. Hint: Make use of random module to design the game

Abstract steps:

  • The user enters the lower and upper bounds of the range. As a result, the compiler generates a random integer between the range and stores it in a variable for future use.
  • A while loop will be created for repetitive guessing.
  • When a user guesses a number that is greater than a randomly selected number, the user receives the message “have one more try”. Your guess was too high.
  • If the user guesses a number smaller than a randomly selected number, the user gets an output of “have one more try “. Your guess was too small”
  • In addition, if the user guesses within a minimum number of attempts, they get a “Congrat’s” message and also get the winning scores.
  • If the user fails to guess the integer in the minimum number of guesses, he/she will receive a “Better Luck Next Time!

(Student is free to decide the input and output layout for this mini project)

Project-6

Need Solution

You need to write a python script that generates an acronym word from a given sentence.

  • Take multiple strings as input in the form of list.
  • Add the first letter of each string to output.
  • Iterate over the complete string and add every next letter to - space to output.
  • Change the output to uppercase (required acronym).
  • You have to generate acronyms for all given strings.

(Student is free to decide the input and output layout for this mini project) Hint: You can use split and indexing to fetch the first word and then combine it.

Project-7

Need Solution

The task is to generate a random story every time user runs the program.

Every time the user runs the program, we must produce a random tale. We'll first store the portions of the tales in distinct lists, and then use the Random module to choose random sections of the stories from those lists:

To construct a random narrative, we first imported the random module, then built sections of the stories in separate lists, then randomly picked portions of the lists.

Note: You store the portion of your tale/story in different lists, and during displaying the story when you pick the portions randomly your complete story must make some sense. (Student is free to decide the input and output layout for this mini project)

Hint:

  • Random module can be used to select random parts of the story stored in different lists.
  • Sections of the story can be an adjective, a preposition, a proper noun, etc.

Project-8

Need Solution

Your task is to build a currency converter that will allow you to convert currencies from one unit to another, such as converting Indian rupee into pounds, euros, US dollar, Canadian dollar, Chinese yuan, Russia’s Rubal, etc. or vice versa.

In this project build a TUI (Text based user interface), where you will enter the source currency to be converted and conversion rate. And after conversion display the amount in the target currency.

(Student is free to decide the input and output layout for this mini project)



python-miniprojects-lpu2022's People

Contributors

d3faltxd avatar deepsourcebot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.