Posts

100 Networking Questions

Basic Python Programming Write a Python program to reverse a string. (I have also added code for reverse a list) #Reverse a string a="Hello" try:     print(a[::-1])     #Reverse a list     b=[1,'a',"Suchi"]     print(b[::-1])     print(b[2])     c=b[2]     print(c[::-1]) except Exception as e:     print("Error Found"+e) Reasoning: [::-1]  is Python slicing syntax: :  refers to the entire sequence. -1  specifies the step (reverse direction). This avoids using loops, making the program concise and efficient. 2. Implement a function to check if a number is prime. num=23 if num<2:     print("Not Prime") for i in range(2,int(num**0.5)+1):     if num%i==0:         print("Not Prime") print(num," is Prime ") Reasoning: A prime number is only divisible by  1  and itself. Checking divisors up to the square root of  n  reduces time complexity...

-: Networking interview questions :-

1. Here's how the  Wireshark capture  would look during the first-time  ping  from Host A (10.1.1.1) to Host B (10.1.1.2). Since it's the first ping, there will be no pre-existing ARP entries, so you'll see both ARP and ICMP traffic. Packet Breakdown in Wireshark Each step corresponds to a captured packet with its main headers (Ethernet, ARP, IP, ICMP). Below is the packet-by-packet flow: 1. ARP Request Description : Host A (10.1.1.1) broadcasts: "Who has 10.1.1.254? Tell 10.1.1.1." Wireshark Protocol : ARP Packet Details : Ethernet Header : Destination MAC: FF:FF:FF:FF:FF (Broadcast) Source MAC: AA:AA:AA:AA:AA EtherType: 0x0806 (ARP) ARP Header : Operation: 1 (Request) Sender MAC: AA:AA:AA:AA:AA Sender IP: 10.1.1.1 Target MAC: 00:00:00:00:00:00 (unknown) Target IP: 10.1.1.254 2. ARP Reply Description : Router R1 (10.1.1.254) responds: "I am 10.1.1.254, my MAC is R1:1." Wireshark Protocol : ARP Packet Details : Ethernet Header : Destination MAC: AA:AA:AA...
                                                          !!  OM Maa MahaaLakshmi Ashtakam !! Namostute Mahamaye Sreepithe Surapujithe          Sankha Chakra Gada Haste MahaaLakshmi Namostute ||1|| Namaste Garurarudhe Kolashura Bhayankari         Sarba Papa Hare Devi MahaaLakshmi Namostute ||2 || Sarbangya Sarba Barade Sarba Dushta Bhayankari         Sarba Dukhha Hare Devi MahaaLakshmi Namostute ||3|| Siddhi Buddhi Prade Devi Bhukti Mukti Pradaayini         Mantra Murte Sada Devi MahaaLakshmi Namostute ||4|| Adyantarahite Devi Aadishakti Maheshwari         YogaJe Yoga Sambute MahaaLakshmi Namostute ||5|| Stula Sukhma MahaaRoudre MahaaLakshmi M...

Python Interview Programs

Disclaimer – There are always multiple approaches to solve a problem. We have used only one out of those. You can try other logic based on your understanding. Please comment your concern to us, we may help you in your understanding on Python Programming. Allthe programs below are center indented. Please type it while implementing in py. 1.        Write a program to print a string in Python ? Ans –  Strings can be printed using double quotes or single quote. Please refer the below example for trying dfferent variables. a = "Hello World" print a Output : python main.py Hello World The choice between single and double quotes often comes down to convenience, especially when your string contains quotes. For example: If your string contains a single quote, you might use double quotes to avoid escaping: print("It's a beautiful day!") Conversely, if your string contains double quotes, you might use single quotes: print('He said, "Hello!"...