diff --git a/Day-01/test-01 b/Day-01/test-01 new file mode 100644 index 00000000..06664059 --- /dev/null +++ b/Day-01/test-01 @@ -0,0 +1,6 @@ +a = "hello" +b = "world" + +print (a,b) +print (a + b) +print (a == b) \ No newline at end of file diff --git a/Day-02/examples/01-string-concat.py b/Day-02/examples/01-string-concat.py index ebcf47ee..12f412e5 100644 --- a/Day-02/examples/01-string-concat.py +++ b/Day-02/examples/01-string-concat.py @@ -1,4 +1,5 @@ str1 = "Hello" str2 = "World" -result = str1 + " " + str2 +result = str1 + " This is " + str2 print(result) +print (str1 + result + str2) \ No newline at end of file diff --git a/Day-02/examples/01-string-replace.py b/Day-02/examples/01-string-replace.py index d6d08f5a..c27faa0d 100644 --- a/Day-02/examples/01-string-replace.py +++ b/Day-02/examples/01-string-replace.py @@ -1,3 +1,7 @@ text = "Python is awesome" new_text = text.replace("awesome", "great") print("Modified text:", new_text) + +name = "The kind people always great" +modified_name = name.replace("kind","gentle") +print("text:",modified_name) \ No newline at end of file diff --git a/Day-02/examples/01-string-split.py b/Day-02/examples/01-string-split.py index 3a61b5d4..ca9acce1 100644 --- a/Day-02/examples/01-string-split.py +++ b/Day-02/examples/01-string-split.py @@ -1,3 +1,7 @@ text = "Python is awesome" words = text.split() print("Words:", words) + +name = "he is kanchu" +new_name = text.split() +print(new_name) \ No newline at end of file diff --git a/Day-02/examples/03-regex-findall.py b/Day-02/examples/03-regex-findall.py index ec5cdd5c..79490c3b 100644 --- a/Day-02/examples/03-regex-findall.py +++ b/Day-02/examples/03-regex-findall.py @@ -8,3 +8,4 @@ print("Pattern found:", search.group()) else: print("Pattern not found") + \ No newline at end of file diff --git a/Day-02/examples/03-regex-match.py b/Day-02/examples/03-regex-match.py index b3aafdd1..60ce5612 100644 --- a/Day-02/examples/03-regex-match.py +++ b/Day-02/examples/03-regex-match.py @@ -8,3 +8,15 @@ print("Match found:", match.group()) else: print("No match") + + +import re # i prefer coffee than tea + +text = "The quick brown fox" +pattern = r"brown" + +search = re.search(pattern, text) +if search: + print("searc found:", search.group()) +else: + print("No no match") \ No newline at end of file diff --git a/Day-02/examples/test-examples/all_string.py b/Day-02/examples/test-examples/all_string.py new file mode 100644 index 00000000..785ec0ac --- /dev/null +++ b/Day-02/examples/test-examples/all_string.py @@ -0,0 +1,32 @@ +str1 = "ram" +str2 = "vijay" +result = (str1 + str2) # string concatination + +life = "always be happy" +length = len(life) #length of the charactors + +my_name ="Aravind from Vizag" +lowercase = my_name.lower() +uppercase = my_name.upper() # uppercase or lowercase + + +a = " Iam a maharaj" +b = " that is sivaji " +change = a.replace("maharaj", "king") #replacing the character +modifying = b.split() # spliting the character + + +info = "I am here" +substring = "I" +if substring in info: + print(substring,"am available") # substring + +print("changed",modifying) +print("modified", change) +print("Lowercase", lowercase) +print("uppercase", uppercase) +print("lenght of the character ", length) +print(result) + + + diff --git a/Day-02/examples/test-examples/conc.py b/Day-02/examples/test-examples/conc.py new file mode 100644 index 00000000..07d63960 --- /dev/null +++ b/Day-02/examples/test-examples/conc.py @@ -0,0 +1,4 @@ +str1 = " raja" +str2 = "rani" +result = str1 + " " + str2 +print (result) \ No newline at end of file diff --git a/Day-02/examples/test-examples/float.py b/Day-02/examples/test-examples/float.py new file mode 100644 index 00000000..7f4188f4 --- /dev/null +++ b/Day-02/examples/test-examples/float.py @@ -0,0 +1,16 @@ +number1 = 3.5 +number2 = 1.5 +result1 = (number1+number2) +print ("addition:",result1) + +result2 = (number1-number2) +print("subtraction:",result2) + +result3 = (number1*number2) +print("multiplicatio:",result3) + +result4 = number1 / number2 +print("division:",result4) + +result5 = round(3.143623433, 4) # Rounds to 2 decimal places +print("Rounded:", result5) \ No newline at end of file diff --git a/Day-02/examples/test-examples/int.py b/Day-02/examples/test-examples/int.py new file mode 100644 index 00000000..6c196b59 --- /dev/null +++ b/Day-02/examples/test-examples/int.py @@ -0,0 +1,11 @@ +a = 1 +b = 2 +result1 = a // b +print("integrer division:", result1) + +result2 = a % b +print("Modulus (Remainder):", result2) + +# Absolute Value +result3 = abs(-7) +print("Absolute Value:", result3) \ No newline at end of file diff --git a/Day-02/examples/test-examples/len.py b/Day-02/examples/test-examples/len.py new file mode 100644 index 00000000..2e7b0706 --- /dev/null +++ b/Day-02/examples/test-examples/len.py @@ -0,0 +1,6 @@ +text = "This is the test str len python" +length = len(text) +Name = "Aravind" +length = len(Name) +print ("length of the string is",length) +print ("length of the name of Arvind is",length) \ No newline at end of file diff --git a/Day-02/examples/test-examples/regex.py b/Day-02/examples/test-examples/regex.py new file mode 100644 index 00000000..9b6236d9 --- /dev/null +++ b/Day-02/examples/test-examples/regex.py @@ -0,0 +1,10 @@ +import re + +text = " she is good" +pattern = r"good" + +match = re.match(pattern, text) +if match: + print("match found:", match.group()) +else: + print("no matched") \ No newline at end of file diff --git a/Day-02/examples/test-examples/regex_match.py b/Day-02/examples/test-examples/regex_match.py new file mode 100644 index 00000000..c4b573c9 --- /dev/null +++ b/Day-02/examples/test-examples/regex_match.py @@ -0,0 +1,10 @@ +import re + +text = "the climate is cool" +pattern = r"climate" + +match = re.match(pattern, text) +if match: + print("match found:",match.group()) +else: + print("no match") \ No newline at end of file diff --git a/Day-02/examples/test-examples/regex_replace.py b/Day-02/examples/test-examples/regex_replace.py new file mode 100644 index 00000000..49fd4eab --- /dev/null +++ b/Day-02/examples/test-examples/regex_replace.py @@ -0,0 +1,9 @@ +import re + +text = "they have many cars in their garage" +pattern = r"garage" + +replacement = "house" + +new_text = re.sub(pattern, replacement, text) +print ("modified text:", new_text) \ No newline at end of file diff --git a/Day-02/examples/test-examples/str-lowercase.py b/Day-02/examples/test-examples/str-lowercase.py new file mode 100644 index 00000000..3d40ffa2 --- /dev/null +++ b/Day-02/examples/test-examples/str-lowercase.py @@ -0,0 +1,5 @@ +name = "Veera venakata siva sai reddy" +uppercase = name.upper() +lowercase = name.lower() +print ("Uppercase:", uppercase) +print ("Lowerrcase:", uppercase) \ No newline at end of file diff --git a/Day-02/examples/test-examples/str-replace.py b/Day-02/examples/test-examples/str-replace.py new file mode 100644 index 00000000..ab1d6910 --- /dev/null +++ b/Day-02/examples/test-examples/str-replace.py @@ -0,0 +1,3 @@ +good_quote = "Health is wealth" +new_quote = good_quote.replace("Health","Money") +print("modified quote:",new_quote) \ No newline at end of file diff --git a/Day-02/examples/test-examples/str-split.py b/Day-02/examples/test-examples/str-split.py new file mode 100644 index 00000000..d4781613 --- /dev/null +++ b/Day-02/examples/test-examples/str-split.py @@ -0,0 +1,3 @@ +birds = "Paraot is in green colour" +separation = birds.split() +print(separation) \ No newline at end of file diff --git a/Day-02/examples/test-examples/substring.py b/Day-02/examples/test-examples/substring.py new file mode 100644 index 00000000..c77d30b9 --- /dev/null +++ b/Day-02/examples/test-examples/substring.py @@ -0,0 +1,9 @@ +text = "Java is best programming language" +substring = "best" +if substring in text: + print(substring,"found in the text") + +main = " Arjun is theif" +substring = " theif" +if substring in main: + print(substring,"found in the underground") \ No newline at end of file diff --git a/Day-03/test_example.py b/Day-03/test_example.py new file mode 100644 index 00000000..181a4c48 --- /dev/null +++ b/Day-03/test_example.py @@ -0,0 +1,19 @@ + + +server_name = "my_server" +port = 443 +is_https_enabled = False +max_connections = 1000 +# Print the configuration +print(f"Server Name: {server_name}") +print(f"Port: {port}") +print(f"HTTPS Enabled: {is_https_enabled}") +print(f"Max Connections: {max_connections}") + +# Update configuration values +port = 443 +is_https_enabled = False + +# Print the updated configuration +print(f"Updated Port: {port}") +print(f"Updated HTTPS Enabled: {is_https_enabled}") \ No newline at end of file diff --git a/Day-04/test.py b/Day-04/test.py new file mode 100644 index 00000000..598894d8 --- /dev/null +++ b/Day-04/test.py @@ -0,0 +1,10 @@ +def sqaure(x): + return x ** 2 + +pi = 3.124344 + +import my_module + +result = my_module.square(5) +print(result) +print(my_module.pi) \ No newline at end of file diff --git a/Day-06/01-Notes/test.py b/Day-06/01-Notes/test.py new file mode 100644 index 00000000..6168bbcc --- /dev/null +++ b/Day-06/01-Notes/test.py @@ -0,0 +1,10 @@ +raju = 10 +rani = 25 +result = raju+rani +print(result) + +num1 = 99 +num2 = 99 +result = num1+raju +result2 = rani-num2 +print(result, result2) \ No newline at end of file diff --git a/Day-06/test.py b/Day-06/test.py new file mode 100644 index 00000000..1ec31121 --- /dev/null +++ b/Day-06/test.py @@ -0,0 +1,29 @@ +a = 10 +b = 20 +sum_result1 = (a+b) +difference_result2 = (a-b) +product_result3 = (a*b) +quotient_result4 = (a//b) + +print("sum:",sum_result1, "difference:", difference_result2, product_result3, quotient_result4) + +a = 10 +b = 20 + +less_than = (a <=b) +greater_than_or_equal = (a >= b) +greater_and_less_than = (a > b), (a < b) +equal_not_equal = (a == b), (a := b), (a != b) + +print (less_than, greater_than_or_equal, greater_and_less_than, equal_not_equal) + + +# x = 5 +# y = 6 +# result9 = ( x and y), (x or y), (x > y) +# print(result9) + +# total = 10 +# result.total() +# print(total) + diff --git a/Day-07/test.py b/Day-07/test.py new file mode 100644 index 00000000..915449c0 --- /dev/null +++ b/Day-07/test.py @@ -0,0 +1,7 @@ +x = 10 +if x > 15: + print("x is greater than 10") +elif x > 5: + print("x is greater than 5 but not greater than 10") +else: + print("x is not greater than 5") \ No newline at end of file diff --git a/Day-08/02-Assigment/test.py b/Day-08/02-Assigment/test.py new file mode 100644 index 00000000..2504b55c --- /dev/null +++ b/Day-08/02-Assigment/test.py @@ -0,0 +1,14 @@ +#1 +s3_buckets = ["bucket-01", "bucket-02","bucket-03"] + +print(s3_buckets) +#2 +servers = ("bucket-01", "bucket-02","bucket-03","bucket-03") +first_server = servers[1] + +print(type(first_server),first_server[2]) +#3 + +servers_list = ["web-server-01","web-server-02","web-server-03"] +servers_list.remove("web-server-02") +print(servers_list) \ No newline at end of file diff --git a/Day-09/test.py b/Day-09/test.py new file mode 100644 index 00000000..2daa5907 --- /dev/null +++ b/Day-09/test.py @@ -0,0 +1,50 @@ +# for loop example +fruits = ["apple","banana","cherry"] +for fru in fruits: + print(fru) + +# while loop example +count = 0 +while count < 3: + print(count) + count+=1 + +# loop control statements(break) +students_in_room = [1,2,3, 4,5] +for number in students_in_room: + if number ==3: + break + print(number) + +# loop control statements(continue) +numbers = [1,2,3,4,5] +for number in numbers: + if number ==3: + continue + print(number) + +# Automation log file analysis + +log_file = [ + "INFO: Operation successful", + "ERROR: File not found", + "DEBUG: Connection established", + "ERROR: Database Connection failed", +] +for line in log_file: + if "ERROR" in line: + print(line) + +# for Loops +# servers=("server1" "server2" "server3") +# for server in "${servers[@]}": +# configure_monitoring_agent "$server" +# done + +# servers=("server1" "server2" "server3") +# for server in "${servers[@]}": +# configure_monitoring_agent "$servers" +# done + +# **Deploying Configurations to Multiple Environments:** +