Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 989a935

Browse files
Quotes Generator
Signed-off-by: pavansai5448 <pavansai5448@gmail.com>
1 parent 3e67658 commit 989a935

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

‎Arbitary Quotes Generator/README.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Arbitary Quotes Generator
2+
3+
## Description
4+
5+
This is a simple random quotes generator that provides a specified number of quotes based on a chosen category. The user can input the number of quotes they want and select a specific category for the quotes.
6+
The Category includes
7+
8+
- Inspirational
9+
- Motivational
10+
- Funny
11+
- Love
12+
- Life
13+
14+
Upon these Categories the user has to choose 1 and give a number which indicates the number of quotes needed to be generated in that category.
15+
16+
## Features
17+
18+
- Generates random quotes based on user input.
19+
- Allows the user to choose a specific category for the quotes.
20+
- Provides the flexibility to specify the number of quotes desired.
21+
22+
## Modules Used
23+
24+
- Random
25+
- Quote
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import random
2+
import quote
3+
4+
def generate_quotes():
5+
print("1. Inspirational")
6+
print("2. Motivational")
7+
print("3. Funny")
8+
print("4. Love")
9+
print("5. Life")
10+
choice = int(input("Enter your choice: "))
11+
if choice == 1:
12+
search_term = "inspirational"
13+
elif choice == 2:
14+
search_term = "motivational"
15+
elif choice == 3:
16+
search_term = "funny"
17+
elif choice == 4:
18+
search_term = "love"
19+
elif choice == 5:
20+
search_term = "life"
21+
else:
22+
print("Invalid choice!")
23+
return
24+
quotes = quote.quote(search_term)
25+
num = int(input("Enter the No. of quotes to generate: "))
26+
for i in range(num):
27+
print(i+1 ,".", random.choice(quotes)['quote'])
28+
29+
30+
generate_quotes()

‎Digital Clock/Clock.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def time():
1818
label.pack(anchor='center')
1919
time()
2020

21-
mainloop()
21+
mainloop()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /