Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Madlibs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!--Please do not remove this part-->
![Star Badge](https://img.shields.io/static/v1?label=%F0%9F%8C%9F&message=If%20Useful&style=style=flat&color=BC4E99)
![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)

# Mad Libs Game


<!--An image is an illustration for your project, the tip here is using your sense of humour as much as you can :D

You can copy paste my markdown photo insert as following:
<p align="center">
<img src="your-source-is-here" width=40% height=40%>
-->

## 🛠️ Description
<!--Remove the below lines and add yours -->
Mad Libs is a phrasal template word game. The player has to enter a set of words to substitute for blanks before knowing the story.

## ⚙️ Languages or Frameworks Used
<!--Remove the below lines and add yours -->
The only module required is random. You can install it using
```pip install random```

## 🌟 How to run
<!--Remove the below lines and add yours -->
It is really simple to run the game. Simple head over to the directory where python file is saved and run the following command:
```python madlibs.py```

## 📺 Demo
![Screenshot_madlibs](https://user-images.githubusercontent.com/68545365/128495675-6f72cc4f-2a0f-4bdc-b1a1-18c60f37cd5d.png)


## 🤖 Author
<!--Remove the below lines and add yours -->
<a href="https://github.com/ShrutiSolani">Shruti Solani
23 changes: 23 additions & 0 deletions Madlibs/madlibs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import random
print("Title : Eat, Drink, And Be Sick")
noun = []
for i in range(4):
n = input("Enter noun : ")
noun.append(n)
plural = []
for i in range(6):
pn = input("Enter plural noun : ")
plural.append(pn)
adjective = []
for i in range(2):
a = input("Enter adjective : ")
adjective.append(a)
adverb = input("Enter adverb : ")
letter = input("Enter any letter : ")
body_part = input("Enter any body part : ")
print("An inspector from the Department of Health and ", random.choice(noun) , " Services paid a surprise visit to our " , random.choice(adjective) , " school cafeteria.")
print("The lunch special, prepared by our " , random.choice(adjective) , "dietician, was spaghetti and " , random.choice(noun) , " balls with a choice of either a " , random.choice(noun) , " salad or French " , random.choice(plural) , ".")
print("The inspector found the meat-" , random.choice(plural) , " to be overcooked and discovered a live " , random.choice(noun) , " in the fries,causing him to have a " + body_part + " ache.")
print("In response, he threw up all over his " , random.choice(plural) , ".")
print("In his report, the inspector " + adverb + " recommended that the school cafeteria serve only nutritious " , random.choice(plural) , " as well as low-calorie " , random.choice(plural) , " and that all of the saturated " , random.choice(plural) , " be eliminated.")
print("He rated the cafeteria a " + letter + "-minus.")
35 changes: 35 additions & 0 deletions Number Guessing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!--Please do not remove this part-->
![Star Badge](https://img.shields.io/static/v1?label=%F0%9F%8C%9F&message=If%20Useful&style=style=flat&color=BC4E99)
![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)

# Number Guessing
<!--An image is an illustration for your project, the tip here is using your sense of humour as much as you can :D

You can copy paste my markdown photo insert as following:
<p align="center">
<img src="your-source-is-here" width=40% height=40%>
-->
![number_guessing](https://user-images.githubusercontent.com/68545365/128492288-5fe26cef-5961-4c93-9908-ee8d69b4dd11.gif)


## 🛠️ Description
<!--Remove the below lines and add yours -->
This is a simple game where you have to guess a computer generated number within 1 to 10. However, you can't guess it all. You have only 4 chances to guess the correct number.

## ⚙️ Languages or Frameworks Used
<!--Remove the below lines and add yours -->
The only python module that is required is random.
You can install it using ```pip install random```

## 🌟 How to run
<!--Remove the below lines and add yours -->
Running the script is really simple! Just open a terminal in the folder where your script is located and run the following command:
```python number_guessing.py```

## 📺 Demo
![Screenshot 2021-08-06 153013](https://user-images.githubusercontent.com/68545365/128493914-936c4140-35ff-4fc6-9b5b-3f5c3f4cdc2a.png)


## 🤖 Author
<!--Remove the below lines and add yours -->
<a href= "https://github.com/ShrutiSolani">Shruti Solani
25 changes: 25 additions & 0 deletions Number Guessing/number_guessing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import random, time
print("Welcome to number guessing game !!!")
time.sleep(2)
#generate a random number
x = random.randint(1, 10)
print("The number is generated!!!")
time.sleep(1)
print("You have 4 chances to guess")
#initialize the counter
count = 4
while count != 0:
a = int(input("Guess the number : "))
#if number guessed is correct, print correct
if a == x:
print("You are right, correct number is ", x)
print("Congratulations! You won")
break
#if guessed number is greater
elif a > x:
print("The number is less than ", a)
#if guessed number is smaller
else:
print("The number is greater than ", a)
#decrease the counter after each guess
count -= 1
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ SR No | Project | Description | Author
9 | [Smart Calculator](https://github.com/ndleah/python-mini-project/tree/main/Smart_Calculator) | A smart calculator using for basic math equations, built by using python. | [Leah Nguyen](https://github.com/ndleah)
10 | [Screenpet](https://github.com/ndleah/python-mini-project/tree/main/Screenpet) | A cute screenpet having different reactions when interact on desktop. | [Leah Nguyen](https://github.com/ndleah)
11 | [Egg Catcher](https://github.com/ndleah/python-mini-project/tree/main/Egg_Catcher) | Egg catcher game built in using Python. | [Leah Nguyen](https://github.com/ndleah)

12 | <a href="https://github.com/ShrutiSolani/python-mini-project/tree/main/Number%20Guessing">Number Guessing | Number Guessing Game | [Shruti Solani](https://github.com/ShrutiSolani)
13 | <a href="https://github.com/ShrutiSolani/python-mini-project/tree/main/Madlibs">Mad Libs | Mad Libs Game | [Shruti Solani](https://github.com/ShrutiSolani)
## ![image](IMG/muscle.svg) Feedback

If you have any feedback or ideas to improve this project, feel free to contact me via
Expand Down