<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nidhi Ashtikar on Medium]]></title>
        <description><![CDATA[Stories by Nidhi Ashtikar on Medium]]></description>
        <link>https://medium.com/@nidhiashtikar?source=rss-848942388a25------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AHtLYsAoEiHzvqZHup5qnQ.jpeg</url>
            <title>Stories by Nidhi Ashtikar on Medium</title>
            <link>https://medium.com/@nidhiashtikar?source=rss-848942388a25------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 23:51:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nidhiashtikar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kubernetes Interview Questions]]></title>
            <link>https://nidhiashtikar.medium.com/kubernetes-interview-questions-fa24327fb5ad?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa24327fb5ad</guid>
            <category><![CDATA[ek]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[pods]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 05:41:31 GMT</pubDate>
            <atom:updated>2026-06-27T06:28:58.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ODHF-l5WfqQca7MT32fu-g.png" /></figure><h3>1️⃣ A Pod is in CrashLoopBackOff. How would you troubleshoot it from start to finish?</h3><p><strong>CrashLoopBackOff</strong> means the container starts, crashes, and Kubernetes continuously restarts it with an increasing delay.</p><h3>Step 1: Check Pod Status</h3><pre>kubectl get pods -n &lt;namespace&gt;<br>kubectl describe pod &lt;pod-name&gt; -n &lt;namespace&gt;</pre><p>Look for:</p><ul><li>Exit Code</li><li>Restart Count</li><li>Events</li><li>OOMKilled</li><li>Probe failures</li></ul><h3>Step 2: Check Logs</h3><pre>kubectl logs &lt;pod-name&gt; -n &lt;namespace&gt;<br>kubectl logs &lt;pod-name&gt; --previous -n &lt;namespace&gt;</pre><p>For multi-container Pods:</p><pre>kubectl logs &lt;pod-name&gt; -c &lt;container-name&gt; --previous</pre><h3>Step 3: Check Events</h3><pre>kubectl get events -n &lt;namespace&gt; --sort-by=.lastTimestamp</pre><h3>Step 4: Verify Configuration</h3><pre>kubectl get pod &lt;pod-name&gt; -o yaml</pre><p>Check:</p><ul><li>Environment Variables</li><li>ConfigMaps</li><li>Secrets</li><li>Image Version</li><li>Commands &amp; Arguments</li><li>Volume Mounts</li></ul><h3>Step 5: Check Resource Usage</h3><pre>kubectl top pod &lt;pod-name&gt;</pre><p>If OOMKilled:</p><ul><li>Increase Memory Limits</li><li>Fix Memory Leak</li></ul><h3>Step 6: Check Health Probes</h3><pre>kubectl describe pod &lt;pod-name&gt;</pre><p>Verify:</p><ul><li>Liveness Probe</li><li>Readiness Probe</li><li>Startup Probe</li><li>Correct Port</li><li>Correct Path</li></ul><h3>Common Causes</h3><ul><li>Application Crash</li><li>Wrong Startup Command</li><li>Missing ConfigMap/Secret</li><li>Incorrect Environment Variables</li><li>OOMKilled</li><li>Failed Health Checks</li><li>Database Connection Failure</li><li>Volume Mount Issues</li><li>Image Pull Issues</li><li>Permission Errors</li></ul><h3>2️⃣ All Pods are Running, but the application is not accessible.</h3><p>Running Pods do not always mean the application is healthy.</p><h3>Step 1: Check Pods</h3><pre>kubectl get pods -o wide</pre><h3>Step 2: Check Service</h3><pre>kubectl get svc<br>kubectl describe svc &lt;service-name&gt;</pre><p>Verify:</p><ul><li>Selector</li><li>Port</li><li>TargetPort</li></ul><h3>Step 3: Check Endpoints</h3><pre>kubectl get endpoints &lt;service-name&gt;</pre><p>If Endpoints are empty:</p><ul><li>Labels don&#39;t match</li><li>Pods aren&#39;t Ready</li></ul><h3>Step 4: Check Ingress</h3><pre>kubectl get ingress<br>kubectl describe ingress &lt;ingress-name&gt;</pre><h3>Step 5: Test From Inside Cluster</h3><pre>kubectl run test --rm -it --image=busybox -- sh<br><br>nslookup &lt;service-name&gt;<br><br>wget -qO- http://&lt;service-name&gt;:&lt;port&gt;</pre><h3>Step 6: Check NetworkPolicy</h3><pre>kubectl get networkpolicy</pre><h3>Step 7: Verify Application</h3><p>Make sure application listens on:</p><pre>0.0.0.0</pre><p>Not:</p><pre>127.0.0.1</pre><h3>3️⃣ A Deployment was updated, and users immediately started reporting issues.</h3><h3>Step 1: Check Rollout Status</h3><pre>kubectl rollout status deployment/&lt;deployment&gt;</pre><h3>Step 2: Check Rollout History</h3><pre>kubectl rollout history deployment/&lt;deployment&gt;</pre><h3>Step 3: Rollback</h3><pre>kubectl rollout undo deployment/&lt;deployment&gt;</pre><p>Rollback to a specific revision:</p><pre>kubectl rollout undo deployment/&lt;deployment&gt; --to-revision=3</pre><h3>Step 4: Verify</h3><pre>kubectl rollout status deployment/&lt;deployment&gt;<br><br>kubectl get pods -w</pre><h3>Production Best Practice</h3><ul><li>Pause rollout if needed</li><li>Rollback immediately</li><li>Verify application health</li><li>Check logs</li><li>Perform RCA before redeploying</li></ul><h3>4️⃣ A Pod is stuck in the Pending state.</h3><h3>Step 1: Describe Pod</h3><pre>kubectl describe pod &lt;pod-name&gt;</pre><h3>Step 2: Check Events</h3><pre>kubectl get events --sort-by=.lastTimestamp</pre><h3>Step 3: Check Nodes</h3><pre>kubectl get nodes<br><br>kubectl describe node &lt;node-name&gt;</pre><h3>Common Reasons</h3><ul><li>Insufficient CPU</li><li>Insufficient Memory</li><li>NodeSelector mismatch</li><li>Taints &amp; Tolerations</li><li>PVC not bound</li><li>StorageClass issue</li><li>ImagePullSecret missing</li><li>Pod Affinity rules</li><li>ResourceQuota exceeded</li></ul><h3>Check PVC</h3><pre>kubectl get pvc<br><br>kubectl describe pvc &lt;pvc-name&gt;</pre><h3>5️⃣ A node suddenly becomes NotReady.</h3><h3>Step 1: Check Node</h3><pre>kubectl get nodes<br><br>kubectl describe node &lt;node-name&gt;</pre><h3>Step 2: Check Workloads</h3><pre>kubectl get pods -A -o wide | grep &lt;node-name&gt;</pre><h3>Step 3: SSH into Node</h3><pre>systemctl status kubelet<br><br>journalctl -u kubelet -xe<br><br>systemctl status containerd<br><br>df -h<br><br>free -m</pre><h3>Common Causes</h3><ul><li>Kubelet Down</li><li>Container Runtime Failure</li><li>Disk Pressure</li><li>Memory Pressure</li><li>Network Failure</li><li>CNI Issues</li><li>Node Crash</li><li>Certificate Expired</li></ul><h3>Recover</h3><pre>kubectl cordon &lt;node-name&gt;<br><br>kubectl drain &lt;node-name&gt; --ignore-daemonsets --delete-emptydir-data</pre><p>After Fix:</p><pre>kubectl uncordon &lt;node-name&gt;</pre><h3>6️⃣ One container inside a Pod keeps restarting while the other containers are healthy.</h3><h3>Check Container Logs</h3><pre>kubectl logs &lt;pod-name&gt; -c &lt;container-name&gt;<br><br>kubectl logs &lt;pod-name&gt; -c &lt;container-name&gt; --previous</pre><h3>Describe Pod</h3><pre>kubectl describe pod &lt;pod-name&gt;</pre><h3>Verify</h3><ul><li>Environment Variables</li><li>Startup Command</li><li>Secrets</li><li>ConfigMaps</li><li>Volume Mounts</li><li>Health Probes</li><li>Sidecar Communication</li><li>OOMKilled</li></ul><h3>Check Resources</h3><pre>kubectl top pod &lt;pod-name&gt; --containers</pre><h3>7️⃣ Application cannot communicate with another Service.</h3><h3>Step 1: Test DNS</h3><pre>kubectl run debug --rm -it --image=busybox -- sh<br><br>nslookup &lt;service-name&gt;<br><br>nslookup &lt;service-name&gt;.&lt;namespace&gt;.svc.cluster.local</pre><h3>Step 2: Verify Service</h3><pre>kubectl get svc<br><br>kubectl describe svc &lt;service-name&gt;<br><br>kubectl get endpoints &lt;service-name&gt;</pre><h3>Step 3: Check Labels</h3><pre>kubectl get pods --show-labels</pre><h3>Step 4: Check NetworkPolicy</h3><pre>kubectl get networkpolicy<br><br>kubectl describe networkpolicy &lt;policy-name&gt;</pre><h3>Step 5: Test Connectivity</h3><pre>kubectl exec -it &lt;client-pod&gt; -- curl http://&lt;service-name&gt;:&lt;port&gt;</pre><h3>Root Cause Decision</h3><ul><li>DNS fails → CoreDNS Issue</li><li>Endpoints empty → Label mismatch</li><li>Connection refused → Service/Port Issue</li><li>Timeout → NetworkPolicy</li><li>HTTP 500 → Application Issue</li></ul><h3>8️⃣ How would you securely provide database passwords or API keys?</h3><h3>Create Secret</h3><pre>kubectl create secret generic db-secret \<br>--from-literal=username=admin \<br>--from-literal=password=Password123</pre><h3>Use Secret as Environment Variable</h3><pre>env:<br>- name: DB_PASSWORD<br>  valueFrom:<br>    secretKeyRef:<br>      name: db-secret<br>      key: password</pre><h3>Mount Secret as File</h3><pre>volumes:<br>- name: secret-volume<br>  secret:<br>    secretName: db-secret</pre><h3>Best Practices</h3><ul><li>Use Kubernetes Secrets</li><li>Enable Encryption at Rest</li><li>Apply RBAC</li><li>Never store Secrets in Git</li><li>Rotate Secrets Regularly</li><li>Use HashiCorp Vault / AWS Secrets Manager / Azure Key Vault / External Secrets Operator</li></ul><h3>9️⃣ CPU usage suddenly spikes to 100% in production.</h3><h3>Step 1: Identify High CPU Pods</h3><pre>kubectl top nodes<br><br>kubectl top pods<br><br>kubectl top pods --containers</pre><h3>Step 2: Check Logs</h3><pre>kubectl logs &lt;pod-name&gt; --since=10m<br><br>kubectl logs &lt;pod-name&gt; --previous</pre><h3>Step 3: Describe Pod</h3><pre>kubectl describe pod &lt;pod-name&gt;</pre><h3>Step 4: Check HPA</h3><pre>kubectl get hpa<br><br>kubectl describe hpa &lt;hpa-name&gt;</pre><h3>Step 5: Exec into Pod</h3><pre>kubectl exec -it &lt;pod-name&gt; -- top</pre><h3>Investigate</h3><ul><li>Traffic Spike</li><li>Infinite Loop</li><li>High GC Activity</li><li>CPU Throttling</li><li>Resource Limits</li><li>Database Slowness</li><li>External API Latency</li></ul><h3>🔟 What is Custom Resource Definition.</h3><p>A Custom Resource Definition (CRD) is a Kubernetes feature that allows us to extend the Kubernetes API by creating our own custom resource types. Instead of using only built-in resources like Pods, Services, and Deployments, we can define custom resources such as Database, Backup, or Application. Kubernetes stores these custom resources just like native resources, and a controller or operator watches them to perform the required actions.</p><h3>Simple Example</h3><p>Suppose your organization frequently deploys PostgreSQL databases.</p><p>Without a CRD, you would manually create:</p><ul><li>Deployment</li><li>Service</li><li>PersistentVolumeClaim</li><li>Secret</li><li>ConfigMap</li></ul><p>With a CRD, you can simply create:</p><pre>apiVersion: company.com/v1<br>kind: Database<br>metadata:<br>  name: customer-db<br>spec:<br>  engine: postgres<br>  version: &quot;16&quot;<br>  storage: 20Gi</pre><p>Here:</p><ul><li><strong>CRD</strong> defines the new resource type called Database.</li><li><strong>Database</strong> is the <strong>Custom Resource (CR)</strong>.</li><li>A <strong>controller/operator</strong> watches this resource and automatically creates the Deployment, Service, PVC, Secrets, and manages the database lifecycle.</li></ul><h3>Why do we use CRDs?</h3><ul><li>Extend Kubernetes without changing its source code.</li><li>Create application-specific resources.</li><li>Automate complex deployments using operators.</li><li>Manage custom applications in a Kubernetes-native way.</li></ul><h3>Real-world examples</h3><p>Many popular Kubernetes tools use CRDs:</p><ul><li>cert-manager: Certificate, Issuer</li><li>Prometheus Operator: Prometheus, ServiceMonitor</li><li>Argo CD: Application</li></ul><h3>Interview-friendly one-liner</h3><blockquote><strong><em>“A Custom Resource Definition (CRD) is a way to extend the Kubernetes API by defining your own resource types. These resources are managed by controllers or operators, allowing Kubernetes to automate application-specific tasks.”</em></strong></blockquote><p>This concise explanation is suitable for most Kubernetes interview questions and demonstrates both conceptual understanding and practical usage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa24327fb5ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[8 Production-Ready Python Mini Projects You Can Build in Under 15 Minutes]]></title>
            <link>https://nidhiashtikar.medium.com/8-production-ready-python-mini-projects-you-can-build-in-under-15-minutes-1b58fd55ffe4?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b58fd55ffe4</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[production]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 11:47:23 GMT</pubDate>
            <atom:updated>2026-03-08T11:47:23.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTPjNNhnhti1n_DDjVB2Dg.jpeg" /></figure><p>Python isn’t just for learning syntax or solving coding problems. It’s powerful enough to build <strong>real production-ready utilities</strong> that solve everyday problems.</p><p>In this guide, we’ll look at <strong>8 small but practical Python applications</strong> you can build quickly — things like converting videos to audio, generating PDFs, and automating files.</p><p>These tools are simple, useful, and can even become <strong>real SaaS or automation tools</strong>.</p><h3>1. Convert Video to Audio (MP4 → MP3)</h3><p>Sometimes you only need the audio from a video (podcasts, lectures, interviews).</p><p>Python makes this easy.</p><pre># ---------- 1. Video to Audio Converter ----------<br><br>from moviepy.editor import VideoFileClip<br><br>def video_to_audio(video_file, output_audio):<br>    video = VideoFileClip(video_file)<br>    audio = video.audio<br>    audio.write_audiofile(output_audio)<br>    print(&quot;✅ Audio extracted successfully!&quot;)<br><br># video_to_audio(&quot;video.mp4&quot;, &quot;audio.mp3&quot;)</pre><p>Example use cases:</p><ul><li>Convert YouTube downloads to MP3</li><li>Extract lecture audio</li><li>Create podcast audio</li></ul><p>Install dependency:</p><pre>pip install moviepy</pre><h3>2. Convert Text to PDF</h3><p>Need to convert notes or logs into a PDF document?</p><p>Python can generate PDFs easily.</p><pre># ---------- 2. Text to PDF Converter ----------<br><br>from fpdf import FPDF<br><br>def text_to_pdf(text_file, output_pdf):<br>    pdf = FPDF()<br>    pdf.add_page()<br>    pdf.set_font(&quot;Arial&quot;, size=12)<br><br>    with open(text_file, &quot;r&quot;) as file:<br>        for line in file:<br>            pdf.cell(200, 10, txt=line, ln=True)<br><br>    pdf.output(output_pdf)<br>    print(&quot;✅ PDF created successfully!&quot;)<br><br># text_to_pdf(&quot;notes.txt&quot;, &quot;output.pdf&quot;)</pre><p>Install library:</p><pre>pip install fpdf</pre><p>Use cases:</p><ul><li>Convert logs into reports</li><li>Generate documentation</li><li>Export notes as PDF</li></ul><h3>3. Image to PDF Converter</h3><p>Combine multiple images into a single PDF.</p><pre># ---------- 3. Image to PDF ----------<br><br>from PIL import Image<br><br>def images_to_pdf(image_list, output):<br>    images = [Image.open(img).convert(&#39;RGB&#39;) for img in image_list]<br>    images[0].save(output, save_all=True, append_images=images[1:])<br>    print(&quot;✅ Images combined into PDF!&quot;)<br><br># images_to_pdf([&quot;img1.jpg&quot;,&quot;img2.jpg&quot;], &quot;result.pdf&quot;)</pre><p>Useful for:</p><ul><li>Scanned documents</li><li>Image reports</li><li>Digital portfolios</li></ul><h3>4. URL Screenshot Tool</h3><pre># ---------- 4. Website Screenshot Tool ----------<br><br>from selenium import webdriver<br><br>def take_screenshot(url):<br>    driver = webdriver.Chrome()<br>    driver.get(url)<br>    driver.save_screenshot(&quot;website.png&quot;)<br>    driver.quit()<br>    print(&quot;✅ Screenshot captured!&quot;)<br><br># take_screenshot(&quot;https://example.com&quot;)</pre><p>Use cases:</p><ul><li>Website monitoring</li><li>UI testing</li><li>Report generation</li></ul><h3>5. Bulk File Organizer</h3><p>Automatically organize messy folders</p><pre># ---------- 5. File Organizer ----------<br><br>import os<br>import shutil<br><br>def organize_files(folder):<br>    for file in os.listdir(folder):<br>        if file.endswith(&quot;.jpg&quot;):<br>            os.makedirs(&quot;images&quot;, exist_ok=True)<br>            shutil.move(file, &quot;images/&quot; + file)<br><br>        elif file.endswith(&quot;.pdf&quot;):<br>            os.makedirs(&quot;pdfs&quot;, exist_ok=True)<br>            shutil.move(file, &quot;pdfs/&quot; + file)<br><br>    print(&quot;✅ Files organized!&quot;)<br><br># organize_files(&quot;downloads&quot;)</pre><p>Perfect for organizing:</p><ul><li>Downloads folder</li><li>Project assets</li><li>Work documents</li></ul><h3>6. Speech to Text Converter</h3><p>Convert audio into written text.</p><pre># ---------- 6. Speech to Text ----------<br><br>import speech_recognition as sr<br><br>def speech_to_text(audio_file):<br>    r = sr.Recognizer()<br><br>    with sr.AudioFile(audio_file) as source:<br>        audio = r.record(source)<br><br>    text = r.recognize_google(audio)<br>    print(&quot;📝 Transcription:&quot;, text)<br><br># speech_to_text(&quot;speech.wav&quot;)</pre><p>Use cases:</p><ul><li>Meeting transcription</li><li>Voice notes</li><li>Podcast transcription</li></ul><h3>7. Simple Password Generator</h3><p>Generate secure passwords automatically.</p><pre># ---------- 7. Password Generator ----------<br><br>import random<br>import string<br><br>def generate_password(length=12):<br>    chars = string.ascii_letters + string.digits + string.punctuation<br>    password = &#39;&#39;.join(random.choice(chars) for _ in range(length))<br>    print(&quot;🔐 Generated Password:&quot;, password)<br><br># generate_password()</pre><p>Great for:</p><ul><li>Secure accounts</li><li>DevOps secrets</li><li>API keys</li></ul><h3>8. Automatic Log Cleaner</h3><pre># ---------- 8. Log Cleaner ----------<br><br>def clean_logs(input_file, output_file):<br>    with open(input_file, &quot;r&quot;) as file:<br>        lines = file.readlines()<br><br>    filtered = [line for line in lines if &quot;ERROR&quot; in line]<br><br>    with open(output_file, &quot;w&quot;) as file:<br>        file.writelines(filtered)<br><br>    print(&quot;✅ Logs filtered successfully!&quot;)<br><br># clean_logs(&quot;server.log&quot;, &quot;errors.log&quot;)</pre><p>Useful for:</p><ul><li>DevOps monitoring</li><li>Server troubleshooting</li><li>Log analysis</li></ul><h3>Install Required Libraries</h3><p>Run this command:</p><pre>pip install moviepy fpdf pillow selenium SpeechRecognition</pre><p>Python allows you to build <strong>small but powerful utilities</strong> in just a few minutes.</p><p>Instead of doing repetitive tasks manually, you can build tools that:</p><ul><li>Convert <strong>videos to audio</strong></li><li>Generate <strong>PDF reports</strong></li><li>Organize <strong>files automatically</strong></li><li>Convert <strong>speech to text</strong></li><li>Automate <strong>daily workflows</strong></li></ul><p>These small projects are also a <strong>great starting point for production-ready tools or SaaS applications</strong>.</p><p>Start with one of these ideas — and you might end up building something people use every day.</p><p>If you found this guide helpful then do click on 👏 the button.</p><p>Follow for more learning like this 😊</p><p>Let’s connect! Find me on <strong>LinkedIn</strong>.</p><p>If you’re interested in joining <strong>AWS classes</strong>, contact me at:<br> <strong>nashtikar2@gmail.com</strong></p><p>Thanks for spending your valuable time learning to enhance your knowledge!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b58fd55ffe4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Most Asked AWS Interview Questions and Answers]]></title>
            <link>https://nidhiashtikar.medium.com/100-most-asked-aws-interview-questions-and-answers-5c6742784e88?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c6742784e88</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[aws-devops]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 16:28:26 GMT</pubDate>
            <atom:updated>2026-03-06T16:28:26.033Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QOm5tzXQaZD5lpCeT0EDfA.jpeg" /></figure><h3>AWS Basics</h3><p><strong>1. What is AWS?</strong><br> AWS (Amazon Web Services) is a cloud computing platform that provides on-demand computing services like servers, storage, networking, databases, AI, and analytics using a pay-as-you-go pricing model.</p><p><strong>2. What are the main benefits of AWS?</strong><br> Scalability, high availability, cost-effective pricing, security, flexibility, and global infrastructure.</p><p><strong>3. What are the types of cloud computing models?</strong></p><ul><li>IaaS (Infrastructure as a Service)</li><li>PaaS (Platform as a Service)</li><li>SaaS (Software as a Service)</li></ul><p><strong>4. What is an AWS Region?</strong><br> A region is a geographic area where AWS has multiple data centers.</p><p><strong>5. What is an Availability Zone?</strong><br> An Availability Zone (AZ) is one or more isolated data centers within a region used for high availability.</p><p><strong>6. What is Edge Location?</strong><br> Edge locations are AWS data centers used by CloudFront and Route 53 to deliver content with low latency.</p><p><strong>7. What is AWS IAM?</strong><br> IAM (Identity and Access Management) is a service that controls access to AWS resources securely.</p><p><strong>8. What is the difference between IAM user and IAM role?</strong><br> IAM User → permanent identity with credentials<br> IAM Role → temporary access granted to users or services</p><p><strong>9. What is an IAM Policy?</strong><br> A policy is a JSON document that defines permissions to access AWS resources.</p><p><strong>10. What is MFA in AWS?</strong><br> Multi-Factor Authentication adds an extra security layer by requiring a second verification method.</p><h3>EC2 (Compute)</h3><p><strong>11. What is Amazon EC2?</strong><br> EC2 provides scalable virtual servers in the cloud.</p><p><strong>12. What are EC2 instance types?</strong><br> General purpose, compute optimized, memory optimized, storage optimized, GPU instances.</p><p><strong>13. What is an AMI?</strong><br> Amazon Machine Image is a template used to launch EC2 instances.</p><p><strong>14. What is Auto Scaling?</strong><br> Automatically increases or decreases EC2 instances based on demand.</p><p><strong>15. What is Elastic Load Balancer (ELB)?</strong><br> Distributes incoming traffic across multiple EC2 instances.</p><p><strong>16. Types of Load Balancers in AWS?</strong><br> Application Load Balancer (ALB)<br> Network Load Balancer (NLB)<br> Gateway Load Balancer (GWLB)</p><p><strong>17. What is Security Group?</strong><br> A virtual firewall that controls inbound and outbound traffic to EC2 instances.</p><p><strong>18. What is a Key Pair?</strong><br> Used to securely connect to EC2 instances via SSH.</p><p><strong>19. What is EBS?</strong><br> Elastic Block Store provides persistent block storage for EC2 instances.</p><p><strong>20. What is the difference between EBS and Instance Store?</strong></p><p>EBS</p><ul><li>Persistent storage</li><li>Data survives reboot</li></ul><p>Instance Store</p><ul><li>Temporary storage</li><li>Data lost when instance stops</li></ul><h3>S3 (Storage)</h3><p><strong>21. What is Amazon S3?</strong><br> S3 is an object storage service used to store files and data.</p><p><strong>22. What are S3 buckets?</strong><br> Containers used to store objects in S3.</p><p><strong>23. What is S3 versioning?</strong><br> Keeps multiple versions of an object to protect against accidental deletion.</p><p><strong>24. What is S3 lifecycle policy?</strong><br> Automatically moves objects between storage classes or deletes them.</p><p><strong>25. What are S3 storage classes?</strong></p><ul><li>Standard</li><li>Standard-IA</li><li>One Zone-IA</li><li>Glacier</li><li>Glacier Deep Archive</li></ul><p><strong>26. What is S3 Glacier?</strong><br> Low-cost storage used for long-term data archiving.</p><p><strong>27. What is S3 replication?</strong><br> Automatically copies objects to another bucket in a different region.</p><p><strong>28. What is a pre-signed URL?</strong><br> A temporary URL used to grant access to private S3 objects.</p><p><strong>29. What is S3 event notification?</strong><br> Triggers services like Lambda when objects are uploaded.</p><p><strong>30. What is object lifecycle management?</strong><br> Automates storage cost optimization by moving objects between classes.</p><h3>Networking (VPC)</h3><p><strong>31. What is VPC?</strong><br> Virtual Private Cloud is a logically isolated network in AWS.</p><p><strong>32. What is a Subnet?</strong><br> A subnet is a smaller network within a VPC.</p><p><strong>33. Types of subnets?</strong></p><p>Public subnet<br> Private subnet</p><p><strong>34. What is an Internet Gateway?</strong><br> Allows communication between VPC and the internet.</p><p><strong>35. What is NAT Gateway?</strong><br> Allows instances in private subnet to access the internet.</p><p><strong>36. What is Route Table?</strong><br> Controls traffic routing within a VPC.</p><p><strong>37. What is VPC Peering?</strong><br> Connects two VPC networks privately.</p><p><strong>38. What is VPN in AWS?</strong><br> Secure connection between on-premise network and AWS.</p><p><strong>39. What is AWS Direct Connect?</strong><br> Dedicated private network connection to AWS.</p><p><strong>40. Difference between Security Group and NACL</strong></p><p>Security Group</p><ul><li>Instance level</li><li>Stateful</li></ul><p>NACL</p><ul><li>Subnet level</li><li>Stateless</li></ul><h3>Databases</h3><p><strong>41. What is Amazon RDS?</strong><br> Managed relational database service.</p><p><strong>42. Supported RDS engines?</strong></p><p>MySQL<br> PostgreSQL<br> Oracle<br> SQL Server<br> MariaDB<br> Aurora</p><p><strong>43. What is Amazon Aurora?</strong><br> A high-performance relational database compatible with MySQL and PostgreSQL.</p><p><strong>44. What is DynamoDB?</strong><br> Fully managed NoSQL database service.</p><p><strong>45. What is Redshift?</strong><br> Data warehouse service used for analytics.</p><p><strong>46. What is Elasticache?</strong><br> In-memory caching service.</p><p><strong>47. What is Multi-AZ in RDS?</strong><br> Creates a standby database for high availability.</p><p><strong>48. What is Read Replica?</strong><br> Copies of database used to improve read performance.</p><p><strong>49. Difference between RDS and DynamoDB</strong></p><p>RDS → Relational database<br> DynamoDB → NoSQL key-value database</p><p><strong>50. What is database snapshot?</strong><br> Backup of a database instance.</p><h3>Serverless</h3><p><strong>51. What is AWS Lambda?</strong><br> Serverless compute service that runs code without managing servers.</p><p><strong>52. Lambda trigger examples</strong></p><p>S3<br> API Gateway<br> DynamoDB<br> CloudWatch</p><p><strong>53. What is API Gateway?</strong><br> Service used to create and manage APIs.</p><p><strong>54. What is Step Functions?</strong><br> Used to coordinate multiple AWS services into workflows.</p><p><strong>55. What is EventBridge?</strong><br> Event bus service that connects applications using events.</p><h3>Monitoring</h3><p><strong>56. What is CloudWatch?</strong><br> Monitoring service for AWS resources and applications.</p><p><strong>57. What are CloudWatch metrics?</strong><br> Performance measurements like CPU utilization.</p><p><strong>58. What are CloudWatch alarms?</strong><br> Triggers actions when metrics exceed thresholds.</p><p><strong>59. What is CloudTrail?</strong><br> Tracks API activity in AWS.</p><p><strong>60. What is AWS Config?</strong><br> Tracks configuration changes of AWS resources.</p><h3>Security</h3><p><strong>61. What is KMS?</strong><br> Key Management Service used for encryption keys.</p><p><strong>62. What is AWS Shield?</strong><br> Protection against DDoS attacks.</p><p><strong>63. What is AWS WAF?</strong><br> Web Application Firewall that protects applications from attacks.</p><p><strong>64. What is Secrets Manager?</strong><br> Stores database credentials securely.</p><p><strong>65. What is AWS Cognito?</strong><br> User authentication and identity management service.</p><h3>DevOps</h3><p><strong>66. What is CodeCommit?</strong><br> Git repository service.</p><p><strong>67. What is CodeBuild?</strong><br> Build and test code automatically.</p><p><strong>68. What is CodeDeploy?</strong><br> Automates application deployment.</p><p><strong>69. What is CodePipeline?</strong><br> CI/CD pipeline automation.</p><p><strong>70. What is Infrastructure as Code?</strong><br> Managing infrastructure using code instead of manual setup.</p><h3>Advanced AWS</h3><p><strong>71. What is CloudFormation?</strong><br> Service to create infrastructure using templates.</p><p><strong>72. What is Elastic Beanstalk?</strong><br> Platform for deploying applications easily.</p><p><strong>73. What is AWS Organizations?</strong><br> Service used to manage multiple AWS accounts.</p><p><strong>74. What is Cost Explorer?</strong><br> Tool used to analyze AWS costs.</p><p><strong>75. What is Trusted Advisor?</strong><br> Provides best practice recommendations.</p><h3>Storage Advanced</h3><p><strong>76. What is EFS?</strong><br> Elastic File System used for shared file storage.</p><p><strong>77. What is FSx?</strong><br> Fully managed file systems like Windows File Server.</p><p><strong>78. What is Storage Gateway?</strong><br> Hybrid storage service connecting on-premise storage to AWS.</p><h3>Migration</h3><p><strong>79. What is AWS DMS?</strong><br> Database Migration Service.</p><p><strong>80. What is AWS Snowball?</strong><br> Physical device used for large data transfers to AWS.</p><h3>Architecture</h3><p><strong>81. What is high availability?</strong><br> System design that ensures minimal downtime.</p><p><strong>82. What is fault tolerance?</strong><br> Ability to continue working even when components fail.</p><p><strong>83. What is horizontal scaling?</strong><br> Adding more servers.</p><p><strong>84. What is vertical scaling?</strong><br> Increasing server size.</p><p><strong>85. What is load balancing?</strong><br> Distributing traffic across multiple servers.<br>Advanced Concepts</p><p><strong>86. What is virtualization?</strong><br> Technology that allows multiple virtual machines on one physical server.</p><p><strong>87. Types of virtualization in AWS</strong></p><p>HVM (Hardware Virtual Machine)<br> PV (Paravirtualization)</p><p><strong>88. What is block storage?</strong><br> Stores data in blocks like hard drives.</p><p><strong>89. What is file storage?</strong><br> Stores data as files and directories.</p><p><strong>90. What is object storage?</strong><br> Stores data as objects with metadata (S3).</p><h3>Misc AWS Questions</h3><p><strong>91. What is CloudFront?</strong><br> Content Delivery Network (CDN) for faster content delivery.</p><p><strong>92. What is Route 53?</strong><br> DNS service used to route internet traffic.</p><p><strong>93. What is Elastic IP?</strong><br> Static public IP address.</p><p><strong>94. What is Spot Instance?</strong><br> Low-cost EC2 instance using unused AWS capacity.</p><p><strong>95. What is Reserved Instance?</strong><br> EC2 instances purchased for long-term discount.</p><p><strong>96. What is On-Demand Instance?</strong><br> Pay per hour without commitment.</p><p><strong>97. What is AMI baking?</strong><br> Pre-configuring AMI with software and settings.</p><p><strong>98. What is AWS Well-Architected Framework?</strong><br> Guidelines for building secure, reliable, and efficient cloud architectures.</p><p><strong>99. What is tagging in AWS?</strong><br> Adding metadata labels to AWS resources.</p><p><strong>100. What is AWS CLI?</strong><br> Command Line Interface used to manage AWS services.</p><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c6742784e88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Become a Data Engineer: What Companies Actually Ask ?]]></title>
            <link>https://nidhiashtikar.medium.com/how-to-become-a-data-engineer-what-companies-actually-ask-5c554c7a3447?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c554c7a3447</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-engineer]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Wed, 25 Feb 2026 16:44:34 GMT</pubDate>
            <atom:updated>2026-02-25T16:44:34.546Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s world, data is everywhere.</p><p>When you use Instagram, order food online, book a ticket, or watch YouTube — data is being created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8V76QpXIGJ3jdisJtJx-qw.jpeg" /></figure><p>Companies collect:</p><ul><li>User data</li><li>Payment data</li><li>Click data</li><li>Location data</li><li>Product data</li></ul><p>But raw data is messy and useless unless it is cleaned and organized.</p><p>This is where a <strong>Data Engineer</strong> comes in.</p><p>A Data Engineer builds systems that:</p><ul><li>Collect data</li><li>Clean data</li><li>Store data</li><li>Move data</li><li>Make data ready for analysis</li></ul><p>Without Data Engineers, data scientists and analysts cannot do their work.</p><p>In this article, I will explain everything in very simple words:</p><ul><li>Is Data Engineering really in demand?</li><li>What do companies actually ask in job postings?</li><li>What skills do you really need?</li><li>What should you study step by step?</li><li>How to prepare for interviews?</li><li>How to stand out from others?</li></ul><p>Let’s start.</p><h3>📈 Is Data Engineering Really in Demand?</h3><p>Yes. Very much.</p><p>Almost every company today is becoming a “data company”.</p><p>They are moving their systems to cloud platforms like:</p><ul><li>Amazon Web Services</li><li>Microsoft Azure</li><li>Google Cloud</li></ul><p>When companies move to the cloud, they need engineers who can:</p><ul><li>Build data pipelines</li><li>Manage cloud storage</li><li>Handle large data</li><li>Make systems scalable</li></ul><p>Also, AI and Machine Learning are growing fast.</p><p>AI needs clean and structured data.</p><p>No clean data = No AI.</p><p>That’s why Data Engineers are important.</p><h3>🧑‍💻 What Does a Data Engineer Actually Do?</h3><p>Many beginners think Data Engineers only work with databases.</p><p>That is not fully correct.</p><p>A Data Engineer usually:</p><ol><li>Collects data from different sources</li></ol><ul><li>APIs</li><li>Databases</li><li>CSV files</li><li>Logs</li><li>Streaming systems</li></ul><p>2. Cleans and transforms data</p><ul><li>Remove duplicates</li><li>Fix errors</li><li>Format properly</li></ul><p>3. Stores data in:</p><ul><li>Data warehouse</li><li>Data lake</li><li>Cloud storage</li></ul><p>4. Builds automated pipelines</p><ul><li>So data moves automatically every day</li></ul><p>5. Makes sure:</p><ul><li>Data is correct</li><li>Data is secure</li><li>Systems are fast</li></ul><h3>📋 What Companies Actually Ask (Based on Real Job Postings)</h3><h3>1️⃣ SQL (Most Important Skill)</h3><p>If you want to become a Data Engineer, SQL is your foundation.</p><p>Companies expect you to know:</p><ul><li>SELECT statements</li><li>JOIN (Inner, Left, Right)</li><li>GROUP BY</li><li>Window functions</li><li>Subqueries</li><li>Indexes</li><li>Query optimization</li></ul><p>In many interviews, SQL round is the first round.</p><p>If you fail SQL, you usually don’t move forward.</p><p>👉 Spend serious time mastering SQL.</p><h3>2️⃣ Python (Second Most Important)</h3><p>Python is used to:</p><ul><li>Clean data</li><li>Automate tasks</li><li>Connect APIs</li><li>Process files</li><li>Build pipelines</li></ul><p>You should know:</p><ul><li>Basic syntax</li><li>Functions</li><li>Working with CSV &amp; JSON</li><li>Pandas library</li><li>Error handling</li></ul><p>You don’t need to be a Python expert like a backend developer.<br> But you must be comfortable with it.</p><h3>3️⃣ ETL &amp; Data Pipelines</h3><p>ETL means:</p><p>Extract → Transform → Load</p><p>Example:</p><ul><li>Extract data from API</li><li>Transform it (clean, change format)</li><li>Load into database</li></ul><p>Companies want engineers who understand:</p><ul><li>ETL vs ELT</li><li>Batch processing</li><li>Real-time streaming</li><li>Data validation</li><li>Error handling</li></ul><p>You may see tools like:</p><ul><li>Apache Spark</li><li>Apache Kafka</li><li>Apache Hadoop</li></ul><p>You don’t need to learn everything at once.</p><p>First understand the concepts.<br> Then slowly learn tools.</p><h3>4️⃣ Cloud Platforms (Very Important Today)</h3><p>Almost every modern company uses cloud.</p><p>You should learn at least one platform:</p><p>AWS (Most common choice)<br> Azure<br> GCP</p><p>In AWS, important services are:</p><ul><li>S3 (storage)</li><li>Redshift (data warehouse)</li><li>Glue (ETL service)</li></ul><p>Cloud knowledge makes your profile stronger.</p><h3>5️⃣ Data Warehousing &amp; Modeling</h3><p>Interviewers often ask theory questions like:</p><ul><li>What is a Data Warehouse?</li><li>What is a Data Lake?</li><li>What is Star Schema?</li><li>What is Fact Table?</li><li>What is Dimension Table?</li><li>What is Slowly Changing Dimension?</li></ul><p>You should understand these clearly.</p><p>Even freshers are asked these questions.</p><h3>📚 Step-by-Step Roadmap to Become Data Engineer</h3><p>Now let’s talk about what YOU should do.</p><h3>✅ Step 1: Master SQL</h3><p>Practice daily.</p><p>Use platforms like:</p><ul><li>LeetCode</li><li>HackerRank</li></ul><p>Focus on:</p><ul><li>Complex joins</li><li>Window functions</li><li>Performance</li></ul><h3>✅ Step 2: Learn Python for Data</h3><p>Focus on:</p><ul><li>Pandas</li><li>File handling</li><li>API calls</li><li>Basic scripting</li></ul><p>Build small scripts.</p><h3>✅ Step 3: Learn Data Engineering Concepts</h3><p>Understand:</p><ul><li>ETL process</li><li>Data warehouse</li><li>Data modeling</li><li>Batch vs Streaming</li></ul><p>Don’t just memorize. Understand why.</p><h3>✅ Step 4: Learn One Cloud Platform</h3><p>Start with AWS.</p><p>Learn:</p><ul><li>S3</li><li>IAM basics</li><li>Redshift</li><li>Glue</li></ul><p>You don’t need certification immediately.</p><p>Hands-on practice is more important.</p><h3>✅ Step 5: Build Real Projects</h3><p>This is where most people fail.</p><p>Don’t just watch tutorials.</p><p>Build:</p><ul><li>API to database pipeline</li><li>ETL project</li><li>Mini data warehouse</li><li>Spark data processing project</li></ul><p>Put projects on GitHub.</p><p>Projects matter more than certificates.</p><h3>🎯 How to Prepare for Interviews</h3><p>Most Data Engineer interviews include:</p><ol><li>SQL round</li><li>Python round</li><li>System design (for experienced)</li><li>Data modeling questions</li><li>Scenario-based questions</li></ol><p>Example questions:</p><ul><li>How would you design a data pipeline?</li><li>How do you handle large data?</li><li>What if data fails during processing?</li></ul><p>You must think logically.</p><h3>💰 Salary and Career Growth</h3><p>Data Engineering is one of the high-paying IT roles.</p><p>Entry level: Good salary<br> Mid level: Very strong growth<br> Senior level: Very high demand</p><p>But remember:</p><p>It is not easy money.</p><p>You must:</p><ul><li>Keep learning</li><li>Stay updated</li><li>Work on real systems</li><li>Improve problem-solving</li></ul><h3>⚠️ Common Mistakes Beginners Make</h3><p>❌ Learning too many tools at once<br> ❌ Ignoring SQL<br> ❌ Only watching tutorials<br> ❌ Not building projects<br> ❌ Depending only on certificates</p><p>Focus on strong basics first.</p><h3>🏁 Advice</h3><p>Choose Data Engineering if:</p><ul><li>You enjoy backend work</li><li>You like logic and systems</li><li>You are comfortable with databases</li><li>You enjoy solving data problems</li></ul><p>Do not choose it only because of salary.</p><p>Build real skills.</p><p>The market rewards skill, not hype.</p><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c554c7a3447" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Everyday Tasks You Can Automate with Python in Under 10 Minutes]]></title>
            <link>https://nidhiashtikar.medium.com/10-everyday-tasks-you-can-automate-with-python-in-under-10-minutes-b2871eb3c51e?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2871eb3c51e</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-automation]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 07:37:05 GMT</pubDate>
            <atom:updated>2025-08-16T17:00:57.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J4VIHLFdvGiVOLiZKdiPDw.jpeg" /></figure><p>For more in-depth learning, get access to my exclusive PDFs here: <br><a href="https://nidhiashtikar.gumroad.com/">Nidhi-PDF’s</a></p><p>Are you tired of doing the same tasks over and over again? Python can help! It’s a simple programming language that you can use to automate boring or repetitive tasks — and the best part is, you don’t need to be a coding expert.</p><p>Here are <strong>10 everyday tasks</strong> you can automate with Python in <strong>under 10 minutes</strong>.</p><h3>1. Rename Multiple Files at Once</h3><p>Manually renaming files is a pain. With Python, you can write a small script that renames hundreds of files in one go.</p><pre># ---------- 1. Rename Multiple Files ----------<br># This script renames all files in a folder with a new name and a number.<br><br>import os<br><br>def rename_files(folder_path):<br>    for count, filename in enumerate(os.listdir(folder_path)):<br>        new_name = f&quot;file_{count}.jpg&quot;<br>        os.rename(os.path.join(folder_path, filename), os.path.join(folder_path, new_name))<br>    print(&quot;✅ Files renamed successfully!&quot;)<br><br># rename_files(&#39;/your/folder/path&#39;)</pre><h3>2. Send Emails Automatically</h3><p>Python can send emails for you — like reminders, reports, or newsletters.</p><pre># ---------- 2. Send an Email Automatically ----------<br># This sends an email using your Gmail account.<br><br>import smtplib<br><br>def send_email(sender, password, receiver, message):<br>    server = smtplib.SMTP(&#39;smtp.gmail.com&#39;, 587)<br>    server.starttls()<br>    server.login(sender, password)<br>    server.sendmail(sender, receiver, message)<br>    server.quit()<br>    print(&quot;✅ Email sent!&quot;)<br><br># send_email(&#39;your_email@gmail.com&#39;, &#39;your_password&#39;, &#39;to_email@example.com&#39;, &#39;Hello from Python!&#39;)</pre><h3>3. Convert PDFs to Text</h3><p>Need to extract text from a PDF file? Python can do that in seconds.</p><pre># ---------- 3. Convert PDF to Text ----------<br># This reads the text from a PDF file.<br><br>import PyPDF2<br><br>def pdf_to_text(file_path):<br>    reader = PyPDF2.PdfReader(file_path)<br>    for page in reader.pages:<br>        print(page.extract_text())<br>    print(&quot;✅ PDF converted to text.&quot;)<br><br># pdf_to_text(&#39;file.pdf&#39;)</pre><h3>4. Download YouTube Videos</h3><p>Want to save YouTube videos to watch later? Use Python with the pytube library.</p><pre># ---------- 4. Download YouTube Videos ----------<br># Downloads the highest quality YouTube video.<br><br>from pytube import YouTube<br><br>def download_youtube_video(link):<br>    yt = YouTube(link)<br>    yt.streams.get_highest_resolution().download()<br>    print(&quot;✅ Video downloaded!&quot;)<br><br># download_youtube_video(&#39;https://www.youtube.com/watch?v=abc123&#39;)</pre><h3>5. Create Reminders and To-Do Lists</h3><p>Automate your daily checklist or reminders using a simple Python script.</p><pre># ---------- 5. Simple Reminder List ----------<br># Just prints out your tasks for the day.<br><br>def daily_reminders():<br>    tasks = [&#39;Drink Water&#39;, &#39;Take a Break&#39;, &#39;Check Emails&#39;]<br>    for task in tasks:<br>        print(f&quot;🔔 Reminder: {task}&quot;)<br>    print(&quot;✅ Reminders printed.&quot;)<br><br># daily_reminders()</pre><h3>6. Track Prices Online</h3><p>Want to know when a product goes on sale? Python can check the price for you.</p><pre># ---------- 6. Track Price of Online Product ----------<br># This checks the price of a product from a webpage.<br><br>import requests<br>from bs4 import BeautifulSoup<br><br>def check_price(url, class_name):<br>    page = requests.get(url)<br>    soup = BeautifulSoup(page.content, &#39;html.parser&#39;)<br>    price = soup.find(&#39;span&#39;, class_=class_name).text<br>    print(&quot;💰 Current price:&quot;, price)<br><br># check_price(&#39;https://example.com/product&#39;, &#39;price-class&#39;)</pre><h3>7. Resize or Edit Images in Bulk</h3><p>Python can resize or apply filters to lots of images at once using the Pillow library.</p><pre># ---------- 7. Resize Images in Bulk ----------<br># Resize all images in a folder to a fixed size.<br><br>from PIL import Image<br><br>def resize_images(source_folder, output_folder, size=(300, 300)):<br>    if not os.path.exists(output_folder):<br>        os.makedirs(output_folder)<br>    for file in os.listdir(source_folder):<br>        if file.endswith((&#39;.jpg&#39;, &#39;.png&#39;)):<br>            img = Image.open(os.path.join(source_folder, file))<br>            img = img.resize(size)<br>            img.save(os.path.join(output_folder, file))<br>    print(&quot;✅ Images resized.&quot;)<br><br># resize_images(&#39;images/&#39;, &#39;resized/&#39;)</pre><h3>8. Clean Up Excel Files</h3><p>Got messy spreadsheets? Python and pandas can help clean them up fast.</p><pre># ---------- 8. Clean Up Excel File ----------<br># Removes rows with empty cells from an Excel file.<br><br>import pandas as pd<br><br>def clean_excel(file_path, output_file):<br>    data = pd.read_excel(file_path)<br>    cleaned = data.dropna()  # remove empty rows<br>    cleaned.to_excel(output_file, index=False)<br>    print(&quot;✅ Excel file cleaned.&quot;)<br><br># clean_excel(&#39;data.xlsx&#39;, &#39;cleaned_data.xlsx&#39;)</pre><h3>9. Post to Social Media</h3><p>Want to post tweets or updates automatically? Python makes it possible using APIs.</p><pre>import tweepy<br><br>def post_tweet(api_key, api_secret, access_token, access_secret, message):<br>    # Authenticate with Twitter<br>    auth = tweepy.OAuth1UserHandler(api_key, api_secret, access_token, access_secret)<br>    api = tweepy.API(auth)<br><br>    try:<br>        api.update_status(message)<br>        print(&quot;✅ Tweet posted successfully!&quot;)<br>    except Exception as e:<br>        print(&quot;❌ Failed to post tweet:&quot;, e)<br><br># ✍️ Replace the below placeholders with your real API credentials<br>API_KEY = &#39;your_api_key&#39;<br>API_SECRET = &#39;your_api_secret&#39;<br>ACCESS_TOKEN = &#39;your_access_token&#39;<br>ACCESS_SECRET = &#39;your_access_secret&#39;<br><br># Your tweet message<br>MESSAGE = &#39;Hello Twitter! 👋 This tweet was posted using Python 🐍&#39;<br><br># Post the tweet<br>post_tweet(API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_SECRET, MESSAGE)</pre><h4>How to Get Twitter API Keys</h4><ol><li>Go to <a href="https://developer.twitter.com/">https://developer.twitter.com/</a></li><li>Create a developer account (apply for access if needed).</li><li>Create a new app under your project.</li><li>Go to <strong>Keys and Tokens</strong> tab.</li><li>Copy:</li></ol><ul><li><strong>API Key</strong></li><li><strong>API Secret Key</strong></li><li><strong>Access Token</strong></li><li><strong>Access Token Secret</strong></li></ul><h3>10. Create a Simple Chatbot</h3><p>You can even build a basic chatbot in under 10 minutes!</p><pre># ---------- 10. Simple Chatbot ----------<br># A basic chatbot that responds to your messages.<br><br>def chatbot():<br>    print(&quot;💬 Chatbot started. Type &#39;bye&#39; to exit.&quot;)<br>    while True:<br>        user_input = input(&quot;You: &quot;)<br>        if &#39;hello&#39; in user_input.lower():<br>            print(&quot;Bot: Hi there!&quot;)<br>        elif &#39;bye&#39; in user_input.lower():<br>            print(&quot;Bot: Goodbye!&quot;)<br>            break<br>        else:<br>            print(&quot;Bot: I don&#39;t understand.&quot;)<br><br># chatbot()</pre><p>Automation doesn’t need to be complicated. With just a little bit of Python, you can save hours every week by letting your computer handle the boring stuff.</p><p>So why not give it a try? Start with one of the tasks above — all you need is 10 minutes!</p><h3>✅ How to Use</h3><p><strong>Install Required Libraries</strong><br> Open a terminal and run:</p><pre>pip install PyPDF2 pytube Pillow pandas beautifulsoup4 requests</pre><p><strong>Edit and Run Tasks</strong><br> Uncomment the function you want to run (remove the # at the beginning of the function call), fill in the details like paths or email, and run the script using:</p><pre>python everyday_automation.py</pre><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2871eb3c51e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Interview Questions and Practical Answers]]></title>
            <link>https://nidhiashtikar.medium.com/devops-interview-questions-and-practical-answers-0c11bb92be2d?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c11bb92be2d</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[scenario-based-question]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Mon, 21 Jul 2025 06:46:05 GMT</pubDate>
            <atom:updated>2025-08-16T17:01:32.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*94MiOO8XEtjTFF4jHsa0Og.jpeg" /></figure><p>For more in-depth learning, get access to my exclusive PDFs here: <br><a href="https://nidhiashtikar.gumroad.com/">Nidhi-PDF’s</a></p><p><strong>1. How do you allow an app in one AWS account to access an S3 bucket in another account?</strong></p><p>Use a resource-based bucket policy in the S3 bucket account that grants access to the application account. Then, create an IAM role in the application account with a trust policy allowing it to assume access to the bucket. The app uses AWS STS to assume the role and access the bucket securely.</p><p><strong>2. Can you write a real-world multi-stage Dockerfile for a Node.js app?</strong></p><pre># Stage 1: Build<br>FROM node:18 AS build<br>WORKDIR /app<br>COPY package*.json ./<br>RUN npm ci<br>COPY . .<br>RUN npm run build<br><br># Stage 2: Production<br>FROM node:18-slim<br>WORKDIR /app<br>COPY --from=build /app/dist ./dist<br>COPY package*.json ./<br>RUN npm ci --only=production<br>CMD [&quot;node&quot;, &quot;dist/index.js&quot;]</pre><p>This separates the build and runtime environments, reducing image size and surface area.</p><p><strong>3. What if your Terraform state file gets corrupted or out of sync?</strong></p><p>Try terraform state pull to check the state file. If corrupted, restore from remote backend backups (e.g., S3 versioning). If necessary, re-import resources using terraform import to rebuild the state manually.</p><p><strong>4. How can an EC2 in a private subnet access the internet without a NAT Gateway?</strong></p><p>Use interface VPC endpoints (e.g., for S3 or DynamoDB). Alternatively, route traffic through a bastion host or proxy in a public subnet. Avoid assigning a public IP to private instances in production.</p><p><strong>5. A container crashed. How do you figure out what went wrong?</strong></p><p>Use docker logs &lt;container_id&gt; to view logs. Run docker inspect to get the exit code and details. Check for memory limits, incorrect entrypoints, missing files, or permission issues. In Kubernetes, also use kubectl describe pod and kubectl logs.</p><p><strong>6. You have an existing AWS VPC created manually. How do you bring it under Terraform?</strong></p><p>Use terraform import to bring the VPC and related resources into Terraform state. Write configuration files manually or use a tool like Terraformer to generate HCL code. Review the plan before applying to avoid unintended changes.</p><p><strong>7. How would you do blue-green deployments in Kubernetes?</strong></p><p>Deploy two versions of the application (blue and green) and switch traffic between them using a Kubernetes Service. You can use Ingress or service label selectors to change which pods receive traffic. For gradual rollouts, tools like Argo Rollouts or Istio are recommended.</p><p><strong>8. How do you manage secrets in Terraform?</strong></p><p>Use input variables marked as sensitive = true, and avoid hardcoding secrets in files. Load secrets from environment variables, .tfvars files (ignored by Git), or external secret managers like AWS Secrets Manager or Vault.</p><p><strong>9. In Dockerfile, when would you use COPY vs ADD?</strong></p><p>Use COPY for all file copy operations as it is simpler and more predictable. Use ADD only when you need to extract a tarball automatically or download a file from a remote URL.</p><p><strong>10. How do you create resources in two different AWS accounts with Terraform?</strong></p><p>Define multiple providers using aliases:</p><pre>provider &quot;aws&quot; {<br>  alias  = &quot;account1&quot;<br>  profile = &quot;account1&quot;<br>}<br><br>provider &quot;aws&quot; {<br>  alias  = &quot;account2&quot;<br>  profile = &quot;account2&quot;<br>}</pre><p>Assign the correct provider to each resource using the provider attribute.</p><p><strong>11. How would a PHP app in Docker get MySQL credentials securely?</strong></p><p>Pass credentials through environment variables defined at container runtime. Alternatively, pull credentials from a secret store like AWS Secrets Manager using the PHP SDK, a bootstrap script, or a sidecar/init container.</p><p><strong>12. Someone edited an S3 bucket policy outside of Terraform. What now?</strong></p><p>Run terraform plan to detect the drift. You can re-apply the original Terraform configuration or import the updated resource if the manual change is valid. Use lifecycle { prevent_destroy = true } to prevent destructive changes.</p><p><strong>13. How do you control pod-to-pod communication in Kubernetes?</strong></p><p>Use Kubernetes NetworkPolicies. These define rules based on pod selectors, namespaces, and ports. Ensure your cluster uses a network plugin that supports them, such as Calico or Cilium.</p><p><strong>14. Can you write a Python script to back up files older than 30 days?</strong></p><pre>import os, shutil, time<br>src = &quot;/path/to/source&quot;<br>dst = &quot;/path/to/backup&quot;<br>now = time.time()<br><br>for file in os.listdir(src):<br>    path = os.path.join(src, file)<br>    if os.path.isfile(path) and (now - os.path.getmtime(path)) &gt; 30 * 86400:<br>        shutil.copy2(path, dst)</pre><p><strong>15. Cloud costs are spiking. How do you troubleshoot?</strong></p><p>Use AWS Cost Explorer or GCP Billing Reports to identify anomalies. Filter by region, tag, or service. Look for unused instances, over-provisioned resources, or untagged services. Use auto-scaling, rightsizing, and spot instances where appropriate.</p><p><strong>16. How do you route AWS traffic based on user geography?</strong></p><p>Use Route 53 Geolocation Routing to serve traffic from different endpoints based on user location. Alternatively, use CloudFront with Lambda@Edge to inspect viewer.country and reroute accordingly.</p><p><strong>17. Prod Kubernetes cluster is unstable — pods aren’t pulling images, some are evicted. What’s your approach?</strong></p><p>Start by inspecting pod status using kubectl describe pod. If images aren’t pulling, check image name, tag, and registry permissions. For evicted pods, check node pressure (disk/memory) with kubectl describe node. Prevent issues by enforcing resource limits, setting up monitoring, and implementing PodDisruptionBudgets.</p><p><strong>18. What’s the difference between count and for_each in Terraform?</strong></p><p>count is used with lists and generates resources indexed by number (count.index). for_each is used with maps or sets and provides key-based control, making it more suitable for named resource creation and deletion.</p><p><strong>19. What is terraform taint, and when would you use it?</strong></p><p>terraform taint marks a resource to be destroyed and recreated on the next apply. Use it when a resource is broken or misconfigured but not detected by Terraform as needing changes.</p><pre>terraform taint aws_instance.web</pre><p><strong>20. How do you resolve circular dependencies in Terraform?</strong></p><p>Refactor your configuration to remove implicit dependencies. Use depends_on to explicitly control resource order. If necessary, split resources into multiple modules to reduce coupling.</p><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c11bb92be2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[32 DevOps & Cloud Interview Questions with Answers]]></title>
            <link>https://nidhiashtikar.medium.com/32-devops-cloud-interview-questions-with-answers-7cb47e7a33dc?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cb47e7a33dc</guid>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[interview-tips]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Wed, 09 Jul 2025 06:43:41 GMT</pubDate>
            <atom:updated>2025-07-09T06:43:41.320Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nbTwmsQLELV23MqzRllkiQ.jpeg" /></figure><p><strong>1. What is your role and responsibility in your current or previous project?</strong></p><p><strong>Answer:</strong><br> I worked as a DevOps Engineer. My tasks included managing cloud infrastructure, setting up CI/CD pipelines, using Docker and Kubernetes, writing automation scripts with Terraform, and monitoring systems. I also supported application deployments.</p><p><strong>2. What AWS services have you used in your project and how?</strong></p><p><strong>Answer:</strong><br> I used EC2 for virtual machines, S3 for storing files, RDS for databases, VPC for networking, IAM for user access control, CloudWatch for monitoring, and Lambda for serverless tasks. I managed them mostly using Terraform.</p><p><strong>3. How would you rate your Linux skills?</strong></p><p><strong>Answer:</strong><br> I would rate myself 7 or 8 out of 10. I can work well with the terminal, run system commands, write shell scripts, and handle file permissions, services, and logs.</p><p><strong>4. What are some common Linux commands you use regularly?</strong></p><p><strong>Answer:</strong><br> I use commands like ls, cd, top, ps, grep, chmod, chown, df, and journalctl. These help me manage files, check performance, find logs, and handle user permissions.</p><p><strong>5. How can you check CPU usage on a Linux system?</strong></p><p><strong>Answer:</strong><br> I use top, htop, or mpstat to check CPU usage. top shows live usage of CPU, memory, and processes. htop is more user-friendly.</p><p><strong>6. How would you find the last 5 users who logged into a Linux machine?</strong></p><p><strong>Answer:</strong><br> I can use the last command to see recent logins. To see the last 5 users, I run:<br> last -n 5</p><p><strong>7. How would you containerize an Nginx web application using Docker?</strong></p><p><strong>Answer:</strong><br> I would create a Dockerfile with nginx as the base image, copy the website files into the container, and expose port 80. Then I’d build and run the Docker container.</p><p><strong>8. You have a Node.js app on port 8081 — how would you write a Dockerfile for it?</strong></p><p><strong>Answer:</strong></p><pre>FROM node:18<br>WORKDIR /app<br>COPY . .<br>RUN npm install<br>EXPOSE 8081<br>CMD [&quot;node&quot;, &quot;index.js&quot;]</pre><p><strong>9. What is a multi-stage Dockerfile and why is it useful?</strong></p><p><strong>Answer:</strong><br> A multi-stage Dockerfile helps reduce image size. The first stage is used to build the app, and the second stage copies only the final output. Yes, we can use the second stage as the base if needed.</p><p><strong>10. Write a Dockerfile for a ReactJS application.</strong></p><p><strong>Answer:</strong></p><pre>FROM node:18 as build<br>WORKDIR /app<br>COPY . .<br>RUN npm install<br>RUN npm run build<br><br>FROM nginx:alpine<br>COPY --from=build /app/build /usr/share/nginx/html<br>EXPOSE 80<br>CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]</pre><p><strong>11. Have you worked with Kubernetes? Can you describe your experience?</strong></p><p><strong>Answer:</strong><br> Yes, I have deployed applications using Kubernetes. I created Deployments, Services, ConfigMaps, and used kubectl to manage clusters. I also worked with Helm charts and monitored pods.</p><p><strong>12. Based on a Dockerfile, how would you write a Kubernetes Deployment manifest?</strong></p><p><strong>Answer:</strong><br> I would create a YAML file with apiVersion, kind: Deployment, and define the spec with replicas, container image, ports, and labels. Then apply it using kubectl apply -f.</p><p><strong>13. What are the types of services in Kubernetes and when would you use each?</strong></p><p><strong>Answer:</strong><br> There are 4 main types:</p><ul><li>ClusterIP (default, internal access)</li><li>NodePort (exposes service on a static port on each node)</li><li>LoadBalancer (uses cloud load balancer)</li><li>ExternalName (maps service to an external DNS)</li></ul><p><strong>14. What is a headless service in Kubernetes and what’s its use case?</strong></p><p><strong>Answer:</strong><br> A headless service doesn’t have a cluster IP. It’s used when we want DNS resolution without a load balancer, such as in StatefulSets or when each pod should be accessed directly.</p><p><strong>15. A pod is stuck in a CrashLoopBackOff state — how would you troubleshoot this?</strong></p><p><strong>Answer:</strong><br> I would check logs using kubectl logs &lt;pod-name&gt;, then inspect the pod using kubectl describe pod. It usually happens due to app errors or failed dependencies.</p><p><strong>16. In a Kubernetes cluster, one ReplicaSet is not functioning properly. How would you debug it?</strong></p><p><strong>Answer:</strong><br> I would describe the ReplicaSet and its pods using kubectl describe rs &lt;name&gt;. Then check if the pods are scheduled, healthy, and if there’s any issue in the events section.</p><p><strong>17. How does a Kubernetes application communicate with the external world?</strong></p><p><strong>Answer:</strong><br> We expose the app using a Service of type LoadBalancer or NodePort. If it’s behind an Ingress controller, we use an Ingress resource for routing external traffic.</p><p><strong>18. What are the lifecycle states of an EC2 instance?</strong></p><p><strong>Answer:</strong><br> The main states are:</p><ul><li>Pending</li><li>Running</li><li>Stopping</li><li>Stopped</li><li>Shutting-down</li><li>Terminated</li></ul><p><strong>19. What is VPC Peering, and how does it work across regions or accounts?</strong></p><p><strong>Answer:</strong><br> VPC Peering connects two VPCs so they can communicate privately. It works across regions and accounts using peering connections, route tables, and proper security group rules.</p><p><strong>20. How do you connect to an EC2 instance inside a private subnet?</strong></p><p><strong>Answer:</strong><br> I use a bastion host in a public subnet. First, I connect to the bastion host using SSH, then connect to the private EC2 instance from there.</p><p><strong>21. What’s the difference between Security Groups and NACLs in AWS?</strong></p><p><strong>Answer:</strong><br> Security Groups work at the instance level and are stateful. NACLs work at the subnet level and are stateless. NACLs have separate rules for inbound and outbound traffic.</p><p><strong>22. How would you set up VPC Peering between two VPCs?</strong></p><p><strong>Answer:</strong><br> Create a VPC peering connection, accept it in the other VPC, update route tables in both VPCs, and allow traffic in security groups and NACLs.</p><p><strong>23. What is the AWS Shared Responsibility Model? Can you explain it with an example?</strong></p><p><strong>Answer:</strong><br> AWS handles security <em>of</em> the cloud (hardware, network), while we manage security <em>in</em> the cloud (data, access, configurations). For example, AWS secures the servers, but we must set up IAM roles properly.</p><p><strong>24. How does S3 manage versioning and object locking for data durability?</strong></p><p><strong>Answer:</strong><br> Versioning keeps all versions of an object. Object locking prevents deletion for a set time. These features help protect data from accidental loss or overwrite.</p><p><strong>25. How would you monitor the performance of an EC2 instance using CloudWatch?</strong></p><p><strong>Answer:</strong><br> I check metrics like CPU, disk, memory, and network usage. I also set alarms to notify when usage is too high or something goes wrong.</p><p><strong>26. How can you use CloudWatch to track application metrics on EC2?</strong></p><p><strong>Answer:</strong><br> Install and configure the CloudWatch agent. It collects logs and custom metrics like memory or app-level data. Then I view them in the CloudWatch dashboard.</p><p><strong>27. Can you write a Terraform script to provision an EC2 instance and an S3 bucket?</strong></p><p><strong>Answer:</strong><br> Yes. I define resources like aws_instance and aws_s3_bucket in Terraform, then use terraform apply to create them. I also use variables for reusability.</p><p><strong>28. Write Terraform code to create 5 EC2 instances, each with a unique name and instance type.</strong></p><p><strong>Answer:</strong></p><pre>variable &quot;instances&quot; {<br>  default = {<br>    &quot;web1&quot; = &quot;t2.micro&quot;<br>    &quot;web2&quot; = &quot;t2.small&quot;<br>    &quot;app1&quot; = &quot;t3.micro&quot;<br>    &quot;app2&quot; = &quot;t3.small&quot;<br>    &quot;db1&quot;  = &quot;t3.medium&quot;<br>  }<br>}<br><br>resource &quot;aws_instance&quot; &quot;multi&quot; {<br>  for_each = var.instances<br>  ami = &quot;ami-12345678&quot;<br>  instance_type = each.value<br>  tags = {<br>    Name = each.key<br>  }<br>}</pre><p><strong>29. What CI/CD steps do you follow during software development?</strong></p><p><strong>Answer:</strong><br> I start with code push to Git. A pipeline runs tests, builds the app, creates a Docker image, and pushes it to a registry. Then it deploys to a test or production environment.</p><p><strong>30. How do you build and push a Node.js Docker image to Docker Hub using a CI/CD pipeline?</strong></p><p><strong>Answer:</strong><br> In the pipeline, I add steps to build the Docker image using the Dockerfile, tag it, log in to Docker Hub, and push it using docker push.</p><p><strong>31. How would you connect AWS Lambda with API Gateway for serverless deployment?</strong></p><p><strong>Answer:</strong><br> I create a Lambda function and an API Gateway endpoint. Then I connect the API to the Lambda function so that HTTP requests trigger the function.</p><p><strong>32. Do you have experience working with RESTful or GraphQL APIs? How have you used them?</strong></p><p><strong>Answer:</strong><br> Yes. I’ve used REST APIs to integrate services, test them using Postman, and monitor responses. I also deployed backend services that exposed REST endpoints for frontend teams.</p><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cb47e7a33dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform Interview Question: Practical Scenarios You Must Know]]></title>
            <link>https://nidhiashtikar.medium.com/terraform-interview-question-practical-scenarios-you-must-know-f101fd83edb3?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/f101fd83edb3</guid>
            <category><![CDATA[terraform-in-devops]]></category>
            <category><![CDATA[scenario-based-question]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform-interview]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 05:11:27 GMT</pubDate>
            <atom:updated>2025-07-08T05:11:27.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GqlisTQRlgodlfhvVayurQ.jpeg" /></figure><h4><strong>1. Your Terraform state file got corrupted or deleted accidentally. How would you recover it?</strong></h4><p>Answer:</p><ul><li>For remote backends (e.g., AWS S3, Azure Blob), use versioning to restore a previous state file.</li><li>For S3:<br> aws s3api list-object-versions — bucket &lt;bucket&gt; — prefix terraform.tfstate<br> aws s3api get-object — bucket &lt;bucket&gt; — key terraform.tfstate — version-id &lt;id&gt; ./terraform.tfstate</li><li>For local backends, use the terraform.tfstate.backup file.</li><li>If no backup is available, re-import resources using terraform import and write corresponding .tf code.</li></ul><p><strong>2. Infrastructure has drifted from configuration. How do you detect and fix it?</strong></p><p>Answer:</p><ul><li>Run terraform plan to identify drift.</li><li>Run terraform apply to reconcile drift.</li><li>Use tools like driftctl or infracost for more visibility into unmanaged resources.</li></ul><p><strong>3. How do you manage sensitive data in Terraform?</strong></p><p>Answer:</p><ul><li>Use secret managers like AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault.</li><li>Avoid hardcoding secrets in code or .tfvars.</li><li>Use sensitive = true on output blocks.</li><li>Use environment variables for credentials.</li><li>Enable encryption on remote state files.</li></ul><p><strong>4. How do you handle multi-environment (dev, staging, prod) deployments in Terraform?</strong></p><p>Answer:</p><ul><li>Use separate directories or workspaces for each environment.</li><li>Maintain separate backend configs and variable files for each environment.</li><li>Example: dev.tfvars, staging.tfvars, prod.tfvars.</li><li>Alternatively, use Terraform workspaces for similar infra in different stages.</li></ul><p><strong>5. How do you reuse a Terraform module across multiple teams?</strong></p><p>Answer:</p><ul><li>Create reusable modules in a versioned Git repository or publish to Terraform Registry.</li><li>Reference them in code using source = “git::https://...&quot; with ref for versioning.</li><li>Document all input variables and outputs.</li><li>Use semantic versioning to control updates.</li></ul><p><strong>6. A bad terraform apply caused downtime. How do you roll back?</strong></p><p>Answer:</p><ul><li>Terraform doesn’t support automatic rollback.</li><li>Restore a previous version of the state from the backend if available.</li><li>Revert to a previous Git commit and apply again.</li><li>For critical systems, use blue-green deployment or canary rollout patterns.</li></ul><p><strong>7. How do you integrate Terraform into a CI/CD pipeline?</strong></p><p>Answer:</p><ul><li>Common pipeline steps:</li><li>terraform fmt</li><li>terraform init</li><li>terraform validate</li><li>terraform plan</li><li>Manual approval step</li><li>terraform apply</li><li>Use remote state for shared access.</li><li>Securely manage secrets using environment variables or vaults.</li></ul><p><strong>8. How do you optimize Terraform performance in large infrastructures?</strong></p><p>Answer:</p><ul><li>Split monolithic projects into modules.</li><li>Limit the scope of changes using targeted plans.</li><li>Avoid complex or deeply nested count and for_each.</li><li>Use provider plugin caching.</li><li>Minimize use of provisioners.</li></ul><p><strong>9. What is the difference between terraform taint and terraform destroy?</strong></p><p>Answer:</p><ul><li>terraform taint: Marks a resource to be recreated during next apply.</li><li>terraform destroy: Immediately removes a resource.</li><li>Use taint when controlled recreation is required.</li></ul><p><strong>10. How do you import existing infrastructure into Terraform?</strong></p><p>Answer:</p><ul><li>Use terraform import to associate real resources with Terraform state.</li><li>Then write matching .tf configuration for the imported resource.</li><li>Use terraform state show to understand the resource details.</li></ul><p><strong>11. How do you handle remote state locking issues?</strong></p><p>Answer:</p><ul><li>For DynamoDB (AWS): manually remove the lock entry if needed.</li><li>Use terraform force-unlock &lt;LOCK_ID&gt; to remove the lock.</li><li>Ensure CI/CD jobs handle termination cleanly to prevent stale locks.</li></ul><p><strong>12. You committed .tfstate to Git by mistake. What do you do?</strong></p><p>Answer:</p><ul><li>Remove it with git rm — cached terraform.tfstate and commit the change.</li><li>Add .tfstate, .tfstate.backup, and .terraform/ to .gitignore.</li><li>Rotate any exposed credentials.</li><li>Scan history with tools like truffleHog or git-secrets.</li></ul><p><strong>13. What are best practices for local-exec and remote-exec provisioners?</strong></p><p>Answer:</p><ul><li>Avoid unless necessary.</li><li>Scripts must be idempotent.</li><li>Use null_resource with triggers to control execution.</li><li>Prefer configuration management tools for complex logic.</li></ul><p><strong>14. How do you safely upgrade a shared module without breaking infrastructure?</strong></p><p>Answer:</p><ul><li>Pin module versions using Git refs or version tags.</li><li>Test upgrades in non-prod environments first.</li><li>Use terraform plan to review changes.</li><li>Apply changes incrementally and validate impact.</li></ul><p><strong>15. You see unexpected changes in terraform plan. How do you troubleshoot?</strong></p><p>Answer:</p><ul><li>Use terraform state show &lt;resource&gt; to inspect current state.</li><li>Run terraform refresh to sync state with actual infrastructure.</li><li>Check for dynamic values, data sources, or changed variables.</li></ul><p><strong>16. When should you use workspaces vs separate backends?</strong></p><p>Answer:</p><ul><li>Workspaces: suitable for low-complexity environments with shared config.</li><li>Separate backends: better isolation, auditability, and security for different environments.</li></ul><p><strong>17. How do you collaborate on Terraform state with a team?</strong></p><p>Answer:</p><ul><li>Use remote state backends (e.g., S3 + DynamoDB) with locking enabled.</li><li>Leverage Terraform Cloud or Enterprise for state management and team workflows.</li><li>Avoid manual state edits. Use version control and CI pipelines.</li></ul><p><strong>18. Can you implement blue-green deployments in Terraform?</strong></p><p>Answer:</p><ul><li>Yes, deploy two parallel environments (blue and green).</li><li>Use a load balancer to switch traffic between them.</li><li>After testing, destroy the old environment.</li><li>Ensure unique naming and non-overlapping resources.</li></ul><p><strong>19. terraform apply failed mid-way. What should you do?</strong></p><p>Answer:</p><ul><li>Check logs and error messages to identify the failed resource.</li><li>Fix the underlying issue.</li><li>Re-run terraform apply. Terraform continues from where it left off.</li><li>Avoid manual interventions that desync state.</li></ul><p><strong>20. How do you secure your Terraform state file?</strong></p><p>Answer:</p><ul><li>Use encrypted remote backends (e.g., S3 with SSE and KMS, Azure Blob with encryption).</li><li>Limit access via IAM or RBAC.</li><li>Avoid outputting sensitive data. Mark outputs as sensitive = true.</li><li>Never commit state files to source control.</li></ul><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f101fd83edb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python : While Loops, Infinite Loops & Functions — Hangman Project]]></title>
            <link>https://nidhiashtikar.medium.com/mastering-python-basics-while-loops-infinite-loops-functions-f0b0aa787c7e?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0b0aa787c7e</guid>
            <category><![CDATA[python-loop]]></category>
            <category><![CDATA[infinite-loop]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[while-loop-in-python]]></category>
            <category><![CDATA[functions-in-python]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 04:59:34 GMT</pubDate>
            <atom:updated>2025-07-15T07:15:36.920Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TWUdyP15wxesYY32Hdim6Q.jpeg" /></figure><h3>While Loops:</h3><p>A <strong>while loop</strong> is a way to repeat something <strong>again and again</strong> as long as a certain condition is <strong>true</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*YiGVbz7vytjelamacgUYVQ.gif" /></figure><blockquote><strong>Keep doing this task while the condition is true.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*HvE4xBpMKFrSGJODa6pteA.png" /></figure><pre>num = 1                 #Starts with count = 1<br><br>while num &lt;= 5:         #It checks: &quot;Is count less than or equal to 5?&quot;<br>    print(&quot;Hello!&quot;)     #If yes → it prints &quot;Hello&quot; and adds 1 to count<br>    num = num + 1       #This repeats until count becomes 6 (condition becomes false)<br><br>output &gt;&gt;<br>Hello!<br>Hello!<br>Hello!<br>Hello!<br>Hello!</pre><p><strong>🧠 Practice Time— </strong><em>Try it Yourself before checking the code</em></p><p>Write a while loop in Python that asks the user to enter a number.<br> Keep asking <strong>until</strong> the user enters the number 0.<br> When they enter 0, print &quot;Done!&quot;</p><pre>num = int(input(&quot;Enter the Number - &quot;))<br><br>while num != 0:<br>    num = int(input(&quot;Enter the Number - &quot;))<br>print(&quot;Done !&quot;)<br><br>output&gt;&gt;<br><br>Enter the Number - 8<br>Enter the Number - 9<br>Enter the Number - 0<br>Done !</pre><p><strong><em>Try This Now —</em></strong> Write a while loop that keeps printing <strong>&quot;Try again!&quot;</strong> until the user types the word <strong>&quot;yes&quot;</strong> (case-sensitive).</p><pre>char =  input(&quot;Enter - &quot;)<br><br>while char != &quot;yes&quot;:<br>    print(&quot;Try again!&quot; )<br>    char =  input(&quot;Enter - &quot;)<br><br>output &gt;&gt;<br>Enter - a<br>Try again!<br>Enter - cv<br>Try again!<br>Enter - yes </pre><h3><strong>Infinite loop:</strong></h3><p>An <strong>infinite loop</strong> is a loop in programming that <strong>never stops running</strong> because the condition to end it is <strong>never met</strong>.</p><pre>while 5 &gt; 2:          <br>    print(&quot;Go!&quot;) <br><br>output &gt;&gt;<br>Go!...........................................</pre><p><strong>⚠️ Be Careful!</strong></p><p>Accidentally creating infinite loops can crash your program or freeze your system. Always double-check your conditions.</p><h3>Functions:</h3><p>What are <a href="https://docs.python.org/3/library/functions.html"><strong>Built-in Functions</strong></a><strong>.</strong></p><p><strong>Built-in functions</strong> are ready-made tools in a programming language that you can use to do common tasks without making them yourself.</p><ul><li>print(&quot;Hello&quot;) → shows text on the screen</li><li>len(&quot;apple&quot;) → tells you how many letters are in the word</li></ul><h4>Defining and Calling Python Functions:</h4><p>You can create/define your own function and call it when needed</p><pre>def my_function():<br>    print(&quot;Hey!&quot;)<br><br><br>my_function()<br><br>output &gt;&gt;<br>Hey!</pre><p>Understanding <strong>while </strong>loops and functions gives you powerful tools for solving problems in Python. Whether you&#39;re building games, automating tasks.</p><h3>HangMan Project</h3><p><strong><em>Step 1 :</em></strong></p><pre>import random<br><br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br><br>#Choose random work from the list and print it <br>random_word = random.choice(words)<br>print(random_word)<br><br>#Ask user a letter and convert into lower case <br>user_letter = input(&quot;Choose a letter - &quot;).lower()<br><br>#Check if letter user choose is there in the work we randomly choose , If yes then Right if no then Wrong<br>for r in random_word:<br>    if user_letter == r:<br>        print(&quot;Right&quot;)<br>    else:<br>        print(&quot;Wrong&quot;)<br><br>output &gt;&gt;<br>rock<br>Choose a letter - c <br>Wrong<br>Wrong<br>Right<br>Wrong<br>------------<br>parrot<br>Choose a letter - A<br>Wrong<br>Right<br>Wrong<br>Wrong<br>Wrong<br>Wrong</pre><p><strong><em>Step 2:</em></strong></p><pre>import random<br><br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br>random_word = random.choice(words)<br>print(random_word)<br><br>#Instead of letter we want &quot;_&quot; blank<br>#1. How many blanks = number of letter in word ==&gt; Find the length<br><br>random_word_length = len(random_word)<br><br>#2. blank string <br>blank = &quot;&quot;<br><br>#3. Repalce range define in len with &quot;_&quot;<br>for l in range(random_word_length):<br>    blank += &quot;_&quot;<br>print(blank)    <br><br><br>user_letter = input(&quot;Choose a letter - &quot;).lower()<br><br># empty string<br>correct = &quot;&quot;<br><br>#Instead of printing right and wrong print the letter if correct , if not replace with &quot;_&quot; , <br>#All happening in a empty string.<br><br>for letter in random_word:<br>    if user_letter == letter:<br>        correct += letter<br>    else:<br>        correct += &quot;_&quot;<br><br>print(correct)<br><br>output &gt;&gt;<br><br>parrot<br>______<br>Choose a letter - r<br>__rr__</pre><p><strong><em>Step 3 :</em></strong></p><pre>import random<br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br>random_word = random.choice(words)<br>print(random_word)<br><br>random_word_length = len(random_word)<br>blank = &quot;&quot;<br>for length in range(random_word_length):<br>    blank += &quot;_&quot;<br>print(blank)    <br><br>#Set a condition for game_over <br>game_over = False<br>#while game is not over run below set of code <br>while not game_over:<br>    user_letter = input(&quot;Choose a letter - &quot;).lower()<br>    correct = &quot;&quot;<br>    for letter in random_word:<br>        if user_letter == letter:<br>            correct += letter<br>        else:<br>            correct += &quot;_&quot;<br>    print(correct)<br><br>    #game_over must be true when there are no blanks &quot;_&quot;<br>    if &quot;_&quot; not in correct:<br>            game_over = True<br>            print(&quot;You Win!&quot;)<br><br>output &gt;&gt;<br>parrot<br>______<br>Choose a letter - r<br>__rr__<br>Choose a letter - t<br>_____t<br>Choose a letter - <br><br>#Here User will never win , Lets store the letter !</pre><p><strong><em>Step 4:</em></strong></p><pre>import random<br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br>random_word = random.choice(words)<br>print(random_word)<br><br>random_word_length = len(random_word)<br>blank = &quot;&quot;<br>for length in range(random_word_length):<br>    blank += &quot;_&quot;<br>print(blank)    <br><br>game_over = False<br><br>#Create correct letter list <br>correct_letters = []<br><br>while not game_over:<br>    user_letter = input(&quot;Choose a letter - &quot;).lower()<br>    correct = &quot;&quot;<br>    for letter in random_word:<br>        if user_letter == letter:<br>            correct += letter<br>            #Here that letter which is correctly guessed by used is displayed.<br>            #I want that to be store in the list of correct_letters = []<br>            correct_letters.append(letter)<br><br>        # Condition - check if letter is in correct letter list or not     <br>        elif letter in correct_letters:<br>            #display that letter <br>            correct += letter<br><br>        else:<br>            correct += &quot;_&quot;<br>    print(correct)<br><br>    if &quot;_&quot; not in correct:<br>            game_over = True<br>            print(&quot;You Win!&quot;)<br><br>output &gt;&gt;<br><br>rock<br>____<br>Choose a letter - r<br>r___<br>Choose a letter - o<br>ro__<br>Choose a letter - j<br>ro__<br>Choose a letter - c<br>roc_<br>Choose a letter - k<br>rock<br>You Win!</pre><p><strong><em>Step 5: Adding ART for Fun</em></strong></p><pre>print(r&#39;&#39;&#39;<br> _                                             <br>| |                                            <br>| |__   __ _ _ __   __ _ _ __ ___   __ _ _ __  <br>| &#39;_ \ / _` | &#39;_ \ / _` | &#39;_ ` _ \ / _` | &#39;_ \ <br>| | | | (_| | | | | (_| | | | | | | (_| | | | |<br>|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|<br>                    __/ |                      <br>                   |___/                       <br>&#39;&#39;&#39;)<br><br>hangman = [<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br> / \  |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br> /    |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|   |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br>  |   |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br>      |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>      |<br>      |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;<br>]<br><br>import random<br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br>random_word = random.choice(words)<br><br>random_word_length = len(random_word)<br>blank = &quot;&quot;<br>for length in range(random_word_length):<br>    blank += &quot;_&quot;<br>print(blank)    <br><br>game_over = False<br>correct_letters = []<br><br>while not game_over:<br>    user_letter = input(&quot;Choose a letter - &quot;).lower()<br>    correct = &quot;&quot;<br>    for letter in random_word:<br>        if user_letter == letter:<br>            correct += letter<br>            correct_letters.append(letter)<br>        elif letter in correct_letters:<br>            correct += letter<br>        else:<br>            correct += &quot;_&quot;<br>    print(correct)<br><br>    if &quot;_&quot; not in correct:<br>            game_over = True<br>            print(&quot;You Win!&quot;)<br><br></pre><p><strong><em>Step 6:</em></strong></p><pre>print(r&#39;&#39;&#39;<br> _                                             <br>| |                                            <br>| |__   __ _ _ __   __ _ _ __ ___   __ _ _ __  <br>| &#39;_ \ / _` | &#39;_ \ / _` | &#39;_ ` _ \ / _` | &#39;_ \ <br>| | | | (_| | | | | (_| | | | | | | (_| | | | |<br>|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|<br>                    __/ |                      <br>                   |___/                       <br>&#39;&#39;&#39;)<br><br>hangman = [<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br> / \  |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br> /    |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|   |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br>  |   |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br>      |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>      |<br>      |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;<br>]<br><br>import random<br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br>random_word = random.choice(words)<br><br>random_word_length = len(random_word)<br>blank = &quot;&quot;<br>for length in range(random_word_length):<br>    blank += &quot;_&quot;<br>print(blank)    <br><br>game_over = False<br>correct_letters = []<br><br>#We have 6 lives <br>lives = 6<br><br>while not game_over:<br>    user_letter = input(&quot;Choose a letter - &quot;).lower()<br>    correct = &quot;&quot;<br>    for letter in random_word:<br>        if user_letter == letter:<br>            correct += letter<br>            correct_letters.append(letter)<br>        elif letter in correct_letters:<br>            correct += letter<br>        else:<br>            correct += &quot;_&quot;<br>    print(correct)<br><br>    #If the user giver letter is not there in random word then - <br>    if user_letter not in random_word:<br>        #Reduce the live by 1 <br>        lives -= 1<br>        #If live is 0 then game over<br>        if lives == 0:<br>            game_over = True<br>            print(&quot;GameOver!&quot;)<br><br>    if &quot;_&quot; not in correct:<br>            game_over = True<br>            print(&quot;You Win!&quot;)<br><br><br>output &gt;&gt;<br> _<br>| |<br>| |__   __ _ _ __   __ _ _ __ ___   __ _ _ __  <br>| &#39;_ \ / _` | &#39;_ \ / _` | &#39;_ ` _ \ / _` | &#39;_ \ <br>| | | | (_| | | | | (_| | | | | | | (_| | | | |<br>|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|<br>                    __/ |<br>                   |___/<br><br>____________<br>Choose a letter - p<br>__pp_p______<br>Choose a letter - k<br>__pp_p______<br>Choose a letter - s<br>__pp_p_____s<br>Choose a letter - g<br>__pp_p_____s<br>Choose a letter - t<br>__pp_p_t___s<br>Choose a letter - x<br>__pp_p_t___s<br>Choose a letter - z<br>__pp_p_t___s<br>Choose a letter - x<br>__pp_p_t___s<br>Choose a letter - a<br>__pp_p_ta__s<br>Choose a letter - d<br>__pp_p_ta__s<br>GameOver!<br></pre><p><strong><em>Step 7: Let add our art !</em></strong></p><pre>print(r&#39;&#39;&#39;<br> _                                             <br>| |                                            <br>| |__   __ _ _ __   __ _ _ __ ___   __ _ _ __  <br>| &#39;_ \ / _` | &#39;_ \ / _` | &#39;_ ` _ \ / _` | &#39;_ \ <br>| | | | (_| | | | | (_| | | | | | | (_| | | | |<br>|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|<br>                    __/ |                      <br>                   |___/                       <br>&#39;&#39;&#39;)<br><br>hangman = [<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br> / \  |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br> /    |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|\  |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br> /|   |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br>  |   |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>  O   |<br>      |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;,<br>    &quot;&quot;&quot;<br>  +---+<br>  |   |<br>      |<br>      |<br>      |<br>      |<br>=========<br>&quot;&quot;&quot;<br>]<br><br>import random<br>words = [&quot;parrot&quot;, &quot;rock&quot;, &quot;hippopotamus&quot;]<br>random_word = random.choice(words)<br><br>random_word_length = len(random_word)<br>blank = &quot;&quot;<br>for length in range(random_word_length):<br>    blank += &quot;_&quot;<br>print(blank)    <br><br>game_over = False<br>correct_letters = []<br>lives = 6<br><br>while not game_over:<br>    user_letter = input(&quot;Choose a letter - &quot;).lower()<br>    correct = &quot;&quot;<br>    for letter in random_word:<br>        if user_letter == letter:<br>            correct += letter<br>            correct_letters.append(letter)<br>        elif letter in correct_letters:<br>            correct += letter<br>        else:<br>            correct += &quot;_&quot;<br>    print(correct)<br><br>    if user_letter not in random_word:<br>        lives -= 1<br>        if lives == 0:<br>            game_over = True<br>            print(&quot;GameOver!&quot;)<br><br>    if &quot;_&quot; not in correct:<br>            game_over = True<br>            print(&quot;You Win!&quot;)<br><br>    print(hangman[lives])<br><br><br><br>output &gt;&gt;<br> _<br>| |<br>| |__   __ _ _ __   __ _ _ __ ___   __ _ _ __  <br>| &#39;_ \ / _` | &#39;_ \ / _` | &#39;_ ` _ \ / _` | &#39;_ \ <br>| | | | (_| | | | | (_| | | | | | | (_| | | | |<br>|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|<br>                    __/ |<br>                   |___/<br><br>______<br>Choose a letter - r<br>__rr__<br><br>  +---+<br>  |   |<br>      |<br>      |<br>      |<br>      |<br>=========<br><br>Choose a letter - k<br>__rr__<br><br>  +---+<br>  |   |<br>  O   |<br>      |<br>      |<br>      |<br>=========<br><br>Choose a letter - k<br>__rr__<br><br>  +---+<br>  |   |<br>  O   |<br>  |   |<br>      |<br>      |<br>=========<br><br>Choose a letter - t<br>__rr_t<br><br>  +---+<br>  |   |<br>  O   |<br>  |   |<br>      |<br>      |<br>=========<br></pre><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0b0aa787c7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 5 — Python Programming — LOOPS]]></title>
            <link>https://nidhiashtikar.medium.com/day-5-python-programming-loops-fa21a873a5ff?source=rss-848942388a25------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa21a873a5ff</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python-projects]]></category>
            <category><![CDATA[python-loop]]></category>
            <category><![CDATA[ｐｙｔｈｏｎ]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Nidhi Ashtikar]]></dc:creator>
            <pubDate>Mon, 07 Jul 2025 05:10:19 GMT</pubDate>
            <atom:updated>2025-07-07T05:10:19.715Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 5 — Python Programming — LOOPS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*050IxdZD9hNiYZzwL_0XbQ.gif" /></figure><h3>Loops:</h3><p>Loops in Python are used to execute a block of code repeatedly.</p><blockquote>A <strong>loop</strong> is a way to repeat code <strong>again and again</strong> until a condition is met.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*_gIYdqFHBpIY7jgqwj0_5w.png" /></figure><p>Python supports two main types of loops:</p><h4>for Loop</h4><p>Used when you <strong>know how many times</strong> you want to repeat something.</p><pre>for i in range(5):<br>    print(i)<br><br>👉 This prints numbers from 0 to 4.</pre><h4>while Loop</h4><p>Used when you <strong>don’t know how many times</strong>, but you want to repeat <strong>while a condition is true</strong>.</p><pre>i = 0<br>while i &lt; 5:<br>    print(i)<br>    i += 1<br><br>👉 This also prints 0 to 4.</pre><h3>Loop Controls:</h3><ul><li>break → <strong>Stops</strong> the loop early.</li><li>continue → <strong>Skips</strong> the current step, goes to next.</li><li>else → Runs <strong>after</strong> loop ends (only if no break is used).</li></ul><p><strong>Let’s start Coding from Simple:</strong></p><pre>#Real EG - <br><br>fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;] <br>for fruit in fruits:                        #Reaches each item in list<br>    print(fruit)<br><br><br>#👉 Loops through the list and prints each fruit.<br><br>output &gt;&gt;<br>apple<br>banana<br>cherry<br><br>#Explanation - <br>#We have a list <br>#so for loop assign variable to each item in the list <br><br>#1. print =&gt; fruit = apple<br>#2. print =&gt; fruit = banana <br>#3. print =&gt; fruit = cherry<br><br>#List this we get out output </pre><pre>#You can add anything to each item in the List<br><br>fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]<br>for fruit in fruits:<br>  print(&quot;I Love &quot; + fruit)<br><br>output&gt;&gt;<br><br>I Love apple<br>I Love banana<br>I Love cherry</pre><p><strong>Let’s Play with number’s now:</strong></p><pre>#Want TOTAL ==&gt; USE ==&gt; sum()<br><br>scores = [85, 92, 78, 88, 90]<br>total = sum(scores)<br>print(total)<br><br>output&gt;&gt;<br>433</pre><pre>#Use For Loop:<br><br>scores = [85, 92, 78, 88, 90]<br>total = 0<br>for s in scores:<br>    total += s<br><br>print(total)<br><br>#total is set to 0 ==&gt; But we want total of the list <br>#So s is each item in list <br>#Each time it will do ==&gt; total = total + s <br>#total = 0 +85  , now total is 85<br>#total = 85+92  , now total is 177 ... <br><br>output &gt;&gt;<br>433</pre><pre>#Want MAX No ==&gt; USE ==&gt; max()<br><br>scores = [85, 92, 78, 88, 90]<br>print(max(scores))<br><br>output &gt;&gt;<br>92<br><br>#HOW YOU WILL DO USING FOR LOOP ==?</pre><pre># Use For Loop:<br><br>scores = [85, 92, 78, 88, 90]<br>m = 0   # Start with m as 0<br><br>for s in scores:     # Look at each number in the list<br>    if s &gt; m:        # If this number is bigger than m<br>        m = s        # Change m to this number<br><br># After the loop, m is the biggest number<br><br>#Explanation ==&gt;<br># Set m which was 0 to that item 85, so m is 85<br># Next is 92 &gt; m = 85 , Yes =&gt; Now m is 92<br># Next is 78 &gt; 92 , NO (It will do nothing)<br># Next is 88 &gt; 92 , NO <br># Next is 90 &gt; 92 , NO <br># So m is 92 , which is max  <br><br>print(m)<br><br># output &gt;&gt; 92</pre><h3>For Loops and the Range() Function:</h3><p>range (a, b)</p><pre>#Range with for loop<br><br>for n in range(1, 5):<br>    print(n)<br><br>output &gt;&gt;<br>1<br>2<br>3<br>4<br><br>#It will not include the last number </pre><pre>#Can add step to range function <br><br>for n in range(1, 10, 2):<br>    print(n)<br><br>output &gt;&gt;<br><br>1<br>3<br>5<br>7<br>9</pre><p><strong>Calculates the sum of all integers from 1 to 100 and prints the result.</strong></p><pre>#1+2+3+4+5+6+7..........</pre><pre>t = 0<br>for n in range(1, 101):<br>    t += n  # t = 0 + 1  , t = 1<br>            # t = 1 + 2 , t = 3<br>            # t = 3 + 3 , t = 6<br>            # t = 6 + 4 , t = 10<br><br>print(t)<br><br>output &gt;&gt;<br>5050</pre><p><strong>Prints the numbers from 1 to 20, but replaces multiples of 3 with “NUM-3”, multiples of 5 with “NUM-5”, and multiples of both 3 and 5 with “3&amp;5”</strong></p><pre>for r in range(1, 20):<br>    if r % 3 == 0  and r % 5 == 0 : <br>        print(&quot;3&amp;5&quot;)<br>    elif r % 5 == 0 :<br>        print(&quot;NUM-5&quot;)<br>    elif r % 3 == 0 :<br>        print(&quot;NUM-3&quot;)<br>    else:<br>        print(r)<br><br>output &gt;&gt;<br>1<br>2<br>NUM-3<br>4<br>NUM-5<br>NUM-3<br>7<br>8<br>NUM-3<br>NUM-5<br>11<br>NUM-3<br>13<br>14<br>3&amp;5<br>16<br>17<br>NUM-3<br>19</pre><h3>PROJECT = Welcome to the Password Generator!</h3><p>Simple-</p><pre>import random<br>letters = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;, &#39;f&#39;, &#39;g&#39;, &#39;h&#39;, &#39;i&#39;, &#39;j&#39;, &#39;k&#39;, &#39;l&#39;, &#39;m&#39;, &#39;n&#39;, &#39;o&#39;, &#39;p&#39;, &#39;q&#39;, &#39;r&#39;, &#39;s&#39;, &#39;t&#39;, &#39;u&#39;, &#39;v&#39;, &#39;w&#39;, &#39;x&#39;, &#39;y&#39;, &#39;z&#39;, &#39;A&#39;, &#39;B&#39;, &#39;C&#39;, &#39;D&#39;, &#39;E&#39;, &#39;F&#39;, &#39;G&#39;, &#39;H&#39;, &#39;I&#39;, &#39;J&#39;, &#39;K&#39;, &#39;L&#39;, &#39;M&#39;, &#39;N&#39;, &#39;O&#39;, &#39;P&#39;, &#39;Q&#39;, &#39;R&#39;, &#39;S&#39;, &#39;T&#39;, &#39;U&#39;, &#39;V&#39;, &#39;W&#39;, &#39;X&#39;, &#39;Y&#39;, &#39;Z&#39;]<br>numbers = [&#39;0&#39;, &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, &#39;5&#39;, &#39;6&#39;, &#39;7&#39;, &#39;8&#39;, &#39;9&#39;]<br>symbols = [&#39;!&#39;, &#39;#&#39;, &#39;$&#39;, &#39;%&#39;, &#39;&amp;&#39;, &#39;(&#39;, &#39;)&#39;, &#39;*&#39;, &#39;+&#39;]<br><br>print(&quot;Welcome to the Password Generator!&quot;)<br>num = int(input(&quot;How many number you want in your password ? \n&quot;))<br>let = int(input(&quot;How many letters you want ? \n&quot;))<br>sym = int(input(&quot;How many symbols you want ? \n&quot;))<br><br>password = &quot;&quot;<br><br>for r in range(0, let):                       #each item in range of 0 to num user game<br>    password += random.choice(letters)        #password = password + random choice from list letters                             <br><br>for r in range(0, num):<br>    password += random.choice(numbers)<br><br>for r in range(0, sym):<br>    password += random.choice(symbols)<br><br>random.shuffle(password)<br>print(password)<br><br>output &gt;&gt;<br><br>Welcome to the PyPassword Generator!<br>How many number you want in your password ? <br>2<br>How many letters you want ? <br>5<br>How many symbols you want ? <br>1<br>vMoWJ10%</pre><p>Final —</p><pre>import random<br>letters = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;, &#39;d&#39;, &#39;e&#39;, &#39;f&#39;, &#39;g&#39;, &#39;h&#39;, &#39;i&#39;, &#39;j&#39;, &#39;k&#39;, &#39;l&#39;, &#39;m&#39;, &#39;n&#39;, &#39;o&#39;, &#39;p&#39;, &#39;q&#39;, &#39;r&#39;, &#39;s&#39;, &#39;t&#39;, &#39;u&#39;, &#39;v&#39;, &#39;w&#39;, &#39;x&#39;, &#39;y&#39;, &#39;z&#39;, &#39;A&#39;, &#39;B&#39;, &#39;C&#39;, &#39;D&#39;, &#39;E&#39;, &#39;F&#39;, &#39;G&#39;, &#39;H&#39;, &#39;I&#39;, &#39;J&#39;, &#39;K&#39;, &#39;L&#39;, &#39;M&#39;, &#39;N&#39;, &#39;O&#39;, &#39;P&#39;, &#39;Q&#39;, &#39;R&#39;, &#39;S&#39;, &#39;T&#39;, &#39;U&#39;, &#39;V&#39;, &#39;W&#39;, &#39;X&#39;, &#39;Y&#39;, &#39;Z&#39;]<br>numbers = [&#39;0&#39;, &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, &#39;5&#39;, &#39;6&#39;, &#39;7&#39;, &#39;8&#39;, &#39;9&#39;]<br>symbols = [&#39;!&#39;, &#39;#&#39;, &#39;$&#39;, &#39;%&#39;, &#39;&amp;&#39;, &#39;(&#39;, &#39;)&#39;, &#39;*&#39;, &#39;+&#39;]<br><br>print(&quot;Welcome to the PyPassword Generator!&quot;)<br>let = int(input(&quot;How many letters you want ? \n&quot;))<br>num = int(input(&quot;How many number you want in your password ? \n&quot;))<br>sym = int(input(&quot;How many symbols you want ? \n&quot;))<br><br>password = []<br><br>for r in range(0, let):                     #each item in range of 0 to num user game<br>    password += random.choice(letters)          #password = password + random choice from list letters                             <br><br>for r in range(0, num):<br>    password += random.choice(numbers)<br><br>for r in range(0, sym):<br>    password += random.choice(symbols)<br><br>random.shuffle(password)                  #suffling password (list)<br>print(password)<br><br>#turn back into string <br><br>passw = &quot;&quot;<br>for c in password:<br>    passw += c<br><br>print(f&quot;Your password is {passw}&quot;)<br><br>output &gt;&gt;<br>Welcome to the PyPassword Generator!<br>How many letters you want ? <br>5<br>How many number you want in your password ? <br>2<br>How many symbols you want ? <br>1<br>[&#39;8&#39;, &#39;m&#39;, &#39;F&#39;, &#39;b&#39;, &#39;B&#39;, &#39;b&#39;, &#39;&amp;&#39;, &#39;8&#39;]<br>Your password is 8mFbBb&amp;8</pre><h3>If you found this guide helpful then do click on 👏 the button.</h3><p>Follow for more <strong>Learning </strong>like this 😊</p><p>Let’s connect! <a href="http://linkedin.com/in/nidhi-ashtikar">Find me on LinkedIn</a>.</p><p>If there’s a <strong>specific topic </strong>you’re curious about, feel free to drop a personal note or comment — I’m here to help you explore whatever interests you!</p><blockquote><em>If you’re interested in joining AWS classes, don’t hesitate to contact me at:</em><strong><em> nashtikar2@gmail.com</em></strong></blockquote><h3>Thanks for spending your valuable time learning to enhance your knowledge!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa21a873a5ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>