From a0f9d0d9c5d35ff0dc8a2797ac2a0205c27d97a5 Mon Sep 17 00:00:00 2001 From: Ali Alshehri Date: Tue, 17 Feb 2026 22:53:37 +0300 Subject: [PATCH 1/3] add py file --- cashier.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 cashier.py diff --git a/cashier.py b/cashier.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/cashier.py @@ -0,0 +1 @@ + From 933cb70a16d2abdaa6bb146205aff93c276b1a1d Mon Sep 17 00:00:00 2001 From: Ali Alshehri Date: Tue, 17 Feb 2026 23:27:10 +0300 Subject: [PATCH 2/3] writing a code for a cashier --- cashier.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/cashier.py b/cashier.py index 8b13789..1b48e26 100644 --- a/cashier.py +++ b/cashier.py @@ -1 +1,30 @@ +price=float(input("Enter the price: ")) +quantity=int(input("Enter the quantity: ")) + +tax_rate=0.075 + +subtotal= price*quantity + +#print(subtotal) + +tax=tax_rate*subtotal + +total=subtotal+tax + +print() + + +print("price of item: ${}".format(price)) + +print("Quantity: ",quantity) + +print("Tax rate: %{}".format(tax_rate*100)) + + +print() + + +print(f"Subtotal: ${subtotal:.2f}") +print(f"Tax: ${tax:.2f}") +print(f"Total: ${total:.2f}") From 8eacefbbb5fd04b414617c49ed5dcc5872edd500 Mon Sep 17 00:00:00 2001 From: Ali Alshehri Date: Tue, 17 Feb 2026 23:51:47 +0300 Subject: [PATCH 3/3] finish of acting with string method in this task --- act_with_string.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 act_with_string.py diff --git a/act_with_string.py b/act_with_string.py new file mode 100644 index 0000000..c57170b --- /dev/null +++ b/act_with_string.py @@ -0,0 +1,17 @@ +sentence="Tuwaiq Academy is one of the best academies in KSA, it is Tuwaiq sir" + +word="Tuwaiq" + +print(len(sentence)) + +print(sentence.find("is")) + +print(sentence.count(word)) + +print(sentence.upper()) + +print(sentence.lower()) + +print(sentence.replace("KSA","World")) + +print("The last char in sentence is ",sentence[-1])