Skip to content

Commit 23bc9a7

Browse files
Merge pull request #2 from Mathdallas-code/betterWelcomeMessage
Update distance_calculator.py - Added a better welcome message
2 parents 3b42328 + 31c2e33 commit 23bc9a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

distance_calculator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# Main loop
1414
while True:
15+
print("Welcome to the distance calculator v1.0.1!")
1516
use_program=input("Do you want to calculate the distance between two points? (yes/no): ")
1617
if use_program.lower() == "yes":
1718
pass
@@ -68,4 +69,4 @@
6869

6970
# The calculation
7071
distance = math.sqrt(math.pow(startX - endX, 2) + math.pow(startY - endY, 2))
71-
print(f"The distance between ({startX}, {startY}) and ({endX}, {endY}) is {distance} units.")
72+
print(f"The distance between ({startX}, {startY}) and ({endX}, {endY}) is {distance} units.")

0 commit comments

Comments
 (0)