-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddTwoNumbers.py
33 lines (31 loc) · 993 Bytes
/
AddTwoNumbers.py
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
# ================= Problem Description =================
# This script prompts the user to enter two numerical values (integers or floating-point numbers).
# It calculates and displays the sum of these values.
#
# 1. Displays a welcome message.
# 2. Prompts for and reads two numerical inputs.
# 3. Computes and displays their sum.
#
# ================= Input =================
# - Two numerical values (integers or floating-point).
#
# ================= Output =================
# - The sum of the two input values.
#
# Example:
# Input:
# 5
# 7.5
#
# Output:
# Sum of the given two numbers: 12.5
# =========================================================
# ============= Solution 01 =============
# num1 = 10
# num2 = 20
# print("Sum of given two numbers:", num1 + num2)
# ============= Solution 02 =============
print("Welcome to TowSome program")
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
print("Sum of given two numbers:", num1 + num2)