-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_python_toolbox.py
More file actions
75 lines (58 loc) · 2.01 KB
/
Copy pathsimple_python_toolbox.py
File metadata and controls
75 lines (58 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Importing all functions from functions module.
from functions import *
from art import logo
"""
# Project: Simple Python Toolbox Version 2
# Description:
This is my first project, which I have updated after enhancing my skills. The program serves as a versatile toolbox to
perform everyday tasks such as:
- Checking the length of a password
- Performing basic calculations with a simple calculator
- Counting words in a given sentence
- Converting temperatures between Celsius and Fahrenheit
The program provides an interactive menu where users can select the task they want to perform, and it delivers results
based on their choice. This toolbox is designed to simplify small yet common tasks in a single, user-friendly
application.
# Level: Intermediate
Author: Pranjal Sarnaik
Date: 2024-12-01
"""
# Starting Program and welcome greeting
border = ('-' * 40)
print(border)
print("Welcome to the Simple Python Toolbox")
print(f"{border}\n")
# Asking user to enter their name and age
name = input("Please enter your name:\n")
age = input("Please enter your age:\n")
# print(f"Hello {name}! your age is {age}")
print(f"\n{border}\n")
while True:
print(f"Hello {name} welcome to:")
print(logo)
# Asking user to choose a task to do
task = (input("""Please tell us what task you wanted to do, type short form of task.
1. Password Length Checker: PLC
2. Simple Calculator: SC
3. Word Counter: WC
4. Temperature Converter: TC
Choose 'Q' to quit the program.
""")).upper()
print(f"You choose {task}")
print(f"\n{border}\n")
if task == 'Q':
break
if task == 'PLC':
password_length_checker()
elif task == 'SC':
calculator()
elif task == 'WC':
word_counter()
elif task == 'TC':
temperature_converter()
else:
print("Please enter valid input ('PLC', 'SC', 'WC', 'TC')")
print(f"\n{border}\n")
continue
print("End of the program.")
print(f"Hello {name}, Thanks for using Simple Python Toolbox!")