<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8805403795653453599</id><updated>2026-08-24T09:43:05.511-07:00</updated><category term="Select all tables and row count"/><category term="interview questions"/><category term="perl interview"/><category term="testing"/><category term="testing interview"/><category term="#freshers"/><category term=".NET Assemblies"/><category term=".Net 3.5"/><category term="API"/><category term="Advanced perl programming"/><category term="Copy one database to another database"/><category term="Create Non Clustered Index"/><category term="DELETE and TRUNCATE can be rolled back"/><category term="Data type size of variable and column in sql"/><category term="Debug.writeline"/><category term="Error-String or Binary data"/><category term="F2F interview"/><category term="Find duplicate rows in a table"/><category term="IDENTITY_INSERT"/><category term="LINQ"/><category term="Looping through list in SQL"/><category term="Puzzles"/><category term="Puzzles asked in interview"/><category term="REST API"/><category term="Repeat the value using Replicate"/><category term="SQL Server - Simple Cursor Example"/><category term="SQL Server- Syntax to create simple table"/><category term="SQL query performance"/><category term="Shrink Database log files in SQL Server 2008"/><category term="TRANSACTION and Error Handling"/><category term="Transports in Windows Communication Foundation"/><category term="Types of Triggers and Creating Triggers"/><category term="WCF Services"/><category term="Windows &#xa;debugging"/><category term="advanced perl"/><category term="app performance"/><category term="debug"/><category term="interview"/><category term="networking"/><category term="performance issue"/><category term="perl"/><category term="perl cheat sheet"/><category term="perl developer"/><category term="perl interview questions"/><category term="perl notes"/><category term="perl qa"/><category term="python automation"/><category term="python code"/><category term="python exercise"/><category term="python interview programs"/><category term="python interview questions"/><category term="python program"/><category term="python programs"/><category term="python qa"/><category term="sdet"/><category term="selenium interview"/><category term="shell interview"/><category term="shell script"/><category term="shell tips"/><category term="sql"/><category term="types of testing"/><category term="unix interview"/><category term="unix intreview questions"/><category term="unix tips"/><category term="unix tips and tricks"/><category term="unix tricks"/><title type='text'>Ok-Guru</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-7283633037213269647</id><published>2024-02-28T02:29:00.000-08:00</published><updated>2024-02-28T06:00:45.314-08:00</updated><title type='text'>aws</title><content type='html'>&lt;p&gt;IAM&lt;/p&gt;&lt;p&gt;&amp;nbsp;Amazon Identity and Access Management (IAM) is a web service offered by Amazon Web Services (AWS) that enables you to securely control access to AWS services and resources. IAM allows you to manage users, groups, roles, and their permissions in a flexible and fine-grained manner. Here are the key components and concepts of IAM:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Users:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IAM users represent individual people, services, or applications that interact with AWS resources.&lt;/p&gt;&lt;p&gt;Each user has a unique username and security credentials (access key ID and secret access key) to make programmatic calls to AWS services.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating a new user named &quot;JohnDoe&quot; with programmatic access.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws iam create-user --user-name JohnDoe&lt;/p&gt;&lt;p&gt;Groups:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Groups are collections of IAM users. You can attach policies to groups, and all users in the group inherit those policies.&lt;/p&gt;&lt;p&gt;This helps in managing permissions at scale, especially when multiple users need similar access rights.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating a group named &quot;Developers&quot; and adding the user &quot;JohnDoe&quot; to it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws iam create-group --group-name Developers&lt;/p&gt;&lt;p&gt;aws iam add-user-to-group --group-name Developers --user-name JohnDoe&lt;/p&gt;&lt;p&gt;Roles:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IAM roles are similar to users, but they are not associated with a specific person. Instead, they are assumed by entities such as AWS services, EC2 instances, or applications.&lt;/p&gt;&lt;p&gt;Roles define a set of permissions that determine what actions can be performed on which AWS resources.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating a role named &quot;S3ReadOnlyRole&quot; with permissions to read objects from an S3 bucket.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws iam create-role --role-name S3ReadOnlyRole --assume-role-policy-document file://trust-policy.json&lt;/p&gt;&lt;p&gt;Contents of trust-policy.json:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;json&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Version&quot;: &quot;2012-10-17&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Statement&quot;: [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Effect&quot;: &quot;Allow&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Principal&quot;: {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Service&quot;: &quot;ec2.amazonaws.com&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Action&quot;: &quot;sts:AssumeRole&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; ]&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;Policies:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IAM policies are JSON documents that define permissions. Policies can be attached to users, groups, or roles.&lt;/p&gt;&lt;p&gt;Policies specify the actions allowed or denied on resources and the conditions under which those actions are allowed or denied.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Attaching a policy to a group to grant read-only access to an S3 bucket.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess --group-name Developers&lt;/p&gt;&lt;p&gt;Access Control Lists (ACLs) and Bucket Policies:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Apart from IAM policies, S3 buckets have their own access control mechanisms, including ACLs and bucket policies.&lt;/p&gt;&lt;p&gt;ACLs and bucket policies define who can access objects within a bucket and under what conditions.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Configuring an S3 bucket policy to allow public read access to all objects.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;json&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Version&quot;: &quot;2012-10-17&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Statement&quot;: [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Effect&quot;: &quot;Allow&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Principal&quot;: &quot;*&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Action&quot;: &quot;s3:GetObject&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Resource&quot;: &quot;arn:aws:s3:::your-bucket-name/*&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; ]&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;These are just basic examples to illustrate the concepts. In practice, IAM is a powerful and flexible system that allows you to manage access to AWS resources in a granular way, ensuring security and compliance for your applications and services.&lt;/p&gt;&lt;p&gt;***********************************************************************8&lt;/p&gt;&lt;p&gt;Amazon Elastic Compute Cloud (Amazon EC2) is a web service provided by Amazon Web Services (AWS) that allows users to rent virtual servers in the cloud. EC2 instances provide scalable computing capacity and can be configured with various specifications to meet different application requirements. Here are the key aspects of Amazon EC2:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Instances:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EC2 instances are virtual servers that run on physical hardware within AWS&#39;s data centers.&lt;/p&gt;&lt;p&gt;Users can choose from a wide range of instance types with varying CPU, memory, storage, and networking capacities.&lt;/p&gt;&lt;p&gt;Examples of instance types include t2.micro, m5.large, c5.xlarge, etc.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Launching an EC2 instance using the AWS Management Console:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Amazon Machine Images (AMIs):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;AMIs are pre-configured templates that contain the necessary information to launch an instance, including the operating system, application server, and applications.&lt;/p&gt;&lt;p&gt;Users can use public AMIs provided by AWS, create their own custom AMIs, or use AMIs shared by the community.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating a custom AMI based on an existing EC2 instance.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws ec2 create-image --instance-id i-1234567890abcdef0 --name &quot;My server&quot; --description &quot;An AMI for my server&quot;&lt;/p&gt;&lt;p&gt;Key Pairs:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EC2 instances use key pairs for secure login. When an instance is launched, users specify a key pair, and the corresponding private key is used to authenticate and log in to the instance.&lt;/p&gt;&lt;p&gt;Windows instances use a password instead of key pairs.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating a key pair using the AWS CLI:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws ec2 create-key-pair --key-name MyKeyPair&lt;/p&gt;&lt;p&gt;Security Groups:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Security groups act as virtual firewalls for EC2 instances, controlling inbound and outbound traffic.&lt;/p&gt;&lt;p&gt;Users can define rules for allowing or denying specific types of traffic to and from instances.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating a security group allowing SSH (port 22) and HTTP (port 80) traffic.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws ec2 create-security-group --group-name MySecurityGroup --description &quot;My security group&quot;&lt;/p&gt;&lt;p&gt;aws ec2 authorize-security-group-ingress --group-name MySecurityGroup --protocol tcp --port 22 --cidr 0.0.0.0/0&lt;/p&gt;&lt;p&gt;aws ec2 authorize-security-group-ingress --group-name MySecurityGroup --protocol tcp --port 80 --cidr 0.0.0.0/0&lt;/p&gt;&lt;p&gt;Elastic Load Balancing:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Elastic Load Balancing (ELB) distributes incoming application traffic across multiple EC2 instances to ensure no single instance is overwhelmed.&lt;/p&gt;&lt;p&gt;ELB improves the availability and fault tolerance of applications.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating an Application Load Balancer using the AWS CLI.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws elbv2 create-load-balancer --name MyLoadBalancer --subnets subnet-0123456789abcdef0 subnet-0123456789abcdef1 --security-groups sg-0123456789abcdef0&lt;/p&gt;&lt;p&gt;Auto Scaling:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Auto Scaling allows users to automatically adjust the number of EC2 instances in a group based on demand or a defined schedule.&lt;/p&gt;&lt;p&gt;It helps ensure that the desired number of instances are running to handle the application load.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating an Auto Scaling group to maintain a desired capacity of EC2 instances.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws autoscaling create-auto-scaling-group --auto-scaling-group-name MyAutoScalingGroup --launch-configuration-name MyLaunchConfig --min-size 2 --max-size 5 --desired-capacity 3 --vpc-zone-identifier subnet-0123456789abcdef0 subnet-0123456789abcdef1&lt;/p&gt;&lt;p&gt;Storage Options:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EC2 instances can use various types of storage, including Amazon Elastic Block Store (EBS) volumes and instance store volumes.&lt;/p&gt;&lt;p&gt;EBS volumes provide persistent block-level storage, while instance store volumes are temporary storage associated with the EC2 instance.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating an EBS volume and attaching it to an EC2 instance.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws ec2 create-volume --availability-zone us-east-1a --size 50&lt;/p&gt;&lt;p&gt;aws ec2 attach-volume --volume-id vol-049df61146d4d7901 --instance-id i-0c3d6f99bbEXAMPLE --device /dev/sdf&lt;/p&gt;&lt;p&gt;These are just some of the key features and concepts related to Amazon EC2. EC2 provides a flexible and scalable infrastructure for running virtual servers in the cloud, making it a foundational service for many applications and workloads on AWS.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;******************************************************************9&lt;/p&gt;&lt;p&gt;Amazon Simple Storage Service (Amazon S3) is a scalable object storage service provided by Amazon Web Services (AWS). It is designed to store and retrieve any amount of data from anywhere on the web. Here are the key aspects of Amazon S3:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Objects and Buckets:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In S3, data is organized into containers called &quot;buckets.&quot; Buckets are like top-level directories and must have a globally unique name within S3.&lt;/p&gt;&lt;p&gt;Within each bucket, data is stored as objects. An object consists of data, a key (unique within the bucket), and metadata.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Creating an S3 bucket using the AWS Management Console:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Storage Classes:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Amazon S3 offers different storage classes to meet various performance and cost requirements. These include Standard, Intelligent-Tiering, Standard-IA (Infrequent Access), One Zone-IA, Glacier (for archival), and Glacier Deep Archive.&lt;/p&gt;&lt;p&gt;Users can choose the appropriate storage class based on the access frequency and durability requirements of their data.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Setting the storage class of an object to &quot;Intelligent-Tiering&quot; using the AWS CLI:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws s3 cp my-file.txt s3://my-bucket/ --storage-class INTELLIGENT_TIERING&lt;/p&gt;&lt;p&gt;Data Transfer Acceleration:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;S3 Transfer Acceleration uses the CloudFront global content delivery network to accelerate uploading and downloading of objects to and from S3.&lt;/p&gt;&lt;p&gt;It is especially useful for large-scale data transfers or when accessing S3 from locations far from the AWS region where the bucket is stored.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Enabling Transfer Acceleration for an S3 bucket using the AWS CLI:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws s3api put-bucket-accelerate-configuration --bucket my-bucket --accelerate-configuration Status=Enabled&lt;/p&gt;&lt;p&gt;Versioning:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;S3 provides versioning, allowing users to preserve, retrieve, and restore every version of every object stored in a bucket.&lt;/p&gt;&lt;p&gt;Versioning helps protect against accidental deletion or overwriting of objects.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Enabling versioning for an S3 bucket using the AWS Management Console:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Access Control and Permissions:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;S3 allows users to control access to their buckets and objects using bucket policies, Access Control Lists (ACLs), and Identity and Access Management (IAM) policies.&lt;/p&gt;&lt;p&gt;Fine-grained access permissions can be defined based on factors such as the requester&#39;s identity, IP address, or time of day.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Configuring a bucket policy to grant public read access to all objects in the bucket:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;json&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Version&quot;: &quot;2012-10-17&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Statement&quot;: [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Effect&quot;: &quot;Allow&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Principal&quot;: &quot;*&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Action&quot;: &quot;s3:GetObject&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Resource&quot;: &quot;arn:aws:s3:::my-bucket/*&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; ]&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;Events and Triggers:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;S3 supports event notifications, allowing users to trigger actions (such as invoking AWS Lambda functions or SQS messages) when specific events occur in their buckets.&lt;/p&gt;&lt;p&gt;Events include object creation, deletion, and restoration.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Configuring an S3 bucket to send a notification to an SNS topic when a new object is created:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bash&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;aws s3api put-bucket-notification-configuration --bucket my-bucket --notification-configuration file://notification-config.json&lt;/p&gt;&lt;p&gt;Contents of notification-config.json:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;json&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;TopicConfigurations&quot;: [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Id&quot;: &quot;s3-object-created&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;TopicArn&quot;: &quot;arn:aws:sns:us-east-1:123456789012:my-sns-topic&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Events&quot;: [&quot;s3:ObjectCreated:*&quot;]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; ]&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;Data Lifecycle Management:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;S3 provides features for managing the lifecycle of objects, including transitioning objects between storage classes, setting expiration policies, and automatically deleting objects after a specified period.&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Configuring a lifecycle policy to transition objects to the &quot;Glacier&quot; storage class after 30 days:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;json&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &quot;Rules&quot;: [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Status&quot;: &quot;Enabled&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Prefix&quot;: &quot;&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Transitions&quot;: [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Days&quot;: 30,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;StorageClass&quot;: &quot;GLACIER&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; ]&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;Amazon S3 is a highly durable and available object storage service that is widely used for various purposes, including data backup, archival, data lakes, and serving static assets for web applications. Its simple and scalable architecture makes it a fundamental component of many cloud-based solutions.&lt;/p&gt;&lt;p&gt;***************************************************************************8&lt;/p&gt;&lt;p&gt;Certainly! Amazon Virtual Private Cloud (VPC) is a service provided by Amazon Web Services (AWS) that allows you to create a logically isolated section of the AWS Cloud where you can launch resources in a virtual network that you define. When setting up a VPC, you often structure it with public and private subnets, along with route tables, gateways, and Network Address Translation (NAT) devices. Let&#39;s break down each component:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;VPC (Virtual Private Cloud):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A VPC is the fundamental building block of your network in AWS. It allows you to provision a logically isolated section of the AWS Cloud where you can launch AWS resources.&lt;/p&gt;&lt;p&gt;You have control over your VPC&#39;s IP address range, subnets, route tables, and network gateways.&lt;/p&gt;&lt;p&gt;Subnets:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Subnets are subdivisions of your VPC&#39;s IP address range. You can create public and private subnets based on your needs.&lt;/p&gt;&lt;p&gt;Public Subnet: Typically used for resources that need to be directly accessible from the internet, such as web servers. It has a route to the internet.&lt;/p&gt;&lt;p&gt;Private Subnet: Used for resources that should not be directly accessible from the internet, such as databases or application servers. It does not have a route to the internet.&lt;/p&gt;&lt;p&gt;Route Tables:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A route table contains a set of rules, called routes, that are used to determine where network traffic is directed.&lt;/p&gt;&lt;p&gt;Each subnet in your VPC must be associated with a route table. This controls the traffic leaving the subnet.&lt;/p&gt;&lt;p&gt;Internet Gateway:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An Internet Gateway (IGW) is a horizontally scaled, redundant, and highly available VPC component that allows communication between instances in your VPC and the internet.&lt;/p&gt;&lt;p&gt;Typically, a public subnet is associated with an Internet Gateway to enable direct internet access for resources within that subnet.&lt;/p&gt;&lt;p&gt;NAT Gateway or NAT Instance:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;NAT allows instances in a private subnet to initiate outbound traffic to the internet while preventing inbound traffic from initiating a connection with those instances.&lt;/p&gt;&lt;p&gt;There are two types of NAT:&lt;/p&gt;&lt;p&gt;NAT Gateway: A managed AWS service that provides better availability and automatically scales based on your needs.&lt;/p&gt;&lt;p&gt;NAT Instance: A manually configured EC2 instance that you set up as a NAT device.&lt;/p&gt;&lt;p&gt;Here&#39;s a simplified flow:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Instances in the public subnet can communicate directly with the internet via the Internet Gateway.&lt;/p&gt;&lt;p&gt;Instances in the private subnet can initiate outbound connections to the internet using a NAT Gateway or NAT Instance, but they don&#39;t accept incoming connections initiated from the internet.&lt;/p&gt;&lt;p&gt;This architecture provides security by restricting direct internet access to resources in the private subnet while allowing necessary communication for resources in the public subnet.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Certainly! Let&#39;s expand on the previous explanation and include an Application Load Balancer (ALB) in the architecture:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Amazon Virtual Private Cloud (VPC):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A VPC is a logically isolated section of the AWS Cloud where you can launch AWS resources. It provides you with control over your network environment, including IP address range, subnets, route tables, and gateways.&lt;/p&gt;&lt;p&gt;Subnets:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Subnets are divisions of your VPC&#39;s IP address range. You can create public and private subnets to organize your resources.&lt;/p&gt;&lt;p&gt;Public Subnet: Typically used for resources that need to be directly accessible from the internet, such as web servers. It has a route to the internet.&lt;/p&gt;&lt;p&gt;Private Subnet: Used for resources that should not be directly accessible from the internet, such as databases or application servers. It does not have a route to the internet.&lt;/p&gt;&lt;p&gt;Route Tables:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;A route table contains a set of rules, or routes, that are used to determine where network traffic is directed.&lt;/p&gt;&lt;p&gt;Each subnet in your VPC must be associated with a route table. This controls the traffic leaving the subnet.&lt;/p&gt;&lt;p&gt;Internet Gateway (IGW):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An Internet Gateway is a horizontally scaled, redundant component that allows communication between instances in your VPC and the internet.&lt;/p&gt;&lt;p&gt;Typically, a public subnet is associated with an Internet Gateway to enable direct internet access for resources within that subnet.&lt;/p&gt;&lt;p&gt;Network Address Translation (NAT):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;NAT allows instances in a private subnet to initiate outbound traffic to the internet while preventing inbound traffic initiated from the internet.&lt;/p&gt;&lt;p&gt;Two types of NAT:&lt;/p&gt;&lt;p&gt;NAT Gateway: A managed AWS service that provides better availability and scales automatically.&lt;/p&gt;&lt;p&gt;NAT Instance: A manually configured EC2 instance that serves as a NAT device.&lt;/p&gt;&lt;p&gt;Application Load Balancer (ALB):&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An Application Load Balancer is a service that automatically distributes incoming application traffic across multiple targets, such as EC2 instances, in one or more availability zones.&lt;/p&gt;&lt;p&gt;ALB operates at the application layer, making it well-suited for applications that require flexibility in routing requests.&lt;/p&gt;&lt;p&gt;Typically, the ALB is placed in the public subnet to distribute incoming web traffic to instances in the private subnet.&lt;/p&gt;&lt;p&gt;Flow of Traffic:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Public Subnet:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Instances in the public subnet, such as web servers, can communicate directly with the internet via the associated Internet Gateway.&lt;/p&gt;&lt;p&gt;An Application Load Balancer in the public subnet receives incoming traffic from the internet and distributes it to the backend instances.&lt;/p&gt;&lt;p&gt;Private Subnet:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Instances in the private subnet do not have direct internet access.&lt;/p&gt;&lt;p&gt;Outbound traffic from instances in the private subnet is routed through a NAT Gateway or NAT Instance to reach the internet.&lt;/p&gt;&lt;p&gt;This architecture ensures that resources in the private subnet are protected from direct internet exposure, while still allowing them to communicate with the internet for necessary updates and external services through the NAT gateway or NAT instance. The ALB in the public subnet handles incoming web traffic and distributes it to the appropriate instances in the private subnet.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 0px 0px 1.25em; white-space-collapse: preserve;&quot;&gt;I can describe the architecture visually, but I can&#39;t draw diagrams directly. However, I can provide you with a text-based representation of the architecture. You can use this as a guide to create a diagram using drawing tools or on paper.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 0px 0px 1.25em; white-space-collapse: preserve;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; class=&quot;placeholder&quot; height=&quot;480&quot; id=&quot;fb75d36477917&quot; src=&quot;https://www.blogger.com/img/transparent.gif&quot; style=&quot;background-color: #d8d8d8; background-image: url(&#39;https://fonts.gstatic.com/s/i/materialiconsextended/insert_photo/v6/grey600-24dp/1x/baseline_insert_photo_grey600_24dp.png&#39;); background-position: center; background-repeat: no-repeat; opacity: 0.6;&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;Explanation:&lt;/p&gt;&lt;ul style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;&quot;&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;The VPC encompasses the entire architecture.&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;Within the VPC, there are two subnets: a public subnet and a private subnet.&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;The public subnet contains an Internet Gateway (IGW) and an Application Load Balancer (ALB).&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; display: block; margin: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;The private subnet contains a NAT Gateway for outbound internet access and instances that need to be protected from direct internet exposure.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;Arrows indicating the flow of traffic might be added between components as needed. Remember to adapt this representation based on your specific IP addressing, availability zones, and any additional components or services you may have in your architecture.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/7283633037213269647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2024/02/iam-identity-and-access-management-iam.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/7283633037213269647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/7283633037213269647'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2024/02/iam-identity-and-access-management-iam.html' title='aws'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-4911875964576098052</id><published>2024-02-21T06:28:00.000-08:00</published><updated>2024-02-21T06:28:40.245-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="app performance"/><category scheme="http://www.blogger.com/atom/ns#" term="debug"/><category scheme="http://www.blogger.com/atom/ns#" term="interview questions"/><category scheme="http://www.blogger.com/atom/ns#" term="performance issue"/><title type='text'>How to debug application performance issues</title><content type='html'>&lt;p&gt;&amp;nbsp;Diagnosing and debugging performance issues in applications can involve various steps and tools. Here&#39;s a general guide on how to check and debug low application performance:&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Monitor Resources:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Use monitoring tools like AWS CloudWatch, Prometheus, or other application performance monitoring (APM) tools to track metrics such as CPU usage, memory utilization, disk I/O, and network activity.&lt;/p&gt;&lt;p&gt;Identify any resource bottlenecks that could be affecting performance.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Review Logs:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Check application logs for error messages, warnings, or any unusual behavior.&lt;/p&gt;&lt;p&gt;Utilize logging services like CloudWatch Logs, ELK Stack (Elasticsearch, Logstash, Kibana), or centralized logging systems to aggregate and analyze logs.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Profiling:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Use profiling tools to analyze the runtime behavior of your application. Tools like AWS X-Ray, New Relic, or YourKit can help identify performance bottlenecks in code.&lt;/p&gt;&lt;p&gt;Profiling helps pinpoint areas of the code that consume the most resources or time.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Database Performance:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Examine database queries and their execution times. Use database monitoring tools to identify slow queries.&lt;/p&gt;&lt;p&gt;Optimize database indexes and query structures for better performance.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Network Latency:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Check for network issues using tools like traceroute or ping to identify latency or packet loss.&lt;/p&gt;&lt;p&gt;Utilize distributed tracing tools to analyze network interactions within microservices.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Caching and Content Delivery:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Implement caching mechanisms to reduce the load on backend systems.&lt;/p&gt;&lt;p&gt;Use Content Delivery Networks (CDNs) to distribute static content and improve response times.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Load Testing:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Conduct load tests to simulate various user scenarios and identify how the application performs under different levels of load.&lt;/p&gt;&lt;p&gt;Tools like Apache JMeter or locust can be used for load testing.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Code Review:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Review the application code for performance bottlenecks, inefficient algorithms, or suboptimal database queries.&lt;/p&gt;&lt;p&gt;Consider code profiling and optimization techniques.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Infrastructure Scaling:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Evaluate if the application infrastructure (e.g., EC2 instances, containers) is appropriately sized. Consider scaling horizontally or vertically based on requirements.&lt;/p&gt;&lt;p&gt;Utilize auto-scaling features to dynamically adjust resources based on demand.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Security Considerations:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Ensure that security measures, such as firewalls and authentication mechanisms, are not causing unnecessary overhead.&lt;/p&gt;&lt;p&gt;Audit for security vulnerabilities that might impact performance.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Browser Performance:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Analyze frontend performance using browser developer tools to identify slow-loading resources, excessive DOM manipulations, or rendering issues.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Continuous Monitoring:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Implement continuous monitoring and alerting to receive notifications when performance metrics deviate from normal ranges.&lt;/p&gt;&lt;p&gt;Establish baseline performance metrics for comparison.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/4911875964576098052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2024/02/how-to-debug-application-performance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/4911875964576098052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/4911875964576098052'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2024/02/how-to-debug-application-performance.html' title='How to debug application performance issues'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-8532135231918190072</id><published>2023-10-10T07:24:00.002-07:00</published><updated>2023-10-10T07:52:31.786-07:00</updated><title type='text'>Python string</title><content type='html'>&lt;p&gt;&amp;nbsp;Python provides a wide range of built-in functions and methods for working with strings. Here is a list of some commonly used string functions and methods:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;len(): Returns the length of the string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;length = len(s)&amp;nbsp; # length is 13&lt;/p&gt;&lt;p&gt;str(): Converts a value to a string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;num = 42&lt;/p&gt;&lt;p&gt;s = str(num)&amp;nbsp; # s is &quot;42&quot;&lt;/p&gt;&lt;p&gt;concatenation: Combining strings using the + operator.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s1 = &quot;Hello&quot;&lt;/p&gt;&lt;p&gt;s2 = &quot;World&quot;&lt;/p&gt;&lt;p&gt;s3 = s1 + &quot;, &quot; + s2&amp;nbsp; # s3 is &quot;Hello, World&quot;&lt;/p&gt;&lt;p&gt;format(): Format a string using placeholders.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;name = &quot;Alice&quot;&lt;/p&gt;&lt;p&gt;age = 30&lt;/p&gt;&lt;p&gt;s = &quot;My name is {} and I am {} years old.&quot;.format(name, age)&lt;/p&gt;&lt;p&gt;f-strings (formatted string literals): A more concise way to format strings using f-strings (Python 3.6+).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;name = &quot;Alice&quot;&lt;/p&gt;&lt;p&gt;age = 30&lt;/p&gt;&lt;p&gt;s = f&quot;My name is {name} and I am {age} years old.&quot;&lt;/p&gt;&lt;p&gt;strip(): Removes leading and trailing whitespace.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;&amp;nbsp; &amp;nbsp;Hello, World!&amp;nbsp; &amp;nbsp;&quot;&lt;/p&gt;&lt;p&gt;s = s.strip()&amp;nbsp; # s is now &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;split(): Splits a string into a list based on a delimiter.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;apple,banana,cherry&quot;&lt;/p&gt;&lt;p&gt;fruits = s.split(&quot;,&quot;)&amp;nbsp; # fruits is [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]&lt;/p&gt;&lt;p&gt;join(): Joins a list of strings into a single string using a delimiter.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]&lt;/p&gt;&lt;p&gt;s = &quot;,&quot;.join(fruits)&amp;nbsp; # s is &quot;apple,banana,cherry&quot;&lt;/p&gt;&lt;p&gt;find(): Searches for a substring and returns its index or -1 if not found.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;index = s.find(&quot;World&quot;)&amp;nbsp; # index is 7&lt;/p&gt;&lt;p&gt;replace(): Replaces all occurrences of a substring with another string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;new_s = s.replace(&quot;World&quot;, &quot;Python&quot;)&amp;nbsp; # new_s is &quot;Hello, Python!&quot;&lt;/p&gt;&lt;p&gt;upper(): Converts all characters to uppercase.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;upper_s = s.upper()&amp;nbsp; # upper_s is &quot;HELLO, WORLD!&quot;&lt;/p&gt;&lt;p&gt;lower(): Converts all characters to lowercase.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;lower_s = s.lower()&amp;nbsp; # lower_s is &quot;hello, world!&quot;&lt;/p&gt;&lt;p&gt;startswith() and endswith(): Checks if a string starts or ends with a specified substring.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;starts_with = s.startswith(&quot;Hello&quot;)&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;ends_with = s.endswith(&quot;World&quot;)&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;count(): Counts the number of occurrences of a substring in a string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;count = s.count(&quot;l&quot;)&amp;nbsp; # count is 3&lt;/p&gt;&lt;p&gt;isalpha(), isdigit(), isalnum(): Check if the string consists of alphabetic characters, digits, or alphanumeric characters.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s1 = &quot;Hello&quot;&lt;/p&gt;&lt;p&gt;s2 = &quot;123&quot;&lt;/p&gt;&lt;p&gt;s3 = &quot;Hello123&quot;&lt;/p&gt;&lt;p&gt;is_alpha = s1.isalpha()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;is_digit = s2.isdigit()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;is_alnum = s3.isalnum()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;isupper() and islower(): Check if all characters in the string are uppercase or lowercase, respectively.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s1 = &quot;HELLO&quot;&lt;/p&gt;&lt;p&gt;s2 = &quot;world&quot;&lt;/p&gt;&lt;p&gt;is_upper = s1.isupper()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;is_lower = s2.islower()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;capitalize(): Converts the first character of the string to uppercase and the rest to lowercase.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;hello world&quot;&lt;/p&gt;&lt;p&gt;capitalized_s = s.capitalize()&amp;nbsp; # &quot;Hello world&quot;&lt;/p&gt;&lt;p&gt;title(): Converts the first character of each word in the string to uppercase.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;hello world&quot;&lt;/p&gt;&lt;p&gt;title_s = s.title()&amp;nbsp; # &quot;Hello World&quot;&lt;/p&gt;&lt;p&gt;swapcase(): Swaps the case of all characters in the string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;swapped_s = s.swapcase()&amp;nbsp; # &quot;hELLO, wORLD!&quot;&lt;/p&gt;&lt;p&gt;isnumeric() and isdecimal(): Check if all characters in the string are numeric or decimal digits, respectively.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s1 = &quot;12345&quot;&lt;/p&gt;&lt;p&gt;s2 = &quot;12.34&quot;&lt;/p&gt;&lt;p&gt;is_numeric = s1.isnumeric()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;is_decimal = s2.isdecimal()&amp;nbsp; # False&lt;/p&gt;&lt;p&gt;isprintable(): Check if all characters in the string are printable (e.g., not control characters).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;is_printable = s.isprintable()&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;zfill(): Pads the string with zeros on the left until it reaches a specified width.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;42&quot;&lt;/p&gt;&lt;p&gt;padded_s = s.zfill(5)&amp;nbsp; # &quot;00042&quot;&lt;/p&gt;&lt;p&gt;rjust() and ljust(): Right-justifies or left-justifies the string within a specified width, padding with a specified character.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;42&quot;&lt;/p&gt;&lt;p&gt;rjust_s = s.rjust(5, &quot;0&quot;)&amp;nbsp; # &quot;00042&quot;&lt;/p&gt;&lt;p&gt;ljust_s = s.ljust(5, &quot;0&quot;)&amp;nbsp; # &quot;42000&quot;&lt;/p&gt;&lt;p&gt;center(): Centers the string within a specified width, padding with a specified character.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;42&quot;&lt;/p&gt;&lt;p&gt;centered_s = s.center(5, &quot;0&quot;)&amp;nbsp; # &quot;00420&quot;&lt;/p&gt;&lt;p&gt;encode(): Encodes the string into bytes using a specified encoding.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;encoded_bytes = s.encode(&quot;utf-8&quot;)&lt;/p&gt;&lt;p&gt;startswith() and endswith(): Check if a string starts or ends with a specified substring.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;s = &quot;Hello, World!&quot;&lt;/p&gt;&lt;p&gt;starts_with = s.startswith(&quot;Hello&quot;)&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;ends_with = s.endswith(&quot;World&quot;)&amp;nbsp; # True&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;commonly asked python string interview questions with answer&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ChatGPT&lt;/p&gt;&lt;p&gt;Certainly! Here are some commonly asked Python string interview questions along with their answers:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Reverse a String:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to reverse a string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def reverse_string(input_str):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return input_str[::-1]&lt;/p&gt;&lt;p&gt;Check for Palindrome:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to check if a string is a palindrome.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def is_palindrome(input_str):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return input_str == input_str[::-1]&lt;/p&gt;&lt;p&gt;Count Occurrences:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to count the occurrences of a substring in a given string.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def count_substring_occurrences(input_str, substring):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return input_str.count(substring)&lt;/p&gt;&lt;p&gt;Anagram Detection:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to check if two strings are anagrams of each other.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def are_anagrams(str1, str2):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return sorted(str1) == sorted(str2)&lt;/p&gt;&lt;p&gt;String Compression:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to perform basic string compression using the counts of repeated characters.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def compress_string(input_str):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; compressed = &quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; count = 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; for i in range(1, len(input_str)):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if input_str[i] == input_str[i - 1]:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count += 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; compressed += input_str[i - 1] + str(count)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count = 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; compressed += input_str[-1] + str(count)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return compressed if len(compressed) &amp;lt; len(input_str) else input_str&lt;/p&gt;&lt;p&gt;String Rotation:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to check if one string is a rotation of another.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def is_rotation(str1, str2):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if len(str1) != len(str2):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return str2 in (str1 + str1)&lt;/p&gt;&lt;p&gt;Longest Common Prefix:&lt;/p&gt;&lt;p&gt;Q: Write a Python function to find the longest common prefix of a list of strings.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def longest_common_prefix(strs):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if not strs:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; common_prefix = min(strs)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; for i, char in enumerate(common_prefix):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for string in strs:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if string[i] != char:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return common_prefix[:i]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return common_prefix&lt;/p&gt;&lt;p&gt;String to Integer (atoi):&lt;/p&gt;&lt;p&gt;Q: Implement the atoi function, which converts a string to an integer.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python&lt;/p&gt;&lt;p&gt;Copy code&lt;/p&gt;&lt;p&gt;def atoi(s):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; s = s.strip()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if not s:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; sign = -1 if s[0] == &#39;-&#39; else 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if s[0] in (&#39;-&#39;, &#39;+&#39;):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s = s[1:]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; result = 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; for char in s:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not char.isdigit():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = result * 10 + int(char)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return max(min(result * sign, 2**31 - 1), -2**31)&lt;/p&gt;&lt;p&gt;These are some common Python string interview questions and their corresponding answers. These questions cover a range of string manipulation techniques and can help you prepare for interviews that involve string manipulation in Python.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 0px 0px 1.25em; white-space-collapse: preserve;&quot;&gt;Certainly! Here are some more tricky Python string interview questions along with their answers:&lt;/p&gt;&lt;ol start=&quot;9&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; counter-reset: list-number 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; list-style: none; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;&quot;&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;First Non-Repeating Character:&lt;/span&gt;
Q: Write a Python function to find the first non-repeating character in a string.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;first_non_repeating_char&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    char_count = {}
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; s:
        char_count[char] = char_count.get(char, &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;) + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; s:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char_count[char] == &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; char
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;None&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Valid Parentheses:&lt;/span&gt;
Q: Write a Python function to check if a given string containing parentheses is valid.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;is_valid_parentheses&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    stack = []
    brackets = {&lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;)&#39;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;(&#39;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;}&#39;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;{&#39;&lt;/span&gt;, &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;]&#39;&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;[&#39;&lt;/span&gt;}
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; s:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; brackets.values():
            stack.append(char)
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;elif&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; brackets.keys():
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;not&lt;/span&gt; stack &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;or&lt;/span&gt; stack.pop() != brackets[char]:
                &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;not&lt;/span&gt; stack
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Longest Substring Without Repeating Characters:&lt;/span&gt;
Q: Write a Python function to find the length of the longest substring without repeating characters.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;length_of_longest_substring&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    char_index = {}
    max_length = start = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; i, char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;enumerate&lt;/span&gt;(s):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; char_index &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; char_index[char] &amp;gt;= start:
            start = char_index[char] + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        char_index[char] = i
        max_length = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;max&lt;/span&gt;(max_length, i - start + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;)
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; max_length
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;String Permutations:&lt;/span&gt;
Q: Write a Python function to generate all permutations of a given string.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;from&lt;/span&gt; itertools &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;import&lt;/span&gt; permutations

&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;string_permutations&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; [&lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;&#39;&lt;/span&gt;.join(p) &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; p &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; permutations(s)]
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Implement strStr():&lt;/span&gt;
Q: Implement the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-code); font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; font-weight: 600;&quot;&gt;strStr()&lt;/code&gt; function, which finds the index of the first occurrence of a substring in another string.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;strStr&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;haystack, needle&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;not&lt;/span&gt; needle:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(haystack) - &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(needle) + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; haystack[i:i+&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(needle)] == needle:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; i
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; -&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Group Anagrams:&lt;/span&gt;
Q: Given a list of strings, group anagrams together.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;from&lt;/span&gt; collections &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;import&lt;/span&gt; defaultdict

&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;group_anagrams&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;strs&lt;/span&gt;):
    grouped = defaultdict(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;list&lt;/span&gt;)
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; s &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; strs:
        key = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;&#39;&lt;/span&gt;.join(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;sorted&lt;/span&gt;(s))
        grouped[key].append(s)
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;list&lt;/span&gt;(grouped.values())
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Decode String:&lt;/span&gt;
Q: Given an encoded string, return its decoded string.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;decode_string&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    stack = []
    curr_num = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    curr_str = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; s:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char.isdigit():
            curr_num = curr_num * &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;10&lt;/span&gt; + &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;int&lt;/span&gt;(char)
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;elif&lt;/span&gt; char == &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;[&#39;&lt;/span&gt;:
            stack.append((curr_str, curr_num))
            curr_str, curr_num = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;&quot;&lt;/span&gt;, &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;elif&lt;/span&gt; char == &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;]&#39;&lt;/span&gt;:
            prev_str, num = stack.pop()
            curr_str = prev_str + curr_str * num
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
            curr_str += char
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; curr_str
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;These tricky Python string interview questions cover more advanced string manipulation techniques and problem-solving skills. They are designed to challenge your understanding of strings and algorithms.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 0px 0px 1.25em; white-space-collapse: preserve;&quot;&gt;Certainly! Here are some more challenging Python string interview questions along with their answers:&lt;/p&gt;&lt;ol start=&quot;16&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; counter-reset: list-number 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; list-style: none; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;&quot;&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Valid Palindrome II:&lt;/span&gt;
Q: Given a non-empty string s, you may delete at most one character. Write a Python function to check if you can make it a palindrome.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;valid_palindrome&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;is_palindrome&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s, left, right&lt;/span&gt;):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; left &amp;lt; right:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; s[left] != s[right]:
                &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
            left += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            right -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;True&lt;/span&gt;

    left, right = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(s) - &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; left &amp;lt; right:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; s[left] != s[right]:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; is_palindrome(s, left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;, right) &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;or&lt;/span&gt; is_palindrome(s, left, right - &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;)
        left += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        right -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Minimum Window Substring:&lt;/span&gt;
Q: Given two strings S and T, find the minimum window in S that will contain all the characters in T.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;min_window_substring&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s, t&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;from&lt;/span&gt; collections &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;import&lt;/span&gt; Counter

    t_counter = Counter(t)
    required_chars = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(t)
    left = right = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    min_len = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;float&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;inf&#39;&lt;/span&gt;)
    min_window = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;&quot;&lt;/span&gt;

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; right &amp;lt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(s):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; s[right] &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; t_counter:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; t_counter[s[right]] &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
                required_chars -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            t_counter[s[right]] -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; required_chars == &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; right - left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt; &amp;lt; min_len:
                min_len = right - left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
                min_window = s[left:right + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;]

            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; s[left] &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; t_counter:
                t_counter[s[left]] += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
                &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; t_counter[s[left]] &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
                    required_chars += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            left += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        right += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; min_window
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Regular Expression Matching:&lt;/span&gt;
Q: Implement regular expression matching with support for &#39;.&#39; and &#39;*&#39;.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;is_match&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s, p&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;not&lt;/span&gt; p:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;not&lt;/span&gt; s
    first_match = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;bool&lt;/span&gt;(s) &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; (s[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;] == p[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;] &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;or&lt;/span&gt; p[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;] == &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;.&#39;&lt;/span&gt;)

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(p) &amp;gt;= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; p[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;] == &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;*&#39;&lt;/span&gt;:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; (is_match(s, p[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;2&lt;/span&gt;:]) &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;or&lt;/span&gt; (first_match &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; is_match(s[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;:], p)))
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; first_match &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; is_match(s[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;:], p[&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;:])
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Longest Substring with At Most K Distinct Characters:&lt;/span&gt;
Q: Given a string s and an integer k, return the length of the longest substring with at most k distinct characters.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;length_of_longest_substring_k_distinct&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s, k&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;from&lt;/span&gt; collections &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;import&lt;/span&gt; defaultdict

    max_length = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    left = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    char_count = defaultdict(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;int&lt;/span&gt;)

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; right &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(s)):
        char_count[s[right]] += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(char_count) &amp;gt; k:
            char_count[s[left]] -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char_count[s[left]] == &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
                &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;del&lt;/span&gt; char_count[s[left]]
            left += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        max_length = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;max&lt;/span&gt;(max_length, right - left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;)

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; max_length
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;These advanced Python string interview questions require a deeper understanding of string manipulation, algorithms, and problem-solving skills. They are designed to challenge your ability to tackle complex string-related problems.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 0px 0px 1.25em; white-space-collapse: preserve;&quot;&gt;Certainly! Here are more Python string interview questions:&lt;/p&gt;&lt;ol start=&quot;20&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; counter-reset: list-number 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; list-style: none; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;&quot;&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Valid Number:&lt;/span&gt;
Q: Write a Python function to determine if a given string is a valid number (integer or floating-point).&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;is_valid_number&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;try&lt;/span&gt;:
        &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;float&lt;/span&gt;(s)
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;True&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;except&lt;/span&gt; ValueError:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Reverse Words in a String:&lt;/span&gt;
Q: Write a Python function to reverse the words in a string while preserving the order of words.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;reverse_words&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    words = s.split()
    reversed_str = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39; &#39;&lt;/span&gt;.join(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;reversed&lt;/span&gt;(words))
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; reversed_str
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Longest Substring Without Repeating Characters (with k distinct characters):&lt;/span&gt;
Q: Modify the previous &quot;Longest Substring with At Most K Distinct Characters&quot; question to return the actual substring itself.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;longest_substring_k_distinct&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s, k&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;from&lt;/span&gt; collections &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;import&lt;/span&gt; defaultdict

    max_length = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    left = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    char_count = defaultdict(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;int&lt;/span&gt;)
    start_index = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; right &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(s)):
        char_count[s[right]] += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(char_count) &amp;gt; k:
            char_count[s[left]] -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char_count[s[left]] == &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
                &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;del&lt;/span&gt; char_count[s[left]]
            left += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; right - left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt; &amp;gt; max_length:
            max_length = right - left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            start_index = left

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; s[start_index:start_index + max_length]
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Add Binary Strings:&lt;/span&gt;
Q: Given two binary strings, return their sum (also a binary string).&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;add_binary&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;a, b&lt;/span&gt;):
    carry = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    result = []
    i, j = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(a) - &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(b) - &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; i &amp;gt;= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;or&lt;/span&gt; j &amp;gt;= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;or&lt;/span&gt; carry:
        &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;sum&lt;/span&gt; = carry
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; i &amp;gt;= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
            &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;sum&lt;/span&gt; += &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;int&lt;/span&gt;(a[i])
            i -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; j &amp;gt;= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
            &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;sum&lt;/span&gt; += &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;int&lt;/span&gt;(b[j])
            j -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

        carry = &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;sum&lt;/span&gt; // &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;2&lt;/span&gt;
        result.append(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;str&lt;/span&gt;(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;sum&lt;/span&gt; % &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;2&lt;/span&gt;))

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&#39;&#39;&lt;/span&gt;.join(result[::-&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;])
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Longest Palindromic Substring:&lt;/span&gt;
Q: Find the longest palindromic substring in a given string.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;longest_palindromic_substring&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;s&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;expand_around_center&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;left, right&lt;/span&gt;):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;while&lt;/span&gt; left &amp;gt;= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; right &amp;lt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(s) &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;and&lt;/span&gt; s[left] == s[right]:
            left -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            right += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; s[left + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;:right]

    longest = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(s)):
        &lt;span class=&quot;hljs-comment&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(255, 255, 255, 0.5);&quot;&gt;# Odd length palindrome&lt;/span&gt;
        palindrome1 = expand_around_center(i, i)
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(palindrome1) &amp;gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(longest):
            longest = palindrome1

        &lt;span class=&quot;hljs-comment&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(255, 255, 255, 0.5);&quot;&gt;# Even length palindrome&lt;/span&gt;
        palindrome2 = expand_around_center(i, i + &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;)
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(palindrome2) &amp;gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(longest):
            longest = palindrome2

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; longest
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;These additional Python string interview questions will further test your problem-solving skills and ability to work with strings in various scenarios.&lt;/p&gt;&lt;ol style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; counter-reset: list-number 0; display: flex; flex-direction: column; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; list-style: none; margin: 1.25em 0px; padding: 0px; white-space-collapse: preserve;&quot;&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;String Reversal Without Built-in Functions:&lt;/span&gt;
Q: Write a Python function to reverse a string without using any built-in string reversal functions (e.g., slicing).&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;reverse_string&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;input_str&lt;/span&gt;):
    reversed_str = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; input_str:
        reversed_str = char + reversed_str
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; reversed_str
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Check for Anagrams:&lt;/span&gt;
Q: Write a Python function to check if two strings are anagrams of each other without using any built-in sorting functions.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;are_anagrams&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;str1, str2&lt;/span&gt;):
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(str1) != &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(str2):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
    
    char_count = {}
    
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; str1:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; char_count:
            char_count[char] += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
            char_count[char] = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;

    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; str2:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; char_count:
            char_count[char] -= &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char_count[char] &amp;lt; &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;:
                &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;False&lt;/span&gt;
    
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Count Vowels and Consonants:&lt;/span&gt;
Q: Write a Python function to count the number of vowels and consonants in a given string.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;count_vowels_and_consonants&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;input_str&lt;/span&gt;):
    vowels = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;aeiouAEIOU&quot;&lt;/span&gt;
    vowel_count = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    consonant_count = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;0&lt;/span&gt;
    
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; input_str:
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char.isalpha():
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; vowels:
                vowel_count += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
                consonant_count += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
    
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; vowel_count, consonant_count
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;Check for Pangram:&lt;/span&gt;
Q: Write a Python function to check if a given string is a pangram (contains every letter of the alphabet at least once).&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;is_pangram&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;input_str&lt;/span&gt;):
    alphabet = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;abcdefghijklmnopqrstuvwxyz&quot;&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;all&lt;/span&gt;(char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; input_str.lower() &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; char &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; alphabet)
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; counter-increment: list-number 1; display: block; margin-bottom: 0px; margin-top: 0px; min-height: 28px; padding-left: 0.375em;&quot;&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 0px;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: var(--tw-prose-bold); font-weight: 600;&quot;&gt;String Compression:&lt;/span&gt;
Q: Write a Python function to perform basic string compression by replacing consecutive repeating characters with the character followed by the count.&lt;/p&gt;&lt;pre style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: transparent; border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: currentcolor; font-family: &amp;quot;Söhne Mono&amp;quot;, Monaco, &amp;quot;Andale Mono&amp;quot;, &amp;quot;Ubuntu Mono&amp;quot;, monospace !important; font-size: 0.875em; line-height: 1.71429; margin-bottom: 0px; margin-top: 0px; overflow-x: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;bg-black rounded-md mb-4&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: rgba(0,0,0,var(--tw-bg-opacity)); border-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;flex items-center relative text-gray-200 bg-gray-800 gizmo:dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md&quot; style=&quot;--tw-bg-opacity: 1; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-text-opacity: 1; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; background-color: rgba(52,53,65,var(--tw-bg-opacity)); border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: rgba(217,217,227,var(--tw-text-opacity)); display: flex; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 0.75rem; justify-content: space-between; line-height: 1rem; padding: 0.5rem 1rem; position: relative;&quot;&gt;&lt;span style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;python&lt;/span&gt;&lt;button class=&quot;flex ml-auto gizmo:ml-0 gap-2 items-center&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; align-items: center; appearance: button; background-image: none; border-color: rgb(217, 217, 227); border-style: solid; border-width: 0px; cursor: pointer; display: flex; font-family: inherit; font-size: 12px; font-weight: inherit; gap: 0.5rem; line-height: inherit; margin: 0px 0px 0px auto; padding: 0px;&quot;&gt;&lt;svg class=&quot;icon-sm&quot; fill=&quot;none&quot; height=&quot;1em&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; viewbox=&quot;0 0 24 24&quot; width=&quot;1em&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;&gt;&lt;/path&gt;&lt;rect height=&quot;4&quot; rx=&quot;1&quot; ry=&quot;1&quot; width=&quot;8&quot; x=&quot;8&quot; y=&quot;2&quot;&gt;&lt;/rect&gt;&lt;/svg&gt;Copy code&lt;/button&gt;&lt;/div&gt;&lt;div class=&quot;p-4 overflow-y-auto&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; overflow-y: auto; padding: 1rem;&quot;&gt;&lt;code class=&quot;!whitespace-pre hljs language-python&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: none; border-radius: 0.3em; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: white; font-family: inherit; font-size: inherit; font-weight: inherit; hyphens: none; line-height: 1.5; overflow-wrap: normal; padding: 0.1em; tab-size: 4; white-space: normal; word-break: normal; word-spacing: normal;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hljs-title function_&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #f22c3d;&quot;&gt;compress_string&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box;&quot;&gt;input_str&lt;/span&gt;):
    compressed = &lt;span class=&quot;hljs-string&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #00a67d;&quot;&gt;&quot;&quot;&lt;/span&gt;
    count = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;for&lt;/span&gt; i &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(input_str)):
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; input_str[i] == input_str[i - &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;]:
            count += &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt;:
            compressed += input_str[i - &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;] + &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;str&lt;/span&gt;(count)
            count = &lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;
    compressed += input_str[-&lt;span class=&quot;hljs-number&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #df3079;&quot;&gt;1&lt;/span&gt;] + &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;str&lt;/span&gt;(count)
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;return&lt;/span&gt; compressed &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(compressed) &amp;lt; &lt;span class=&quot;hljs-built_in&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #e9950c;&quot;&gt;len&lt;/span&gt;(input_str) &lt;span class=&quot;hljs-keyword&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #2e95d3;&quot;&gt;else&lt;/span&gt; input_str
&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #444654; border: 0px solid rgb(217, 217, 227); box-sizing: border-box; color: #d1d5db; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;These simple yet tricky Python string interview questions are designed to test your understanding of string manipulation techniques and problem-solving skills with a twist.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/8532135231918190072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2023/10/python-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8532135231918190072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8532135231918190072'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2023/10/python-string.html' title='Python string'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-3732048666496988588</id><published>2023-10-10T00:32:00.003-07:00</published><updated>2023-10-10T01:06:52.644-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sdet"/><title type='text'>All in One QA interview questions with answer - SDET</title><content type='html'>&lt;p&gt;&amp;nbsp;Write a program for explaining a singleton class.&lt;/p&gt;&lt;p&gt;A singleton class is a design pattern in object-oriented programming that ensures a class has only one instance and provides a global point of access to that instance. It is commonly used when you want to restrict the instantiation of a class to a single object and control access to that object across your program. Singleton classes are often used for managing resources, configurations, or instances that should be shared across multiple parts of an application.&lt;/p&gt;&lt;p&gt;Here&#39;s a Python program that demonstrates the implementation of a singleton class:&lt;/p&gt;&lt;div&gt;class Singleton:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; _instance = None&amp;nbsp; # Private class variable to store the single instance&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; def __new__(cls):&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if cls._instance is None:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cls._instance = super(Singleton, cls).__new__(cls)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cls._instance.value = None&amp;nbsp; # Initialize an attribute (can be any data)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return cls._instance&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Usage of the Singleton class&lt;/div&gt;&lt;div&gt;instance1 = Singleton()&lt;/div&gt;&lt;div&gt;instance1.value = &quot;First Instance Value&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;instance2 = Singleton()&lt;/div&gt;&lt;div&gt;instance2.value = &quot;Second Instance Value&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Both instances refer to the same object&lt;/div&gt;&lt;div&gt;print(&quot;Instance 1:&quot;, instance1.value)&amp;nbsp; # Output: &quot;Second Instance Value&quot;&lt;/div&gt;&lt;div&gt;print(&quot;Instance 2:&quot;, instance2.value)&amp;nbsp; # Output: &quot;Second Instance Value&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;In this example:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The `Singleton` class defines a private class variable `_instance` that will store the single instance of the class.&lt;/li&gt;&lt;li&gt;The `__new__` method is overridden to control the creation of instances. It checks whether the `_instance` variable is `None`. If it is, it creates a new instance and assigns it to _instance. If `_instance` is not `None,` it returns the existing instance.&lt;/li&gt;&lt;li&gt;When you create instances of the `Singleton` class (e.g., `instance1` and `instance2`), both will refer to the same object, even if you try to modify their attributes. This behavior ensures that only one instance of the class exists throughout the program.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;Using a singleton class, you can ensure that there is a single point of access to shared resources or configurations, and you can prevent multiple instantiations of the same class, which might be useful in scenarios like database connections, logging, or managing global application settings.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario when singleton is used in python&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Singletons are used in Python when you want to ensure that a particular class has only one instance throughout the lifetime of your application. They are often used in scenarios where you need to manage shared resources, configuration settings, or coordinate tasks across the program. Here are some common scenarios in which you might use a singleton in Python:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Database Connections:&lt;/b&gt; When working with databases, you often want to maintain a single database connection that can be shared across different parts of your application. Using a singleton pattern ensures that you create only one instance of the database connection class, saving resources and preventing connection-related issues.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Logging&lt;/b&gt;: In a logging system, you might want to have a single logger instance that can be accessed by various modules or components to log events and messages consistently. A singleton can ensure that all parts of your application use the same logger instance.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Configuration Management:&lt;/b&gt; If your application relies on configuration settings or parameters, you can use a singleton to read and manage these settings from a central configuration file or source. This ensures that all parts of your codebase access the same configuration data.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Caching&lt;/b&gt;: When implementing a caching mechanism, a singleton cache manager can help you maintain a single cache across your application. This can be useful for caching frequently accessed data to improve performance.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Resource Managers&lt;/b&gt;: In scenarios where you need to manage limited resources, such as threads, connections, or hardware devices, a singleton pattern can help ensure that these resources are efficiently shared and allocated.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Application State:&lt;/b&gt; For certain applications, you might want to maintain a global state that multiple components can access and modify. A singleton can serve as a central repository for storing and managing application state.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Global Service Instances&lt;/b&gt;: In larger applications, you might have services such as authentication, messaging, or file management that need to be accessible from different parts of the codebase. A singleton pattern ensures that these services are globally accessible and maintain a single instance.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Plugin Systems&lt;/b&gt;: In some cases, you might implement a plugin system where plugins or extensions need access to a common interface or manager. A singleton can provide a single point of access to register and manage plugins.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;Remember that while singletons can be helpful in managing shared resources and global state, they should be used judiciously. Overusing singletons can lead to tightly coupled code and make unit testing more challenging. Therefore, it&#39;s essential to carefully consider whether a singleton pattern is the most appropriate solution for your specific use case.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;When we do not use Singleton Design pattern&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;While singleton design pattern has its use cases, there are scenarios where it may not be the best choice, and other design patterns or approaches may be more suitable. Here are situations where using a singleton is generally not recommended:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;When Multiple Instances Are Necessary:&lt;/b&gt; The primary purpose of a singleton is to ensure that only one instance of a class exists. If your application genuinely requires multiple instances of a class, using a singleton pattern would be counterproductive. In such cases, you should use regular class instantiation.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Testing and Mocking:&lt;/b&gt; Singleton classes can make unit testing more challenging because they introduce global state. If you need to isolate components for testing or replace a real object with a mock or stub, singletons can interfere with these practices. It&#39;s often preferable to use dependency injection or other patterns that facilitate testability.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Resource Cleanup:&lt;/b&gt; In scenarios where you need to manage resource cleanup explicitly, singletons can be problematic. Since they persist throughout the application&#39;s lifetime, it can be challenging to release resources when they are no longer needed. Resource management may be better handled through other patterns or mechanisms.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Immutable State&lt;/b&gt;: If the state of an object should remain immutable, using a singleton is not appropriate. Singletons typically allow for state modifications, which may lead to unintended changes in multiple parts of your program.&lt;/li&gt;&lt;li&gt;D&lt;b&gt;ynamic Object Creation&lt;/b&gt;: If you need to create objects dynamically based on specific conditions or parameters, a singleton pattern is not well-suited. Singleton classes are instantiated only once during the program&#39;s lifetime, so they don&#39;t support dynamic object creation.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Global Variables: &lt;/b&gt;While singletons can provide a controlled way to manage global state, excessive use of global variables, including singleton instances, can lead to code that is hard to understand, debug, and maintain. It&#39;s generally advisable to minimize global state where possible.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Concurrency and Thread Safety&lt;/b&gt;: Singleton patterns do not inherently address issues related to concurrency and thread safety. If your application involves multithreading or multiprocessing, you may need to implement additional synchronization mechanisms to ensure safe access to the singleton instance. In some cases, alternative patterns like the &quot;Borg&quot; pattern or dependency injection may be more suitable for managing shared resources in a thread-safe manner.&lt;/li&gt;&lt;li&gt;I&lt;b&gt;nflexibility: &lt;/b&gt;Using a singleton can introduce inflexibility into your codebase. If you anticipate the need to replace or extend the functionality of a class with different implementations, a more flexible design pattern, such as the Factory Method or Dependency Injection, may be more appropriate.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In conclusion, the decision to use or not use a singleton pattern should be based on a careful assessment of your specific application requirements. While singletons can be beneficial in certain scenarios, they should not be applied universally, and other design patterns and architectural approaches should be considered when they better align with your project&#39;s needs.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/3732048666496988588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2023/10/all-in-one-qa-interview-questions-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/3732048666496988588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/3732048666496988588'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2023/10/all-in-one-qa-interview-questions-with.html' title='All in One QA interview questions with answer - SDET'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-7207020939990380446</id><published>2023-10-02T12:06:00.000-07:00</published><updated>2023-10-02T12:06:44.409-07:00</updated><title type='text'>AWS VPC</title><content type='html'>&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is an AWS VPC, and why is it important for cloud infrastructure?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: An AWS Virtual Private Cloud (VPC) is a virtual network dedicated to an AWS account. It allows you to provision and isolate resources in the cloud. VPCs are essential for security and network control in the cloud, enabling you to create private networks, control IP address ranges, and define network access.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain the difference between a public subnet and a private subnet in an AWS VPC.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: In a VPC, a public subnet is one that has a route to the internet via an Internet Gateway, typically used for resources like web servers. A private subnet, on the other hand, lacks a direct route to the internet and is used for resources that should not be directly accessible from the internet, such as databases or application servers.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How do you create a custom VPC in AWS, and what are the essential components of a VPC?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: You can create a custom VPC through the AWS Management Console, AWS CLI, or using CloudFormation templates. Essential VPC components include subnets, route tables, security groups, network ACLs, and an optional VPN connection or Direct Connect gateway for on-premises connectivity.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is CIDR notation, and how is it used when defining IP address ranges in a VPC?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: CIDR (Classless Inter-Domain Routing) notation is a way to represent IP address ranges and their subnet masks. When defining IP address ranges in a VPC, you specify the CIDR block for the VPC and subnets, e.g., 10.0.0.0/16 for the VPC and 10.0.1.0/24 for a subnet.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Can you describe the purpose and use cases of a Network Access Control List (NACL) in a VPC?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: A Network Access Control List (NACL) acts as a stateless firewall for controlling inbound and outbound traffic at the subnet level in a VPC. It is used for security and filtering traffic, and common use cases include controlling access to resources, blocking malicious traffic, and segmenting network traffic within a VPC.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a Security Group in AWS, and how does it differ from a NACL?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: A Security Group acts as a stateful firewall for controlling inbound and outbound traffic at the instance level, while a NACL operates at the subnet level and is stateless. Security Groups are more specific to instances and are rule-based, whereas NACLs are less granular and work with subnets.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How can you connect an on-premises network to an AWS VPC? What are the different methods available for this?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: You can connect an on-premises network to an AWS VPC using AWS Direct Connect, VPN (Virtual Private Network) connections, or AWS Transit Gateway, depending on the requirements of your hybrid network architecture.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain the concept of Elastic IP (EIP) in AWS. Why might you use EIPs in a VPC?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: An Elastic IP (EIP) is a static, public IPv4 address that you can allocate to your AWS resources. EIPs are used to ensure that the public IP address of an EC2 instance or a NAT gateway remains constant, even if the instance is stopped and started. They are often used to host public-facing applications or services.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the considerations when designing a multi-region VPC architecture?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: Designing a multi-region VPC architecture involves several considerations:&lt;br /&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Data Replication: Decide how data will be replicated across regions to ensure high availability and disaster recovery.&lt;/li&gt;&lt;li&gt;Latency: Consider network latency between regions and optimize routing for performance.&lt;/li&gt;&lt;li&gt;Security: Implement consistent security policies across regions, considering compliance requirements.&lt;/li&gt;&lt;li&gt;DNS: Set up DNS resolution and naming conventions for cross-region resources.&lt;/li&gt;&lt;li&gt;Traffic Engineering: Use AWS Global Accelerator or Route 53 for traffic distribution.&lt;/li&gt;&lt;li&gt;Cost: Plan for data transfer costs between regions and optimize resource usage.&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How would you perform VPC backups and disaster recovery planning for a critical application?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: VPC backups and disaster recovery planning for a critical application involve:&lt;br /&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Snapshotting EBS volumes: Regularly create snapshots of critical data volumes for point-in-time backups.&lt;/li&gt;&lt;li&gt;Cross-region replication: Use services like AWS S3 cross-region replication for data redundancy.&lt;/li&gt;&lt;li&gt;Multi-AZ deployments: Deploy instances and databases across multiple Availability Zones (AZs) for high availability.&lt;/li&gt;&lt;li&gt;Automated backups: Implement automated backup policies for databases and other stateful services.&lt;/li&gt;&lt;li&gt;Disaster recovery runbooks: Document recovery procedures, including failover strategies and resource restoration processes.&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Can you explain the concept of VPC Flow Logs and how they can be used for security and troubleshooting?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: VPC Flow Logs capture network traffic metadata (e.g., source/destination IP, ports, protocol) and can be used for security and troubleshooting purposes:&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Security: Analyze Flow Logs to detect and investigate suspicious traffic patterns or potential security breaches.&lt;/li&gt;&lt;li&gt;Troubleshooting: Identify network connectivity issues, diagnose performance problems, and audit network behavior.&lt;/li&gt;&lt;li&gt;Compliance: Use Flow Logs to meet compliance and auditing requirements by tracking network traffic history.&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the limitations or constraints of AWS VPC, and how would you work around them in specific scenarios?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Answer: AWS VPC has some limitations that may affect design choices:&lt;br /&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;IP Address Range: VPCs have size limitations (e.g., /16 to /28), so plan IP ranges carefully and consider VPC peering if needed.&lt;/li&gt;&lt;li&gt;Route Tables: VPCs have a limit on the number of route tables, so use them efficiently and consider Transit Gateway for large-scale designs.&lt;/li&gt;&lt;li&gt;NAT Gateways: Limited scalability per Availability Zone, so use NAT instances or Transit Gateway for high-traffic scenarios.&lt;/li&gt;&lt;li&gt;Direct Connect: Limited redundancy options, so implement backup connections or use AWS VPN for additional redundancy.&lt;/li&gt;&lt;li&gt;Elastic Network Interfaces: Limited number per instance type, so consider instance type when designing highly networked applications.&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;Describe a real-world scenario where you faced a challenging problem related to AWS VPC and how you resolved it.&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: In my previous role, we encountered a challenge where a critical application hosted in a VPC was experiencing intermittent connectivity issues. After thorough investigation and Flow Log analysis, we discovered that our security group rules were overly restrictive, causing legitimate traffic to be dropped. We revised the security group rules, implemented better logging, and established a more robust monitoring solution to proactively detect and address similar issues in the future.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;You have a VPC with multiple subnets, both public and private. Instances in the private subnets need to access the internet for updates, but you want to minimize exposure. How can you achieve this?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Answer: You can set up a NAT Gateway in a public subnet and configure the private subnets&#39; route tables to route outbound traffic through the NAT Gateway. This allows instances in private subnets to access the internet while minimizing their exposure to inbound traffic from the internet.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain the implications of a VPC&#39;s default security group.&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: The default security group allows all inbound traffic from other instances assigned to the same security group but denies all inbound traffic from instances in other security groups or the internet. It also allows all outbound traffic. This can be tricky because sometimes users expect it to behave like a traditional firewall, but it&#39;s more permissive by default.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;You have a VPC with two private subnets and want to ensure high availability for your EC2 instances. What strategy would you use?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: To ensure high availability, you can distribute your EC2 instances across multiple Availability Zones (AZs) within the private subnets. You can also use an Auto Scaling group with an appropriate desired capacity to automatically recover instances in case of failure.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is the purpose of a VPC Peering Connection, and what limitations should you be aware of when using it&lt;/span&gt;&lt;/b&gt;?&lt;br /&gt;&lt;br /&gt;Answer: VPC Peering allows you to connect two VPCs to route traffic between them. However, you should be aware of some limitations, such as no transitive routing (you can&#39;t route through a VPC to reach another VPC), and overlapping CIDR blocks between peered VPCs are not allowed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;You need to securely connect your on-premises data center to your AWS VPC. How would you design a highly available, fault-tolerant solution?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: You can design a highly available solution by using multiple Direct Connect connections or VPN tunnels over different physical paths and Availability Zones. Additionally, you can use Border Gateway Protocol (BGP) for dynamic routing and route failover.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a VPC Transit Gateway, and how does it simplify network architecture?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer: A VPC Transit Gateway is a service that simplifies network architecture by acting as &lt;/b&gt;a hub that connects multiple VPCs and on-premises networks. It reduces the need for complex VPC peering and simplifies routing. However, you should be aware of the routing limitations and data transfer costs associated with it.&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;How can you enforce encryption between instances in a VPC, even if developers do not configure it at the application level?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: You can enforce encryption by using Network ACLs (NACLs) and Security Groups to restrict inbound and outbound traffic to use only secure protocols (e.g., HTTPS) and deny traffic that uses unencrypted protocols (e.g., HTTP).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;You have an EC2 instance in a private subnet that needs to download software updates from the internet. How can you configure this without exposing the instance to the public internet?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: You can configure a NAT Gateway or NAT Instance in a public subnet and then set up a route in the private subnet&#39;s route table to route all outbound traffic (0.0.0.0/0) through the NAT Gateway/Instance. This allows the private subnet&#39;s instances to access the internet for updates while remaining private.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What&#39;s the difference between a Network ACL (NACL) and a Security Group (SG) when controlling traffic to an EC2 instance?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: NACLs are stateless and operate at the subnet level, whereas SGs are stateful and operate at the instance level. SGs are used to control inbound and outbound traffic to an EC2 instance, while NACLs are used to control traffic at the subnet level. This difference can be tricky because it impacts how you design security rules.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;You have a VPC with multiple subnets, and you want to allow communication between some subnets while preventing communication between others. How can you achieve this?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Answer: You can use Security Groups and NACLs to control traffic between subnets. Create appropriate rules in Security Groups to allow or deny traffic between instances, and configure NACLs to control subnet-level traffic. By carefully configuring these security settings, you can achieve the desired communication patterns.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is the purpose of a Bastion Host, and how can it be used to enhance security in a VPC?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: A Bastion Host (or Jump Box) is used as a secure gateway to access instances in a private subnet. It enhances security by reducing the exposure of private instances to the internet. Users connect to the Bastion Host first and then use it as a gateway to access other private instances via SSH or RDP.&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;You have a VPC with two private subnets in different Availability Zones. How can you ensure high availability for your database, which needs to be accessible from both subnets?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Answer: To ensure high availability, you can deploy the database in an active-passive or multi-AZ configuration, with synchronous replication between AZs. Additionally, use DNS or a load balancer to direct traffic to the active instance. This setup ensures that the database remains accessible even if one AZ experiences a failure.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;You need to limit the number of API requests to an internal service running on EC2 instances in a private subnet. How can you achieve rate limiting for API requests?&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Answer: You can implement rate limiting by using a service like AWS API Gateway, which allows you to configure throttling settings to limit the number of requests per second or minute to your internal service. Alternatively, you can use a third-party API gateway or a custom solution like Nginx with rate limiting.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What does VPC stand for, and what is its main purpose in AWS?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: VPC stands for Virtual Private Cloud. Its main purpose is to create a private, isolated network environment within AWS, allowing users to launch and manage AWS resources securely.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What is an IP address range in the context of a VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: An IP address range, specified in CIDR notation (e.g., 10.0.0.0/16), defines the range of private IP addresses available for use within a VPC.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: How are subnets used within a VPC, and why are they important?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: Subnets are used to logically divide the IP address range of a VPC into smaller segments. They are associated with specific Availability Zones (AZs) and are important for organizing resources, implementing security, and improving fault tolerance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What is an Internet Gateway (IGW) in a VPC, and when is it used?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: An Internet Gateway is a VPC component used to allow resources in public subnets to communicate with the internet. It is essential when resources, like web servers, need to be publicly accessible.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What is the purpose of a Security Group (SG) in AWS VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: A Security Group acts as a virtual firewall for EC2 instances within a VPC. It controls inbound and outbound traffic to and from instances, allowing you to specify the rules for access.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: How does Network Access Control List (NACL) differ from a Security Group (SG) in AWS VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: NACLs are stateless, operate at the subnet level, and control traffic at a broader level compared to SGs, which are stateful, operate at the instance level, and provide more granular control over traffic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What is the purpose of a NAT Gateway (Network Address Translation) in AWS VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: A NAT Gateway is used to allow instances in private subnets to access the internet for software updates or external services while maintaining security. It acts as an intermediary for outbound traffic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: Why might you need to create a VPC peering connection?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: VPC peering connections are created to enable private communication between resources in different VPCs. This is useful when you want to share data or resources between VPCs while keeping them isolated from other networks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: How can you connect your on-premises network to resources in a VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: You can connect your on-premises network to a VPC using either a VPN (Virtual Private Network) connection or AWS Direct Connect, depending on your network requirements and bandwidth needs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What is the significance of Availability Zones (AZs) in a VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: Availability Zones are physically separate data centers within an AWS region. Placing resources in different AZs provides redundancy and fault tolerance, ensuring that your applications remain available even if one AZ experiences issues.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;1&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;. Question: Explain the differences between a public subnet and a private subnet in a VPC.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: In a VPC, a public subnet is associated with a route table that directs traffic to an Internet Gateway (IGW), allowing resources in the subnet to have direct internet access. In contrast, a private subnet is associated with a route table that does not have a route to the IGW, making resources in the subnet inaccessible from the public internet. Typically, application servers are placed in public subnets, while database servers are placed in private subnets to enhance security.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2. Question: Can you describe the role of Network Access Control Lists (NACLs) in a VPC? How do they differ from Security Groups (SGs)?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: NACLs are stateless network-level firewalls that control traffic in and out of subnets within a VPC. They operate at the subnet level and provide rule-based filtering for IP traffic. Unlike SGs, which are stateful and operate at the instance level, NACLs apply to all resources in a subnet. NACLs are evaluated before SGs, and they can be used to create coarse-grained network traffic rules, while SGs provide fine-grained control at the instance level.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;3. Question: What is the purpose of a Bastion Host (Jump Box) in a VPC, and how is it typically used?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: A Bastion Host is a specially configured EC2 instance in a public subnet that serves as a secure gateway for administrators to access resources in private subnets. It enhances security by reducing the exposure of private instances to the internet. Administrators connect to the Bastion Host using SSH or RDP and then use it as a bridge to access other private instances within the VPC. This setup limits direct internet access to critical instances and provides a controlled access point for administrative tasks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;4. Question: How can you achieve high availability and fault tolerance for an application hosted in a VPC&lt;/span&gt;&lt;/b&gt;?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To achieve high availability and fault tolerance:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Deploy resources in multiple Availability Zones (AZs) within the same region to ensure redundancy.&lt;/li&gt;&lt;li&gt;Use Elastic Load Balancers (ELBs) to distribute traffic across instances in different AZs.&lt;/li&gt;&lt;li&gt;Set up Auto Scaling to automatically adjust the number of instances based on demand.&lt;/li&gt;&lt;li&gt;Implement database Multi-AZ deployments for database redundancy.&lt;/li&gt;&lt;li&gt;Configure DNS failover using Amazon Route 53 or a global accelerator for automatic failover between AZs in case of an outage.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;5. Question: Explain the concept of VPC Peering and when you would use it.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: VPC Peering allows the connection of two VPCs, enabling private communication between resources in those VPCs. It is typically used when you need to share resources or data securely between VPCs belonging to the same or different AWS accounts. VPC Peering is not transitive, meaning that if VPC A is peered with VPC B and VPC B is peered with VPC C, VPC A and VPC C are not automatically peered. You must establish direct peering connections between them if needed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;6. Question: Describe the differences between AWS Direct Connect and VPN when connecting on-premises networks to a VPC.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: AWS Direct Connect is a dedicated network connection between an on-premises data center and AWS, providing consistent network performance and higher bandwidth. It&#39;s suitable for organizations with higher data transfer needs and stringent latency requirements. On the other hand, VPN (Virtual Private Network) connections use encrypted tunnels over the public internet and are suitable for smaller-scale connectivity requirements where the performance difference is acceptable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;7. Question: How can you secure sensitive data at rest and in transit within a VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To secure sensitive data within a VPC:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use encryption mechanisms such as AWS Key Management Service (KMS) for encrypting data at rest.&lt;/div&gt;&lt;div&gt;Implement SSL/TLS for encrypting data in transit.&lt;/div&gt;&lt;div&gt;Use secure protocols for communication between instances.&lt;/div&gt;&lt;div&gt;Apply strict IAM policies, NACLs, and Security Groups to control access.&lt;/div&gt;&lt;div&gt;Regularly audit and monitor access logs for security compliance.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;. &lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: What is the significance of a Transit Gateway in a VPC architecture, and when would you use it?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: A Transit Gateway is used to simplify network connectivity in complex VPC architectures. It acts as a central hub for connecting multiple VPCs, VPNs, and Direct Connect connections. Instead of creating individual VPC peering connections between every VPC pair, you can use a Transit Gateway to create a more scalable and manageable network design. It is particularly useful in large-scale multi-VPC architectures where simplified routing and connectivity are essential.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;9. Question: Explain the concept of VPC Endpoints and give an example of when you might use them.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: VPC Endpoints allow private communication between your VPC and supported AWS services without using the public internet. For example, you can create an S3 VPC Endpoint to enable your EC2 instances to access Amazon S3 privately. This is useful when you want to enhance security, reduce data transfer costs, and improve performance by avoiding internet routing for specific AWS services.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;10. Question: How do you design and implement a disaster recovery (DR) strategy for a VPC-hosted application?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: A disaster recovery strategy for a VPC-hosted application typically involves:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Setting up a standby environment in a different AWS region.&lt;/li&gt;&lt;li&gt;Regularly replicating data and configurations to the secondary region using tools like AWS Backup or cross-region replication.&lt;/li&gt;&lt;li&gt;Implementing failover mechanisms, such as Route 53 DNS failover or an AWS Global Accelerator, to redirect traffic to the secondary region in case of a disaster.&lt;/li&gt;&lt;li&gt;Ensuring that both regions have the necessary compute and storage resources to handle the failover workload.&lt;/li&gt;&lt;li&gt;Testing the DR plan regularly to verify its effectiveness.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;11. Question: What is AWS PrivateLink, and how does it enhance security in a VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: AWS PrivateLink is a service that enables private network connections between your VPC and supported AWS services or SaaS solutions over the AWS backbone network. It enhances security by keeping network traffic within the AWS network and avoids exposing traffic to the public internet. PrivateLink is beneficial for scenarios where data privacy, security, and compliance are top priorities.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2. Question: When would you use AWS Site-to-Site VPN vs. AWS Direct Connect for connecting an on-premises network to a VPC?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: You would use AWS Site-to-Site VPN when you need a cost-effective and flexible solution for secure communication over the public internet. It is suitable for smaller data transfer needs and is easier to set up. AWS Direct Connect, on the other hand, provides dedicated, private, and high-bandwidth connections, making it ideal for large-scale, mission-critical workloads with strict latency and performance requirements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;13. Question: How can you implement fine-grained access control for resources within a VPC using IAM roles and policies?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To implement fine-grained access control:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create IAM roles with specific permissions for EC2 instances or other AWS resources within your VPC.&lt;/li&gt;&lt;li&gt;Attach IAM policies to these roles, defining what actions and resources are allowed.&lt;/li&gt;&lt;li&gt;Associate the IAM roles with the resources that need the defined permissions.&lt;/li&gt;&lt;li&gt;Ensure that EC2 instances have the necessary IAM roles assigned.&lt;/li&gt;&lt;li&gt;Regularly review and audit IAM policies to maintain least privilege access.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;14. Question: What is the purpose of VPC Flow Logs, and how can they be used for security and troubleshooting?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: VPC Flow Logs capture information about network traffic within your VPC, allowing you to monitor and analyze network behavior. They can be used for:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Security: Detect and investigate suspicious traffic patterns.&lt;/li&gt;&lt;li&gt;Troubleshooting: Identify network issues, diagnose connectivity problems, and analyze traffic flow.&lt;/li&gt;&lt;li&gt;Compliance: Maintain records of network activity for auditing and compliance purposes.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 1: Network Isolation and Security&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: You are designing a VPC for a company that needs to keep its application servers isolated from the public internet while allowing database servers to access the internet for software updates. How would you set up the VPC to meet these requirements?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To meet this requirement:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create a VPC with both public and private subnets.&lt;/li&gt;&lt;li&gt;Place application servers in the private subnet.&lt;/li&gt;&lt;li&gt;Place database servers in the private subnet as well.&lt;/li&gt;&lt;li&gt;Create a NAT Gateway in the public subnet.&lt;/li&gt;&lt;li&gt;Configure the route table for the private subnet to route traffic to the NAT Gateway for internet access.&lt;/li&gt;&lt;li&gt;Use Security Groups to control inbound and outbound traffic for both application and database servers. Allow only necessary traffic.&lt;/li&gt;&lt;li&gt;This setup allows database servers to access the internet while keeping the application servers isolated from direct internet access.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 2: Multi-AZ Redundancy&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: A critical web application needs to be highly available and fault-tolerant. How would you design a VPC to achieve this, ensuring that the application can continue to operate even if one Availability Zone (AZ) experiences a failure?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To ensure high availability and fault tolerance:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create a VPC with multiple subnets, each in a different AZ.&lt;/li&gt;&lt;li&gt;Deploy application servers across these AZs.&lt;/li&gt;&lt;li&gt;Use an Elastic Load Balancer (ELB) to distribute traffic evenly across the instances in different AZs.&lt;/li&gt;&lt;li&gt;Set up database servers with Multi-AZ deployment for automatic failover.&lt;/li&gt;&lt;li&gt;Implement health checks and auto-scaling to replace unhealthy instances.&lt;/li&gt;&lt;li&gt;Configure Route 53 with latency-based routing or a failover routing policy for DNS-based failover.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;This design ensures that the application can continue to operate even if one AZ experiences a failure, providing high availability.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 3: Hybrid Cloud Connectivity&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: Your organization wants to extend its on-premises data center to AWS for scalability. How would you set up a VPC to securely connect the on-premises network with the AWS resources?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To securely connect the on-premises network to AWS:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create a VPC with private and public subnets.&lt;/li&gt;&lt;li&gt;Set up a VPN connection or AWS Direct Connect to establish connectivity between the on-premises network and the VPC.&lt;/li&gt;&lt;li&gt;Configure appropriate route tables and security groups to control traffic flow.&lt;/li&gt;&lt;li&gt;Use a Virtual Private Gateway (VGW) or a Customer Gateway (CGW) for VPN connections.&lt;/li&gt;&lt;li&gt;For Direct Connect, provision a Direct Connect Gateway if connecting to multiple VPCs.&lt;/li&gt;&lt;li&gt;Ensure that your on-premises network has the necessary hardware or software VPN appliances or Direct Connect connections.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;This setup allows for a secure and private connection between the on-premises data center and AWS resources, enabling hybrid cloud architecture.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 4: VPC Peering&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: Your organization has multiple AWS accounts, each with its VPC. You want to enable private communication between resources in different VPCs. How would you set up VPC peering to achieve this?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To enable private communication between resources in different VPCs:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Establish VPC peering connections between the desired VPC pairs.&lt;/li&gt;&lt;li&gt;Configure the route tables in each VPC to include routes for the other VPC&#39;s CIDR block via the peering connection.&lt;/li&gt;&lt;li&gt;Ensure that the security groups and NACLs allow the necessary traffic between the peered VPCs.&lt;/li&gt;&lt;li&gt;Note that VPC peering is not transitive, so if you need communication between more than two VPCs, establish direct peering connections.&lt;/li&gt;&lt;li&gt;VPC peering allows private communication between resources in different VPCs, making it easier to share data and resources across AWS accounts.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 5: Network Isolation and Segmentation&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: You are designing a VPC for a large e-commerce website. The website has a frontend, a backend, and a payment processing system. How would you set up the VPC to ensure network isolation and proper segmentation of these components for security reasons?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To ensure network isolation and segmentation:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create a VPC with multiple private subnets and public subnets.&lt;/li&gt;&lt;li&gt;Place the frontend servers in the public subnets to interact with the internet.&lt;/li&gt;&lt;li&gt;Place the backend servers in private subnets, allowing them to communicate with the frontend servers but not directly with the internet.&lt;/li&gt;&lt;li&gt;Place the payment processing servers in a highly secured private subnet with restricted access only from the backend servers.&lt;/li&gt;&lt;li&gt;Use Security Groups and NACLs to control traffic between subnets, allowing only necessary communication.&lt;/li&gt;&lt;li&gt;Implement a Web Application Firewall (WAF) or security measures to protect the frontend servers from web-based attacks.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;This setup ensures that the frontend, backend, and payment processing systems are properly segmented for security while maintaining network isolation.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 6: Disaster Recovery&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: Your company operates a critical application in a VPC, and you want to ensure disaster recovery. How would you set up the VPC to have a reliable backup in another AWS region?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To set up disaster recovery across AWS regions:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Create a VPC in a secondary AWS region.&lt;/li&gt;&lt;li&gt;Use AWS services like AWS Backup or Amazon S3 cross-region replication to back up essential data and configurations.&lt;/li&gt;&lt;li&gt;Set up an AWS Global Accelerator or Amazon Route 53 with health checks to route traffic to the VPC in the secondary region if the primary region experiences an outage.&lt;/li&gt;&lt;li&gt;Ensure that you have copies of your application&#39;s Amazon Machine Images (AMIs) in the secondary region.&lt;/li&gt;&lt;li&gt;Periodically test your disaster recovery plan to ensure its effectiveness.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;This configuration provides a reliable backup in another region and minimizes downtime in case of a disaster.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 7: Secure Remote Access&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: Your team needs secure remote access to instances within your VPC for maintenance and troubleshooting. How would you provide secure remote access while maintaining security best practices?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To provide secure remote access:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Use a Bastion Host or Jump Box in a public subnet as an entry point for remote access.&lt;/li&gt;&lt;li&gt;Restrict SSH or RDP access to the Bastion Host using Security Groups and NACLs.&lt;/li&gt;&lt;li&gt;Use SSH keys or RDP certificates for authentication instead of passwords.&lt;/li&gt;&lt;li&gt;Implement Multi-Factor Authentication (MFA) for added security.&lt;/li&gt;&lt;li&gt;Allow access from specific IP addresses or ranges for added control.&lt;/li&gt;&lt;li&gt;Regularly monitor and audit remote access logs for security compliance.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;This setup ensures that remote access to instances is secure while adhering to security best practices.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Scenario 8: Compliance and Logging&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Question: Your organization has strict compliance requirements for logging network traffic within the VPC. How would you configure VPC Flow Logs to meet these compliance needs?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: To configure VPC Flow Logs for compliance:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Enable VPC Flow Logs for the VPC or specific subnets.&lt;/li&gt;&lt;li&gt;Specify the desired destination for flow logs, such as Amazon S3 or CloudWatch Logs.&lt;/li&gt;&lt;li&gt;Define the log format and fields to include in the logs.&lt;/li&gt;&lt;li&gt;Ensure that the IAM roles or permissions are correctly set to allow flow log creation and access to the chosen destination.&lt;/li&gt;&lt;li&gt;Regularly review and analyze the flow logs for security and compliance purposes.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;This setup ensures that network traffic within the VPC is logged and can be audited to meet compliance requirements.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;VPC&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;A Virtual Private Cloud (VPC) is a fundamental networking construct in Amazon Web Services (AWS) that allows you to create a logically isolated section of the AWS cloud where you can launch AWS resources. It essentially provides you with your own private network within the AWS cloud. Let&#39;s explore VPCs in detail:&lt;br /&gt;&amp;nbsp;Network Isolation: VPCs allow you to create a private, isolated network environment in the AWS cloud. This isolation ensures that your resources are not directly accessible from the internet or from other VPCs by default.&lt;br /&gt;Customizable IP Address Range: When you create a VPC, you specify an IP address range using Classless Inter-Domain Routing (CIDR) notation (e.g., 10.0.0.0/16). This IP address range defines the address space available for your VPC, and you can segment it into subnets based on your needs.&lt;br /&gt;Subnets: Within a VPC, you can create one or more subnets. Subnets are logical divisions of the IP address range that you defined for the VPC. Subnets are associated with Availability Zones (AZs) in a region, allowing you to distribute your resources across multiple data centers for high availability.&lt;br /&gt;Internet Connectivity: By default, resources in a VPC are not directly accessible from the internet. To make resources accessible from the internet, you can create a public subnet and attach an Internet Gateway (IGW) to it. Instances in the public subnet can have Elastic IP addresses or public IPv4 addresses, allowing them to communicate with the internet.&lt;br /&gt;Private Subnets: Resources in private subnets do not have direct internet access. To provide internet access to instances in private subnets, you can use Network Address Translation (NAT) Gateways or NAT Instances located in the public subnet.&lt;br /&gt;Security Groups: VPCs use Security Groups (SGs) as a virtual firewall for controlling inbound and outbound traffic at the instance level. You can specify rules in SGs to control traffic to and from instances.&lt;br /&gt;Network ACLs: Network Access Control Lists (NACLs) are stateless firewalls that operate at the subnet level. NACLs allow you to control traffic by defining rules for each subnet, providing an additional layer of security.&lt;br /&gt;VPC Peering: VPC Peering enables you to establish private network connections between different VPCs, even in different AWS accounts. It allows resources in different VPCs to communicate with each other as if they were on the same network.&lt;br /&gt;VPN and Direct Connect: You can connect your on-premises data centers or remote networks to your VPC using Virtual Private Network (VPN) connections or AWS Direct Connect. This enables hybrid cloud architectures and secure communication between your on-premises infrastructure and AWS resources.&lt;br /&gt;Transit Gateway: AWS Transit Gateway simplifies network connectivity between VPCs, data centers, and remote offices, making it easier to scale and manage large-scale network architectures.&lt;br /&gt;VPC Endpoints: VPC Endpoints enable private connections between your VPC and AWS services, such as Amazon S3 and DynamoDB, without requiring internet traffic to traverse a public gateway.&lt;br /&gt;In summary, AWS VPCs provide a flexible and secure way to create and manage your network infrastructure in the cloud. You can design and configure VPCs to meet your specific requirements, ensuring network isolation, security, and connectivity for your AWS resources. VPCs are a fundamental building block for constructing a wide range of AWS architectures, from simple web applications to complex enterprise solutions.&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Why VPC is needed&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;A Virtual Private Cloud (VPC) is needed in cloud computing, especially within platforms like Amazon Web Services (AWS), for several key reasons:&lt;br /&gt;&lt;b&gt;Network Isolation:&lt;/b&gt; VPC provides a private, isolated network environment within a public cloud platform like AWS. This isolation ensures that your cloud resources are not exposed to the public internet by default. It allows you to build and manage your own network infrastructure securely.&lt;br /&gt;&lt;b&gt;Custom IP Address Range&lt;/b&gt;: When you create a VPC, you can define the IP address range (CIDR block) for your virtual network. This gives you full control over IP address assignment and subnetting, allowing you to design your network according to your specific requirements.&lt;br /&gt;&lt;b&gt;Resource Segmentation&lt;/b&gt;: VPC allows you to create multiple subnets within your virtual network. These subnets can be distributed across different Availability Zones (AZs) in a region. This segmentation helps with resource organization, improves fault tolerance, and allows you to implement different security policies for different parts of your application.&lt;br /&gt;&lt;b&gt;Security Control: &lt;/b&gt;VPC enables granular control over network security. You can use Network Access Control Lists (NACLs) and Security Groups (SGs) to define rules for inbound and outbound traffic, ensuring that your resources are only accessible by authorized entities. This control is crucial for maintaining a secure cloud environment.&lt;br /&gt;&lt;b&gt;Internet Connectivity: &lt;/b&gt;While VPCs provide isolation, you can configure them to allow specific resources, typically located in public subnets, to have controlled access to the public internet. This is essential for resources that need to communicate with external services or users.&lt;br /&gt;&lt;b&gt;Private Subnets: &lt;/b&gt;VPC allows you to create private subnets where resources are not directly exposed to the internet. To provide internet access for resources in private subnets, you can use Network Address Translation (NAT) gateways or instances in public subnets.&lt;br /&gt;&lt;b&gt;Hybrid Cloud Connectivity&lt;/b&gt;: VPC provides tools like VPN connections and AWS Direct Connect to securely connect your on-premises data centers or remote locations to your cloud resources. This facilitates hybrid cloud architectures and seamless communication between your on-premises and cloud environments.&lt;br /&gt;&lt;b&gt;VPC Peerin&lt;/b&gt;g: VPCs can be peered together to allow private communication between resources in different VPCs, even if they belong to different AWS accounts. This is useful for sharing resources or data securely across different projects or teams.&lt;br /&gt;&lt;b&gt;Scalability and Elasticity&lt;/b&gt;: VPCs are highly scalable. You can easily add or remove resources, adjust network configurations, and expand your network as your business or application requirements change. This flexibility is vital for handling dynamic workloads.&lt;br /&gt;&lt;b&gt;Network Monitoring and Logging: &lt;/b&gt;VPCs provide features like VPC Flow Logs, which allow you to capture and analyze network traffic, aiding in security monitoring, compliance, and troubleshooting.&lt;br /&gt;&lt;b&gt;Data Privacy and Compliance:&lt;/b&gt; VPCs are designed to help organizations meet data privacy and compliance requirements by providing the tools and controls needed to protect sensitive data and ensure compliance with regulations.&lt;br /&gt;In summary, a VPC is essential for building and managing a secure, isolated, and customizable network environment within a cloud infrastructure. It gives you the control and flexibility needed to deploy and operate cloud resources while meeting security, compliance, and scalability requirements. VPCs are a fundamental building block for modern cloud-based applications and services.&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;u&gt;Why VPC is required and what it contains&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;A Virtual Private Cloud (VPC) is required for several reasons in cloud computing, and it typically contains the following elements:&lt;br /&gt;&lt;br /&gt;Why VPC is Required:&lt;br /&gt;&lt;b&gt;Isolation&lt;/b&gt;: A VPC provides network isolation within a cloud environment. It allows you to create your private network, separate from other users in the cloud, ensuring that your resources are not accessible by default to the public internet or other VPCs.&lt;br /&gt;&lt;b&gt;Security:&lt;/b&gt; VPCs offer robust security controls, such as Network Access Control Lists (NACLs) and Security Groups (SGs), that help you define and enforce network traffic rules. This isolation and security are crucial for protecting your data and applications from unauthorized access.&lt;br /&gt;&lt;b&gt;Customization:&lt;/b&gt; VPCs allow you to customize your network, including IP address ranges, subnets, routing tables, and security policies. This customization enables you to design your network infrastructure according to your specific requirements.&lt;br /&gt;&lt;b&gt;Scalability&lt;/b&gt;: VPCs are scalable, allowing you to expand your network as your business grows. You can add or remove resources, adjust configurations, and adapt to changing workloads easily.&lt;br /&gt;&lt;b&gt;Connectivity:&lt;/b&gt; VPCs offer various connectivity options, such as Virtual Private Network (VPN), AWS Direct Connect, VPC peering, and Transit Gateways, which enable you to connect your cloud resources to on-premises data centers, other VPCs, or external networks securely.&lt;br /&gt;&lt;b&gt;Resource Management:&lt;/b&gt; VPCs provide a structured way to organize and manage your cloud resources. You can create subnets, assign resources to specific subnets, and control access between them. This organization simplifies resource management and maintenance.&lt;br /&gt;What a VPC Contains:&lt;br /&gt;&lt;br /&gt;A typical VPC contains the following components:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;IP Address Range: &lt;/b&gt;When you create a VPC, you define an IP address range using CIDR notation (e.g., 10.0.0.0/16). This address range defines the available private IP addresses for your VPC.&lt;br /&gt;&lt;b&gt;Subnets:&lt;/b&gt; Within a VPC, you create subnets, which are like smaller sections of your VPC. Subnets are typically associated with specific Availability Zones (AZs) within a region.&lt;br /&gt;&lt;b&gt;Route Tables: &lt;/b&gt;VPCs have route tables that determine how network traffic is directed within the VPC. You can configure route tables to route traffic between subnets and control where traffic goes.&lt;br /&gt;&lt;b&gt;Security Groups&lt;/b&gt;: Security Groups are used to control inbound and outbound traffic to instances within a VPC. They act as virtual firewalls at the instance level.&lt;br /&gt;&lt;b&gt;Network Access Control Lists (NACLs):&lt;/b&gt; NACLs are stateless firewalls that operate at the subnet level. They help control traffic in and out of subnets based on defined rules.&lt;br /&gt;&lt;b&gt;Internet Gateway (IGW)&lt;/b&gt;: An IGW allows resources in public subnets to connect to the internet while keeping resources in private subnets isolated. It serves as the gateway for outbound and inbound internet traffic.&lt;br /&gt;&lt;b&gt;NAT Gateways/Instances:&lt;/b&gt; Network Address Translation (NAT) Gateways or Instances are used to enable private instances in a VPC to access the internet for software updates or other purposes, while still maintaining security.&lt;br /&gt;&lt;b&gt;Peering Connections&lt;/b&gt;: VPCs can be peered together to allow private communication between them, making it easier to connect resources in different VPCs.&lt;br /&gt;&lt;b&gt;VPN or Direct Connect:&lt;/b&gt; VPCs can be connected to on-premises networks using VPN or AWS Direct Connect for secure communication between cloud and on-premises resources.&lt;br /&gt;&lt;b&gt;Transit Gateway: &lt;/b&gt;For more complex architectures, Transit Gateway can be used to simplify network connectivity and routing between multiple VPCs and on-premises networks.&lt;br /&gt;In summary, a VPC is required to create a secure, customizable, and isolated network environment in a cloud platform like AWS. It contains various components and configurations that help you design and manage your network infrastructure effectively.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/7207020939990380446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2023/10/aws-vpc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/7207020939990380446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/7207020939990380446'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2023/10/aws-vpc.html' title='AWS VPC'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-5971778718721060044</id><published>2023-08-08T07:22:00.000-07:00</published><updated>2023-08-08T07:22:31.760-07:00</updated><title type='text'>Windows Debugging tools</title><content type='html'>&lt;p style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Process Monitor (ProcMon): This tool monitors file system, registry, and process/thread activity in real-time. It helps identify issues with file access, registry changes, and process interactions.&lt;br /&gt;&lt;br /&gt;Process Explorer: Process Explorer is a powerful task manager replacement that provides detailed information about running processes, including their associated DLLs and network connections.&lt;br /&gt;&lt;br /&gt;WinDbg: WinDbg is a powerful debugger provided by Microsoft that allows you to inspect and debug user-mode and kernel-mode processes. It&#39;s useful for analyzing crash dumps and diagnosing complex issues.&lt;br /&gt;&lt;br /&gt;WinObj: WinObj provides a graphical view of the Windows object namespace, allowing testers to explore objects like files, directories, devices, and more.&lt;br /&gt;&lt;br /&gt;Dependency Walker: Dependency Walker helps in analyzing dependencies and potential issues with DLLs and EXEs, making it useful for identifying missing or incompatible dependencies.&lt;br /&gt;&lt;br /&gt;AppVerifier: AppVerifier is a testing tool designed to help identify and diagnose issues in applications, including security-related problems and compatibility issues.&lt;br /&gt;&lt;br /&gt;Sysinternals Suite: This is a collection of various powerful Windows utilities developed by Mark Russinovich and acquired by Microsoft. It includes tools like Process Monitor (ProcMon), Process Explorer, Autoruns, and many others.&lt;br /&gt;&lt;br /&gt;Windows Performance Toolkit (WPT): This toolkit provides tools like Xperf and WPR (Windows Performance Recorder) to profile and diagnose system performance issues.&lt;br /&gt;&lt;br /&gt;Wireshark: Though not exclusively a Windows internals tool, Wireshark is essential for analyzing network traffic and identifying potential malware communication.&lt;br /&gt;&lt;br /&gt;Process Hacker: Process Hacker is an open-source tool similar to Process Explorer, offering advanced monitoring and manipulation of system processes and services.&lt;br /&gt;&lt;br /&gt;Remember that software tools and technologies are continuously evolving, so it&#39;s crucial to stay up-to-date with the latest tools and techniques used in the industry. Always ensure that you are using these tools responsibly and in accordance with your organization&#39;s policies.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;***********************************************************************8&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a memory dump?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A memory dump is the process of taking all information content in RAM and writing it to a storage drive as a memory dump file (*.DMP format).&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;1) What is a memory dump, and why is it useful in Windows troubleshooting?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A memory dump, also known as a crash dump or a system dump, is a snapshot of the contents of a computer&#39;s random-access memory (RAM) at a specific moment when a system crash or a &quot;blue screen of death&quot; (BSOD) occurs in Windows operating systems. When a critical system error occurs, Windows may create a memory dump file to capture the state of the system at the time of the crash.&lt;/p&gt;&lt;p&gt;Memory dumps are useful in Windows troubleshooting for several reasons:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Debugging System Crashes&lt;/b&gt;: When a system encounters a critical error and crashes, the exact cause of the crash may not be immediately apparent. Analyzing the memory dump can provide valuable information about the state of the system, the processes running, and the drivers in use at the time of the crash. This data can help identify the root cause of the issue and facilitate troubleshooting.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Understanding Blue Screen Errors: &lt;/b&gt;Blue Screen of Death (BSOD) errors are often accompanied by cryptic error codes that are difficult for users to interpret. Memory dumps contain more detailed information about the system&#39;s state at the time of the crash, including the error code and relevant debugging data. This can assist in deciphering the cause of the BSOD.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Reconstructing Events:&lt;/b&gt; Memory dumps are like snapshots of the system&#39;s memory, allowing analysts or support personnel to review the state of the system just before the crash. This can help reconstruct the events leading up to the crash, such as the sequence of processes and the behavior of drivers.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Debugging Application Issues:&lt;/b&gt; Memory dumps can also be created for individual applications when they encounter errors or crashes. These dumps, known as application crash dumps, provide developers with valuable information to diagnose and fix application-specific issues.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Remote Troubleshooting: &lt;/b&gt;In some cases, memory dumps can be collected and analyzed remotely, allowing support personnel to investigate and troubleshoot system crashes without direct access to the affected machine.&lt;/p&gt;&lt;p&gt;There are different types of memory dumps that can be created in Windows, including:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Small Memory Dump (Minidump): &lt;/b&gt;Contains basic information about the crash, such as the stop code and the memory addresses of the crash location. It is smaller in size and is often used for most troubleshooting scenarios.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Kernel Memory Dump&lt;/b&gt;: Contains information about the kernel memory at the time of the crash. It provides more comprehensive data than a minidump but is still smaller in size than a full memory dump.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Complete Memory Dump:&lt;/b&gt; Captures the entire contents of the system&#39;s RAM at the time of the crash. It is the largest memory dump type and provides the most detailed information for debugging, but it requires significant disk space.&lt;/li&gt;&lt;/ol&gt;Memory dumps can be essential tools for system administrators, developers, and support personnel to diagnose and resolve complex issues that result in system crashes or application errors in Windows environments.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2) Explain the differences between a complete memory dump, kernel memory dump, and small memory dump.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The main differences between a complete memory dump, kernel memory dump, and small memory dump lie in the amount of information they capture and the size of the resulting dump file. Each type of memory dump serves different purposes and has specific use cases. Let&#39;s explore the differences:&lt;/p&gt;&lt;p&gt;1. Complete Memory Dump:&lt;/p&gt;&lt;b&gt;Description:&lt;/b&gt; As the name suggests, a complete memory dump captures the entire contents of the computer&#39;s RAM at the time of a system crash. It includes the data in use by the operating system, applications, and drivers, providing a comprehensive snapshot of the system&#39;s memory.&lt;br /&gt;&lt;b&gt;File Size&lt;/b&gt;: Complete memory dumps are the largest among the three types, potentially taking up a considerable amount of disk space, often several gigabytes in size.&lt;br /&gt;&lt;b&gt;Use Cases: &lt;/b&gt;Complete memory dumps are primarily used when detailed debugging information is required to investigate complex system crashes. They provide the most comprehensive data, allowing in-depth analysis of the crash for advanced debugging scenarios.&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;2. Kernel Memory Dump:&lt;br /&gt;&lt;b&gt;Description:&lt;/b&gt; A kernel memory dump captures only the kernel memory space, which contains essential data about the Windows kernel and device drivers. It omits the data of user-mode applications, resulting in a smaller dump file compared to a complete memory dump.&lt;br /&gt;&lt;b&gt;File Size:&lt;/b&gt; Kernel memory dumps are larger than small memory dumps but smaller than complete memory dumps. Their size can vary but is typically several hundred megabytes.&lt;br /&gt;&lt;b&gt;Use Cases:&lt;/b&gt; Kernel memory dumps are often used for troubleshooting crashes related to drivers or kernel-level issues. They provide enough information to analyze most system crashes without co0nsuming excessive disk space.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;3. Small Memory Dump (Minidump):&lt;br /&gt;&lt;b&gt;Description&lt;/b&gt;: A small memory dump captures a minimal amount of information about the crash. It includes the stop code, some key data structures, and the contents of the stack trace for each thread at the time of the crash. However, it does not include much user-mode or kernel-mode memory data.&lt;br /&gt;&lt;b&gt;File Size:&lt;/b&gt; Small memory dumps are significantly smaller than both complete and kernel memory dumps. They are usually a few megabytes in size.&lt;br /&gt;&lt;b&gt;Use Cases&lt;/b&gt;: Small memory dumps are widely used for routine troubleshooting of system crashes. They provide enough data to identify the cause of many common BSOD errors and are the default dump type in most Windows systems.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How do you generate a memory dump on a Windows system manually?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;To manually generate a memory dump on a Windows system, you can use the built-in utility called &quot;Windows Error Reporting&quot; (WER) or configure the system to create memory dumps when specific types of crashes occur. Here&#39;s how you can do it:&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Method 1: &lt;/u&gt;&lt;/i&gt;&lt;/b&gt;Generating a Manual Memory Dump via Windows Error Reporting (WER):&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Trigger the System Crash:&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;To generate a memory dump manually, you need to trigger a system crash (a &quot;blue screen&quot; crash). You can do this by pressing the keyboard combination &quot;Right Ctrl&quot; + &quot;Scroll Lock&quot; (twice) + &quot;Scroll Lock.&quot; This key combination is designed to cause a system crash and initiate the memory dump process.&lt;/p&gt;&lt;p&gt;&lt;b&gt;2. Check for Memory Dump File:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;After the crash, the memory dump file will be created in the default dump file location, typically in the %SystemRoot%\Minidump folder. The file will have a &quot;.dmp&quot; extension and contain information about the crash.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;Method 2: &lt;/i&gt;&lt;/b&gt;Configuring Automatic Memory Dumps:&lt;/p&gt;&lt;p&gt;You can also configure Windows to automatically generate memory dumps when specific types of crashes occur. To do this, follow these steps:&lt;/p&gt;&lt;p&gt;&lt;b&gt;1. Open System Properties:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Right-click on &quot;This PC&quot; or &quot;My Computer&quot; and select &quot;Properties.&quot; Alternatively, you can press the &quot;Windows key + Pause/Break&quot; to open the System window.&lt;/p&gt;&lt;p&gt;&lt;b&gt;2. Access Advanced System Settings:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In the System window, click on &quot;Advanced system settings&quot; on the left-hand side. This will open the System Properties dialog box.&lt;/p&gt;&lt;p&gt;&lt;b&gt;3. Open Startup and Recovery Settings:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In the System Properties dialog box, click on the &quot;Settings&quot; button under the &quot;Startup and Recovery&quot; section.&lt;/p&gt;&lt;p&gt;&lt;b&gt;4. Configure Dump Settings:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In the Startup and Recovery dialog box, under the &quot;System failure&quot; section, you can configure the type of memory dump to be generated when the system encounters a crash. You have three options:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Small memory dump (Minidump): This is the default option and usually sufficient for most troubleshooting scenarios.&lt;/li&gt;&lt;li&gt;Kernel memory dump: Provides more information than a minidump but is smaller than a complete memory dump.&lt;/li&gt;&lt;li&gt;Complete memory dump: Captures the entire contents of the system&#39;s RAM but requires significant disk space.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Select the desired type of dump from the dropdown list.&lt;/p&gt;&lt;p&gt;&lt;b&gt;5. Save Changes:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Click &quot;OK&quot; to apply the changes and close the Startup and Recovery dialog box.&lt;/p&gt;&lt;p&gt;After configuring these settings, Windows will automatically generate memory dumps according to your selection when a system crash occurs.&lt;/p&gt;&lt;p&gt;Please note that generating a memory dump manually via WER is useful for testing purposes or if you need to capture a dump immediately when a system is experiencing issues. The automatic memory dump configuration is more suitable for routine troubleshooting and capturing dumps when you cannot manually initiate a crash.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Which tool(s) do you use to analyze memory dumps, and why?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The choice of tool depends on the type of analysis required and the expertise of the user. Here are a few commonly used tools:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;1. WinDbg (Windows Debugger):&lt;/b&gt;&lt;br /&gt;WinDbg is a powerful and advanced debugger provided by Microsoft as part of the Windows SDK (Software Development Kit). It is a command-line tool designed for kernel-mode and user-mode debugging. It is commonly used for deep analysis of memory dumps and diagnosing complex system crashes. WinDbg supports various commands for inspecting memory, examining data structures, and analyzing call stacks.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. Visual Studio Debugger:&lt;/b&gt;&lt;br /&gt;For developers using Microsoft Visual Studio, the built-in debugger can also be used to analyze memory dumps. Visual Studio supports post-mortem debugging, which allows you to load a memory dump and inspect the state of the application at the time of the crash. This is especially useful for diagnosing application-specific issues.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;3. DebugDiag (Debug Diagnostic Tool):&lt;/b&gt;&lt;br /&gt;DebugDiag is a user-friendly graphical tool provided by Microsoft to help diagnose memory-related issues in Windows applications. It can analyze memory dumps and provide reports with detailed information about potential memory leaks, crashes, and performance problems.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4. ProcDump:&lt;/b&gt;&lt;br /&gt;ProcDump is a command-line utility provided by Microsoft&#39;s Sysinternals suite. It can generate memory dumps based on specific criteria, such as CPU usage, memory usage, or unhandled exceptions. It is useful for capturing dumps of specific processes when certain conditions are met.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;5. BlueScreenView:&lt;/b&gt;&lt;br /&gt;BlueScreenView is a lightweight and user-friendly tool that does not perform in-depth debugging but can quickly analyze minidump files created during BSOD crashes. It provides a simplified view of the crash details, including the stop code and related information.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;6. WinCrashReport:&lt;/b&gt;&lt;br /&gt;WinCrashReport is another user-friendly tool that reads and displays crash reports from memory dump files. It provides an easy-to-read summary of the crash data and can be useful for quick analysis.&lt;br /&gt;It&#39;s important to note that analyzing memory dumps can be a complex task, especially for kernel-mode debugging. Knowledge of debugging techniques, system internals, and programming is often required to interpret the information correctly and identify the root cause of the crash. Therefore, users should choose a tool that matches their level of expertise and the type of analysis they need to perform.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Can you mention some of the common causes of system crashes that might be identified from memory dump analysis?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Memory dump analysis can reveal valuable insights into the causes of system crashes on Windows systems. While the specific cause may vary depending on the crash and the system&#39;s configuration, here are some common issues that memory dump analysis might identify:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;1. Faulty or Incompatible Device Drivers:&lt;/b&gt;&lt;br /&gt;Outdated, improperly installed, or incompatible device drivers can cause system crashes. Memory dump analysis may point to specific drivers as the root cause of the crash.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Hardware Issues:&lt;/b&gt;&lt;br /&gt;Problems with hardware components like faulty RAM, overheating, or failing hard drives can lead to system crashes. Memory dump analysis may provide clues about hardware-related errors.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;3. Software Conflicts:&lt;/b&gt;&lt;br /&gt;Conflicts between different software components, such as third-party applications, drivers, or system services, can cause crashes. Memory dump analysis may highlight conflicts between modules.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Memory Corruption:&lt;/b&gt;&lt;br /&gt;Memory corruption can occur due to various reasons, including software bugs, faulty hardware, or malicious software. Memory dump analysis may reveal signs of memory corruption.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. Stack Overflow or Stack Underflow&lt;/b&gt;:&lt;br /&gt;Stack overflow occurs when a program exhausts its available stack space, while stack underflow happens when it accesses an invalid memory location in the stack. Memory dump analysis can identify these issues.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. Heap Corruption:&lt;/b&gt;&lt;br /&gt;Heap corruption occurs when a program accesses memory beyond the bounds of allocated heap blocks, leading to undefined behavior and crashes. Memory dump analysis may detect signs of heap corruption.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;7.Invalid or NULL Pointer Dereferences:&lt;/b&gt;&lt;br /&gt;Dereferencing an invalid or NULL pointer can lead to access violation errors and cause system crashes. Memory dump analysis can pinpoint the locations where these errors occurred.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. Resource Exhaustion:&lt;/b&gt;&lt;br /&gt;Running out of system resources like memory, handles, or disk space can trigger crashes. Memory dump analysis may indicate resource exhaustion issues.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;9. Interrupt Conflicts:&lt;/b&gt;&lt;br /&gt;Interrupt conflicts between hardware devices or drivers can cause system instability. Memory dump analysis may uncover conflicts related to hardware interrupts.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;10. Malware or Viruses:&lt;/b&gt;&lt;br /&gt;Malicious software can cause crashes by corrupting critical system files or causing unexpected behavior. Memory dump analysis may reveal signs of malware activity.&lt;br /&gt;&lt;br /&gt;Remember that memory dump analysis can be complex and requires expertise in debugging techniques and system internals. Identifying the exact cause of a system crash may involve a thorough investigation and may not always be immediately apparent from the memory dump alone. In some cases, multiple factors may contribute to a crash, making it essential to carefully analyze the data and gather additional information if needed.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Walk us through the steps you would take to analyze a memory dump and identify the cause of a system crash.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;step-by-step guide for analyzing a memory dump to identify the cause of a system crash on a Windows system. Please note that memory dump analysis can be complex, and the steps may vary depending on the specific crash scenario and the tools being used. Here&#39;s a high-level overview of the process:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1: Collect the Memory Dump&lt;/b&gt;&lt;br /&gt;Obtain the memory dump file generated during the system crash. Depending on the configuration, this could be a small memory dump (minidump), a kernel memory dump, or a complete memory dump.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 2: Install Debugging Tools&lt;/b&gt;&lt;br /&gt;If you haven&#39;t already, download and install the appropriate debugging tools for Windows. The most commonly used tool for memory dump analysis is WinDbg.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 3: Open the Memory Dump in WinDbg&lt;/b&gt;&lt;br /&gt;Launch WinDbg, either the standalone version or the one provided with Visual Studio, and load the memory dump file using the &quot;File&quot; menu.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 4: Set Symbol File Path&lt;/b&gt;&lt;br /&gt;To analyze the memory dump effectively, WinDbg requires access to the correct symbol files that correspond to the version of Windows and its components installed on the crashed system. Set the symbol file path in WinDbg using the &quot;File&quot; menu &amp;gt; &quot;Symbol File Path.&quot;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 5: Analyze the Crash Dump&lt;/b&gt;&lt;br /&gt;Examine the crash details, including the stop code and bug check parameters. These details can provide valuable information about the nature of the crash.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Step 6: Review the Call Stack&lt;/b&gt;&lt;br /&gt;Examine the call stack to see the sequence of function calls leading up to the crash. The call stack can help identify the point of failure and the involved modules.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 7: Identify the Faulting Module&lt;/b&gt;&lt;br /&gt;Determine the module or driver responsible for the crash by analyzing the call stack and memory contents. This module is often indicated by a filename in the call stack.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 8: Check for Known Issues or Bug Reports&lt;/b&gt;&lt;br /&gt;Research the identified module or driver to check if there are any known issues, bug reports, or updates related to it. Sometimes, the vendor may have released a fix or update that addresses the problem.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Step 9: Update Drivers and Software&lt;/b&gt;&lt;br /&gt;If the crash is caused by outdated or incompatible drivers or software, update them to the latest versions to see if it resolves the issue.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 10: Analyze Memory and Data Structures&lt;/b&gt;&lt;br /&gt;Use WinDbg commands and extensions to inspect memory, data structures, and registers to identify potential memory corruption, pointer issues, or other anomalies.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 11: Conduct Further Analysis (Optional)&lt;/b&gt;&lt;br /&gt;For more complex issues, you may need to analyze specific sections of memory, examine thread states, or perform kernel-mode debugging. This may require deeper knowledge and expertise in debugging techniques.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Step 12: Test and Verify&lt;/b&gt;&lt;br /&gt;If you find a potential solution or fix, test it to verify whether it resolves the issue and prevents future crashes.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Remember that memory dump analysis requires a good understanding of debugging concepts, operating system internals, and programming. Additionally, some crashes may be caused by a combination of factors, making the analysis process more intricate. Professional developers, system administrators, or support personnel often carry out in-depth memory dump analysis to diagnose and resolve complex system crash issues.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How do you determine if a memory dump indicates a hardware issue or a software/driver problem?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Determining whether a memory dump indicates a hardware issue or a software/driver problem requires careful analysis of the crash details and the context surrounding the crash. Here are some key steps and indicators to help differentiate between the two:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1.Analyze the Stop Code and Bug Check Parameters:&lt;/b&gt;&lt;br /&gt;The stop code and bug check parameters displayed in the memory dump provide valuable information about the nature of the crash. Some bug check codes are specifically associated with hardware issues (e.g., &quot;0x124&quot; for hardware-related WHEA_UNCORRECTABLE_ERROR), while others are more likely related to software issues (e.g., &quot;0x3B&quot; for SYSTEM_SERVICE_EXCEPTION).&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. Check for Known Driver or Software Issues:&lt;/b&gt;&lt;br /&gt;If the crash is related to a specific driver or software module, check for known issues or bug reports associated with that component. Driver-related crashes are common, and vendors may release updates or hotfixes to address such issues.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;3.Review the Call Stack:&lt;/b&gt;&lt;br /&gt;Examine the call stack to see the sequence of function calls leading up to the crash. Hardware-related crashes might have less informative call stacks, while software or driver-related crashes may show a more detailed sequence of calls involving specific modules.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4. Inspect the Memory Contents:&lt;/b&gt;&lt;br /&gt;Analyze the memory contents and data structures to identify potential memory corruption or invalid pointer references. Memory corruption issues are more likely to be software-related, although certain hardware faults can also lead to memory corruption.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;5. Consider the Context of the Crash:&lt;/b&gt;&lt;br /&gt;Take into account the context in which the crash occurred. If the crash is triggered consistently during specific tasks or actions, it may suggest a software or driver problem. On the other hand, random and unpredictable crashes may be indicative of a hardware issue.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;6. Check Event Logs and System Information:&lt;/b&gt;&lt;br /&gt;Examine the system&#39;s event logs and system information for any other relevant error messages or indications of hardware problems, such as disk errors, temperature warnings, or memory-related events.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;7.Review Minidump vs. Full Memory Dump:&lt;/b&gt;&lt;br /&gt;If you have a full memory dump, it may provide more comprehensive information about the system state at the time of the crash, making it easier to identify hardware-related issues. Minidumps may have limited data, making it more challenging to determine the root cause.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;8.Perform Hardware Diagnostics:&lt;/b&gt;&lt;br /&gt;If you suspect a hardware issue based on the memory dump analysis, consider running hardware diagnostics on the system, including memory tests, hard drive tests, and temperature monitoring.&lt;/p&gt;&lt;p&gt;It&#39;s important to note that the distinction between hardware and software/driver problems may not always be clear-cut, as some issues can have mixed causes or interactions between hardware and software. In complex cases, a thorough analysis may involve a combination of memory dump analysis, event log examination, hardware diagnostics, and further testing.&lt;/p&gt;&lt;p&gt;For critical systems or situations where you&#39;re uncertain about the cause of the crash, it&#39;s advisable to seek the expertise of experienced system administrators, developers, or support personnel to perform a detailed investigation.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the most common debugging commands you use while analyzing a memory dump?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;list of common debugging commands used by analysts and developers when analyzing a memory dump with WinDbg. These commands help inspect memory, examine data structures, analyze call stacks, and extract relevant information from the dump file. Here are some of the most commonly used commands:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. !analyze -v:&lt;/b&gt;&lt;br /&gt;This is one of the most frequently used commands to trigger automatic analysis of the crash dump and obtain a preliminary summary of the crash information, including the stop code, bug check parameters, and a probable cause.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. kv or k:&lt;/b&gt;&lt;br /&gt;These commands display the current thread&#39;s call stack. &quot;kv&quot; provides a verbose output with source file and line number information, while &quot;k&quot; displays a shorter version without additional details.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;3. lm (list modules):&lt;/b&gt;&lt;br /&gt;This command lists all the loaded modules (drivers and libraries) with their base addresses, sizes, and symbols.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4. !process 0 0:&lt;/b&gt;&lt;br /&gt;This command lists all the running processes along with their process IDs (PIDs) and parent process IDs (PPIDs).&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;5. !thread:&lt;/b&gt;&lt;br /&gt;This command displays information about the current threads in the system, including their IDs, states, and stack traces.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;6. !poolused or !poolused X:&lt;/b&gt;&lt;br /&gt;These commands display information about the pool memory usage, showing the number of bytes used in each pool tag. &quot;X&quot; can be replaced with a pool tag to see memory usage for a specific pool type.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;7. !mex.m:&lt;/b&gt;&lt;br /&gt;This command displays the contents of the MmSubsectionBase field of the system&#39;s memory manager. It can be useful for investigating memory sections.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;8. dt (display type):&lt;/b&gt;&lt;br /&gt;This command allows you to display the contents of a data structure defined by a specific type. For example, &quot;dt nt!_ETHREAD&quot; displays the contents of the ETHREAD (executive thread) structure.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;9. !address:&lt;/b&gt;&lt;br /&gt;This command displays information about a specific memory address, such as the allocation size, protection, and region details.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;10. !error (error code):&lt;/b&gt;&lt;br /&gt;This command provides a description of a given error code. It&#39;s helpful for understanding the meaning of specific error codes seen in the crash analysis.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;11. !handle X:&lt;/b&gt;&lt;br /&gt;This command displays information about handles in the system, where &quot;X&quot; is the process ID (PID) of the target process.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;These commands represent only a fraction of the many available commands in WinDbg and other debugging tools. The appropriate commands to use depend on the nature of the crash and the specific details you want to investigate during the memory dump analysis. Debugging experts often develop a proficiency in using these commands and understanding how to interpret the output to diagnose and resolve system crashes effectively.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain the concept of &quot;bug check codes&quot; (stop codes) and their significance in memory dump analysis.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In the context of Windows operating systems, a &quot;bug check code,&quot; also known as a &quot;stop code,&quot; is a unique hexadecimal number that is associated with a specific type of system crash or &quot;blue screen of death&quot; (BSOD). When a critical error occurs in Windows, the system generates a memory dump to capture the state of the system at the time of the crash. The memory dump contains valuable information that helps in diagnosing the cause of the crash, and the bug check code is a crucial piece of this information.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;The bug check code is usually displayed on the BSOD screen and is also included in the memory dump file. It indicates the nature of the error that caused the crash and provides a starting point for memory dump analysis. Each bug check code is associated with a specific &quot;Bug Check Code Reference&quot; in Microsoft&#39;s documentation, which explains the meaning and potential causes of the error.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;The significance of bug check codes in memory dump analysis includes:&lt;br /&gt;&lt;br /&gt;1. &lt;b&gt;Identifying the Nature of the Crash&lt;/b&gt;: The bug check code helps identify the specific type of system crash that occurred. Different bug check codes correspond to various types of errors, such as memory corruption, driver issues, hardware faults, system service exceptions, etc.&lt;br /&gt;&lt;br /&gt;2. &lt;b&gt;Narrowing Down the Cause&lt;/b&gt;: Memory dump analysis can be complex, but the bug check code narrows down the scope of investigation. It helps focus the analysis on the likely causes associated with that particular error code.&lt;br /&gt;&lt;br /&gt;3. &lt;b&gt;Troubleshooting and Debugging&lt;/b&gt;: With the bug check code, developers, system administrators, and support personnel can search for relevant documentation and online resources to understand the potential causes and solutions for the specific error.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;4. Filtering and Organizing Memory Dumps&lt;/b&gt;: In large environments with many systems generating memory dumps, bug check codes can be used to categorize and organize the crash data for easier management and analysis.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;For example, some common bug check codes include:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;0x0000001A: MEMORY_MANAGEMENT - Indicates memory-related issues like corruption or allocation errors.&lt;/li&gt;&lt;li&gt;0x000000D1: DRIVER_IRQL_NOT_LESS_OR_EQUAL - Typically caused by faulty drivers or hardware.&lt;/li&gt;&lt;li&gt;0x0000007E: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED - Often associated with driver or software issues.&lt;/li&gt;&lt;li&gt;0x00000050: PAGE_FAULT_IN_NONPAGED_AREA - Indicates memory access errors.&lt;/li&gt;&lt;/ul&gt;When analyzing a memory dump, the first step often involves examining the bug check code to understand the general type of crash. From there, further analysis, such as examining the call stack, inspecting memory contents, and reviewing specific driver or module information, can be performed to pinpoint the root cause of the crash.&lt;br /&gt;&lt;br /&gt;Overall, bug check codes play a vital role in memory dump analysis by providing essential clues about the nature of the crash and guiding the investigation process towards identifying and resolving the underlying issues.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Have you encountered any specific challenges while analyzing memory dumps? How did you overcome them?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;1) Complexity and Expertise:&lt;/b&gt; Memory dump analysis requires a deep understanding of debugging techniques, operating system internals, and programming concepts. Overcoming this challenge involves building expertise through education, practice, and hands-on experience with debugging tools.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;2. Data Overload:&lt;/b&gt; Memory dumps can contain a vast amount of data, making it challenging to identify relevant information. Analysts overcome this challenge by focusing on specific areas of interest, using commands to extract the needed data, and systematically narrowing down the scope of analysis.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Ambiguous Causes:&lt;/b&gt; Memory dumps may not always have clear and straightforward causes. An issue might have multiple contributing factors or involve interactions between software and hardware. Analysts address this by considering various possibilities, looking for patterns, and applying systematic analysis techniques.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;False Positives: &lt;/b&gt;Automated analysis tools might provide preliminary findings that turn out to be false positives or not directly related to the actual issue. Overcoming this challenge requires manual verification and cross-referencing with other sources of information.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Unique Scenarios:&lt;/b&gt; Every crash can be unique, and the same bug check code might have different underlying causes in different contexts. Analysts must adapt their approach to accommodate the specific circumstances of each memory dump.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resource Limitations:&lt;/b&gt; In some cases, resource limitations might prevent exhaustive analysis. This challenge can be managed by focusing on the most critical and likely causes first and gradually expanding the investigation if necessary.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Lack of Context:&lt;/b&gt; Memory dumps lack the real-time context of the system&#39;s behavior leading up to the crash. Analysts address this by combining memory dump analysis with event logs, system monitoring data, and user input to build a more complete picture.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Kernel-Mode Debugging:&lt;/b&gt; Debugging kernel-mode issues can be more complex than user-mode debugging due to lower-level system interactions. Overcoming this challenge requires familiarity with kernel debugging techniques and tools.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Intermittent Issues:&lt;/b&gt; Some issues may only occur intermittently, making them challenging to reproduce and analyze. To overcome this challenge, analysts may need to rely on detailed event logs, performance monitoring, and historical data.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Limited Information: &lt;/b&gt;Minidump files, while smaller and faster to generate, might lack the level of detail needed for in-depth analysis. Overcoming this challenge involves optimizing the use of available data and employing advanced techniques if required.&lt;br /&gt;&lt;br /&gt;Overall, effective memory dump analysis involves a combination of expertise, systematic approaches, collaboration with peers, utilization of debugging tools, and a willingness to learn from each analysis to improve skills over time.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;How would you analyze a memory leak using memory dump analysis?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Analyzing a memory leak using memory dump analysis involves identifying the processes or components responsible for excessive memory consumption and pinpointing the root cause of the leak. Here&#39;s a step-by-step guide on how to approach memory leak analysis using memory dump analysis techniques:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;1. Collect the Memory Dump:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;Capture a memory dump of the process or application that is exhibiting memory leak behavior. This can be done using tools like DebugDiag, ProcDump, or manual triggering if applicable.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. Identify the Affected Process:&lt;/b&gt;&lt;br /&gt;Determine the process or application that is consuming excessive memory. This could be evident from system monitoring, performance data, or user reports.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;3. Open the Memory Dump:&lt;/b&gt;&lt;br /&gt;Load the memory dump into a debugging tool like WinDbg or Visual Studio.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4. Analyze Heap Usage:&lt;/b&gt;&lt;br /&gt;Use commands like !heap -s to analyze the heap usage within the process. Look for abnormal increases in heap allocations and deallocations over time.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;5. Identify Leaked Objects:&lt;/b&gt;&lt;br /&gt;Use the !heap -flt s command to filter heap allocations by specific criteria, such as allocation size or allocation call stack. This can help you identify leaked objects or allocations.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;6.Inspect Call Stacks:&lt;/b&gt;&lt;br /&gt;Examine the call stacks associated with leaked memory allocations to identify the code paths responsible for allocating memory that is not being deallocated.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;7. Identify Responsible Code Paths:&lt;/b&gt;&lt;br /&gt;Review the call stacks to identify the sections of code responsible for the memory allocations. This could involve application-specific code or third-party libraries.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;8. Examine Object References:&lt;/b&gt;&lt;br /&gt;Analyze the references to the leaked objects to understand why they are not being released. Look for references that prevent objects from being garbage-collected or deallocated.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;9. Check for Circular References:&lt;/b&gt;&lt;br /&gt;Circular references between objects can prevent proper garbage collection. Analyze references between objects to determine if circular references are contributing to the memory leak.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;10. Examine Global Objects and Singletons:&lt;/b&gt;&lt;br /&gt;Global objects or singleton patterns can sometimes lead to memory leaks if they are not properly managed. Investigate whether any such objects are contributing to the issue.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;11. Inspect Finalization and Disposal:&lt;/b&gt;&lt;br /&gt;If the language or framework supports finalization or disposal methods (e.g., C# IDisposable), ensure that objects are being properly finalized or disposed to release resources.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;12. Review External Resources:&lt;/b&gt;&lt;br /&gt;Memory leaks might also be related to external resources like file handles or network connections not being closed properly. Check for any resources that should be released but are not.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;13.Test and Verify Fixes:&lt;/b&gt;&lt;br /&gt;After identifying potential causes of the memory leak, implement fixes or optimizations to address the issues. Test the application thoroughly to ensure that the memory leak is resolved.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;14.Monitor for Recurrence:&lt;/b&gt;&lt;br /&gt;Continue monitoring the application over time to verify that the memory leak has been successfully addressed and does not reoccur.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;Remember that memory leak analysis requires a solid understanding of programming languages, debugging tools, and memory management concepts. It&#39;s also essential to have a good grasp of the application&#39;s architecture and behavior to accurately identify the causes of the memory leak. Collaboration with developers and relevant stakeholders can provide valuable insights and help expedite the analysis and resolution process.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is the difference between user-mode and kernel-mode memory dumps?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;User-mode and kernel-mode memory dumps are two different types of memory dumps that capture different sets of data when a system crash occurs in a Windows operating system. These dumps are created to help diagnose issues and troubleshoot crashes, but they focus on different levels of the operating system and software components. Here&#39;s the difference between the two:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;User-Mode Memory Dump:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Description: A user-mode memory dump captures the memory space of the user-mode processes that were running at the time of the crash. This includes the memory allocated for user applications and their associated modules.&lt;/li&gt;&lt;li&gt;Scope: User-mode dumps primarily focus on the memory and threads of user-level processes and do not include detailed information about kernel-mode components.&lt;/li&gt;&lt;li&gt;Usage: User-mode dumps are often used when diagnosing application crashes or issues that occur within user-level code. They are smaller in size compared to kernel-mode dumps, making them more manageable for analysis.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Kernel-Mode Memory Dump:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Description: A kernel-mode memory dump captures a broader set of data, including both user-mode and kernel-mode components. It captures the memory used by the Windows kernel, device drivers, and other operating system structures.&lt;/li&gt;&lt;li&gt;Scope: Kernel-mode dumps provide a more comprehensive view of the system&#39;s state at the time of the crash. They include information about processes, threads, system data structures, and device drivers.&lt;/li&gt;&lt;li&gt;Usage: Kernel-mode dumps are valuable for diagnosing system crashes, BSOD errors, and issues that involve interactions between user-mode applications and kernel-mode components. They are larger in size compared to user-mode dumps due to the additional data they capture.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;When choosing between user-mode and kernel-mode memory dumps, consider the nature of the issue you&#39;re troubleshooting. If the problem is isolated to a specific application or user-mode component, a user-mode memory dump might provide sufficient information. On the other hand, if the issue involves system-level components, drivers, or kernel-mode interactions, a kernel-mode memory dump is more appropriate.&lt;/p&gt;&lt;p&gt;It&#39;s also worth noting that there are variations of these memory dumps, such as small memory dumps (minidumps) and complete memory dumps, which capture different amounts of data and can be chosen based on the complexity of the issue and available resources for analysis.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;What is the default location of kernel memory dump?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;On Windows systems, the default location for storing kernel memory dumps (also known as full memory dumps) can vary depending on the version of Windows and the configuration. By default, kernel memory dumps are usually stored in the system&#39;s root directory on the system drive (typically the C: drive), in a file named &quot;MEMORY.DMP.&quot;&lt;br /&gt;&lt;br /&gt;The full path to the default location of the kernel memory dump is often as follows:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;C:\MEMORY.DMP&lt;/p&gt;&lt;div&gt;Please note that the actual location may vary, and in some cases, the memory dumps might be stored in a different directory or on a different drive, especially if the system drive has limited space.&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;If you&#39;re looking to locate or change the location of kernel memory dumps, you can do so through the following steps:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Locating the Default Kernel Dump Location:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Open File Explorer.&lt;/li&gt;&lt;li&gt;Navigate to the root directory of the system drive (usually the C: drive).&lt;/li&gt;&lt;li&gt;Look for the &quot;MEMORY.DMP&quot; file.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;2. Changing the Dump File Location:&lt;/b&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Open the &quot;System Properties&quot; dialog by right-clicking &quot;This PC&quot; or &quot;My Computer&quot; and selecting &quot;Properties.&quot;&lt;/li&gt;&lt;li&gt;Click on &quot;Advanced system settings&quot; on the left-hand side.&lt;/li&gt;&lt;li&gt;In the &quot;System Properties&quot; dialog box, under the &quot;Startup and Recovery&quot; section, click the &quot;Settings&quot; button.&lt;/li&gt;&lt;li&gt;Under &quot;Write debugging information,&quot; you can choose a different location for the dump file or configure a specific location for debugging symbols.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Keep in mind that modifying these settings might require administrative privileges. Additionally, it&#39;s essential to ensure that the selected location has sufficient&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are various reasons of kernel memory dump on windows&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;A kernel memory dump, also known as a full memory dump, is generated on Windows systems when a system crash or &quot;blue screen of death&quot; (BSOD) occurs. Kernel memory dumps capture a snapshot of the entire contents of the system&#39;s RAM at the time of the crash. Various issues can trigger a kernel memory dump, and these crashes can result from a range of factors. Here are some common reasons for kernel memory dumps on Windows:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Hardware Failures:&lt;/b&gt;&lt;br /&gt;Hardware issues such as faulty RAM modules, overheating of components, failing hard drives, or defective hardware can cause system crashes that lead to kernel memory dumps.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Driver Issues:&lt;/b&gt;&lt;br /&gt;Incompatible or outdated device drivers can cause instability in the system, leading to crashes. Kernel memory dumps might occur if a driver attempts to access invalid memory addresses or causes other critical errors.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Software Conflicts:&lt;/b&gt;&lt;br /&gt;Conflicts between software components, including third-party applications and system services, can result in system crashes. Kernel memory dumps may occur when these conflicts lead to unhandled exceptions or critical errors.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;System Service Failures:&lt;/b&gt;&lt;br /&gt;Malfunctioning or crashing system services, which play a critical role in the operating system&#39;s functionality, can lead to crashes that trigger kernel memory dumps.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Kernel-Level Errors:&lt;/b&gt;&lt;br /&gt;Errors occurring at the kernel level, such as invalid memory access, page faults, and other kernel-mode exceptions, can trigger kernel memory dumps. These errors are often indicative of deeper system issues.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Driver Verifier Detection:&lt;/b&gt;&lt;br /&gt;Windows&#39; Driver Verifier tool is used to identify driver-related issues. When enabled, Driver Verifier might detect violations in driver behavior and trigger crashes that result in kernel memory dumps.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Hardware Interrupt Conflicts:&lt;/b&gt;&lt;br /&gt;Conflicts between hardware components or device drivers that handle hardware interrupts can cause system crashes. These crashes can result in kernel memory dumps.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Malware or Security Exploits:&lt;/b&gt;&lt;br /&gt;Malicious software, viruses, or security exploits that compromise system integrity can lead to crashes that trigger kernel memory dumps.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Memory Corruption:&lt;/b&gt;&lt;br /&gt;Memory corruption issues, whether caused by software bugs or hardware faults, can lead to system instability and crashes that result in kernel memory dumps.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Resource Exhaustion:&lt;/b&gt;&lt;br /&gt;Running out of critical system resources, such as memory or kernel-mode resources, can lead to crashes that trigger kernel memory dumps.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Kernel memory dumps are crucial for diagnosing and resolving these issues because they provide a detailed snapshot of the system&#39;s state at the time of the crash. By analyzing the kernel memory dump, technicians and developers can gain insights into the root causes of the crashes and take appropriate steps to address them.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Can you explain the concept of virtual memory and its role in memory dump analysis?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Virtual memory is a memory management technique used by operating systems to provide an abstraction of the physical memory (RAM) and extend the available memory beyond the physical limitations of the hardware. It enables programs to address more memory than is physically installed in the system and allows the operating system to efficiently manage memory resources. Virtual memory plays a significant role in memory dump analysis, especially when analyzing system crashes and memory-related issues.&lt;br /&gt;&lt;br /&gt;Here&#39;s how virtual memory works and its role in memory dump analysis:&lt;br /&gt;&lt;br /&gt;How Virtual Memory Works:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Address Space: &lt;/b&gt;Each process running on a system has its own virtual address space, which is divided into pages. These virtual pages are the units of memory allocation and are typically smaller than physical memory pages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Page Tables:&lt;/b&gt; The operating system maintains a data structure called a page table that maps virtual addresses to physical addresses. This mapping allows the system to access data stored in physical memory even if it&#39;s not directly accessible by the process.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;3. Page Faults&lt;/b&gt;: When a process tries to access a virtual page that is not currently in physical memory (a situation called a page fault), the operating system triggers a page fault handler. The handler retrieves the required page from disk (if it&#39;s stored there) and updates the page table accordingly.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Role in Memory Dump Analysis:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Capturing the System State:&lt;/b&gt; When a system crash or BSOD occurs, a memory dump captures the state of the system&#39;s virtual memory, including both physical memory and data that has been paged out to disk. This allows analysis of the entire system&#39;s memory, not just the portion that fits into physical RAM.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Diagnosing Memory-Related Issues: &lt;/b&gt;Virtual memory plays a crucial role in diagnosing memory-related issues, such as memory leaks, corruption, and access violations. Memory dump analysis provides insights into how processes interact with virtual memory and whether any issues exist in the management of memory resources.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Identifying Memory Allocation Patterns&lt;/b&gt;: Memory dump analysis can reveal patterns of memory allocation and deallocation, helping diagnose memory leaks or inefficient memory usage by processes or applications.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Detecting Invalid Memory Accesses:&lt;/b&gt; When analyzing memory dump call stacks, it&#39;s essential to consider virtual memory mapping. Invalid memory accesses, such as accessing unallocated or already freed memory, can be detected based on the addresses involved in the crash.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Analyzing Page Faults: I&lt;/b&gt;f the memory dump analysis shows frequent page faults, it might indicate issues with memory management, excessive paging, or memory pressure on the system.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Identifying Paged Data&lt;/b&gt;: Virtual memory management can lead to data being paged in and out of physical memory. Analyzing paged data can help understand the context of the crash and uncover the memory regions involved.&lt;br /&gt;&lt;br /&gt;In memory dump analysis, understanding virtual memory concepts is vital for correctly interpreting memory addresses, analyzing data structures, and identifying the source of memory-related problems. It allows analysts to make sense of the memory dump&#39;s contents, effectively diagnose issues, and determine whether they are related to physical memory, virtual memory, or a combination of both.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Describe the role of WinDbg and its essential commands in memory dump analysis.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;WinDbg is a powerful and widely used debugger provided by Microsoft for analyzing memory dumps, diagnosing system crashes, and troubleshooting complex software and hardware issues on Windows systems. It offers a command-line interface and supports both user-mode and kernel-mode debugging. WinDbg is especially valuable for memory dump analysis because it provides a wide range of commands and features tailored to this task. Here&#39;s an overview of WinDbg&#39;s role and some essential commands for memory dump analysis:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;WinDbg is a powerful and widely used debugger provided by Microsoft for analyzing memory dumps, diagnosing system crashes, and troubleshooting complex software and hardware issues on Windows systems. It offers a command-line interface and supports both user-mode and kernel-mode debugging. WinDbg is especially valuable for memory dump analysis because it provides a wide range of commands and features tailored to this task. Here&#39;s an overview of WinDbg&#39;s role and some essential commands for memory dump analysis:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Role of WinDbg in Memory Dump Analysis:&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;WinDbg allows analysts to load memory dump files (user-mode or kernel-mode) and perform in-depth analysis to diagnose the root cause of system crashes, application failures, memory leaks, and other issues.&lt;/li&gt;&lt;li&gt;It provides access to call stacks, registers, memory contents, and various debugging extensions that help uncover the sequence of events leading up to the crash.&lt;/li&gt;&lt;li&gt;WinDbg helps interpret bug check codes, identify faulty drivers, examine heap and stack data, analyze threads, and inspect memory corruption issues.&lt;/li&gt;&lt;/ul&gt;Essential WinDbg Commands for Memory Dump Analysis:&lt;br /&gt;&lt;br /&gt;!analyze -v:&lt;br /&gt;Automatically analyzes the memory dump and provides a preliminary summary of the crash, including the bug check code, parameters, and possible causes.&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;.reload /f:&lt;br /&gt;Refreshes symbol information, allowing WinDbg to access debug symbols related to the operating system, drivers, and modules. Symbols are essential for meaningful analysis.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;lm (List Modules):&lt;br /&gt;Lists all loaded modules (drivers and libraries) along with their base addresses, sizes, and symbols.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!process 0 0:&lt;br /&gt;Lists all running processes along with their Process IDs (PIDs) and Parent Process IDs (PPIDs).&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!thread:&lt;br /&gt;Displays information about the current threads in the system, including their IDs, states, and stack traces.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!heap -s:&lt;br /&gt;Displays an overview of heap usage, showing the sizes and number of heaps in the process.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!poolused /t:&lt;br /&gt;Displays memory pool usage statistics, categorizing pool usage by pool tag.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!analyze -v:&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;This command triggers the automated analysis of the crash dump, providing a preliminary summary of the crash, bug check code, parameters, and possible causes.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!peb:&lt;br /&gt;Displays the Process Environment Block (PEB) of the specified process, containing information about process parameters, environment variables, and loaded modules.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!locks:&lt;br /&gt;Displays information about locks held by threads, helping identify potential deadlocks or synchronization issues.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;!address -summary:&lt;br /&gt;Provides an overview of memory regions in the process, including the stack, heap, and module addresses.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;dt (Display Type):&lt;br /&gt;This command allows you to display the contents of a data structure defined by a specific type. For example, &quot;dt nt!_ETHREAD&quot; displays the contents of the ETHREAD (executive thread) structure.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;These are just a few essential WinDbg commands for memory dump analysis. WinDbg offers a vast array of commands and extensions, and the choice of commands depends on the specific analysis goals and the issues being investigated. Developing familiarity with these commands, along with the ability to interpret their output, is crucial for effective memory dump analysis.&lt;br /&gt;&lt;br /&gt;&lt;b style=&quot;color: red;&quot;&gt;How would you approach analyzing a memory dump from a remote system?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Analyzing a memory dump from a remote system involves some additional steps compared to analyzing a local memory dump. Remote memory dump analysis can be useful when you&#39;re dealing with a system that&#39;s not physically accessible or when you&#39;re performing analysis in a controlled environment. Here&#39;s how you can approach analyzing a memory dump from a remote system:&lt;br /&gt;&lt;br /&gt;Prerequisites:&lt;br /&gt;1. &lt;b&gt;Access to the Remote System: &lt;/b&gt;You need administrative access or appropriate privileges on the remote system to collect the memory dump and perform analysis.&lt;br /&gt;2. &lt;b&gt;Network Connectivity:&lt;/b&gt; Ensure that the remote system is accessible over the network and that you can establish a connection to it.&lt;br /&gt;3. &lt;b&gt;Debugging Tools:&lt;/b&gt; Install the required debugging tools, such as WinDbg, on your local machine.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Steps:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Collect the Remote Memory Dump:&lt;/b&gt;&lt;br /&gt;On the remote system, generate a memory dump using tools like DebugDiag, ProcDump, or Windows Error Reporting. Ensure that the dump is saved to a location accessible from your local machine.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2. Transfer the Memory Dump to Your Local Machine:&lt;/b&gt;&lt;br /&gt;Use secure file transfer methods (e.g., SCP, SMB, FTP) to copy the memory dump from the remote system to your local machine. Make sure to maintain the integrity of the memory dump during the transfer.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;3. Open the Memory Dump in WinDbg:&lt;/b&gt;&lt;br /&gt;Launch WinDbg on your local machine.&lt;br /&gt;Use the &quot;File&quot; menu to open the memory dump file you transferred from the remote system.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;4.Set Symbol File Path:&lt;/b&gt;&lt;br /&gt;Configure WinDbg to access symbol files. You can use Microsoft&#39;s public symbol servers or provide the path to symbols manually.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;5.Set Up Symbol Path for Remote System:&lt;/b&gt;&lt;br /&gt;If the memory dump references modules that are not present on your local system, configure the symbol path to include the location of symbols from the remote system.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;6.Analyze the Memory Dump:&lt;/b&gt;&lt;br /&gt;Use the same memory dump analysis techniques you would use for a local dump. Execute WinDbg commands, inspect call stacks, examine memory contents, and analyze other relevant information.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;7. Interpret Results and Diagnose Issues:&lt;/b&gt;&lt;br /&gt;Interpret the output of WinDbg commands and analyze the data to diagnose the issues causing the crash or other issues on the remote system.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;8. Apply Solutions or Recommendations:&lt;/b&gt;&lt;br /&gt;Based on your analysis, develop recommendations or solutions to address the identified issues on the remote system.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;9.Report Findings:&lt;/b&gt;&lt;br /&gt;Prepare a detailed report of your findings, including the analysis process, identified issues, and recommended actions. Share this report with relevant stakeholders.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;10.Repeat and Validate:&lt;/b&gt;&lt;br /&gt;If necessary, work collaboratively with administrators or stakeholders on the remote system to implement the recommended solutions. After applying changes, validate the results and verify that the issues are resolved.&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Remote memory dump analysis requires coordination and proper access to the remote system, as well as a good understanding of the debugging tools and analysis techniques. Keep in mind that the remote system&#39;s configuration, software, and environment may differ from your local machine, so consider these factors while interpreting the results.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are symbol file and why its important in windbg&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Symbol files, often referred to as &quot;symbols,&quot; are essential components in the debugging process, and they play a crucial role in tools like WinDbg when analyzing memory dumps or performing live debugging sessions. Symbols are files that contain information about the relationships between source code, compiled binaries, and their corresponding memory addresses in a program or operating system. They provide a bridge between the raw memory addresses present in memory dumps and the actual source code and variable names used during development.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Here&#39;s why symbol files are important in WinDbg and other debugging scenarios:&lt;br /&gt;&lt;br /&gt;**1. Mapping Addresses to Meaningful Information:&lt;br /&gt;Symbol files contain mappings between memory addresses and their corresponding symbols, which include function names, variable names, structure definitions, and more. Without symbols, raw memory addresses would be challenging to interpret.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**2. Understanding Code Execution and Call Stacks:&lt;br /&gt;Symbols help translate memory addresses in call stacks into human-readable function and module names. This is vital for understanding the sequence of function calls and execution flow leading up to a crash.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**3. Identifying Source Code Locations:&lt;br /&gt;Symbol files allow you to identify the exact source code locations where specific memory addresses were generated. This helps in pinpointing the origin of issues and understanding the context in which they occurred.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**4. Variable and Data Inspection:&lt;br /&gt;With symbols, you can inspect variables and data structures within memory dumps using their actual names. This makes it easier to analyze memory contents and identify potential memory corruption or issues.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**5. Debugging Third-Party Code and System Components:&lt;br /&gt;Symbols are crucial when debugging code that you didn&#39;t write, such as operating system components or third-party libraries. Without symbols, understanding and diagnosing issues in these components would be extremely challenging.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**6. Optimized Code and Release Builds:&lt;br /&gt;Symbols also play a role in analyzing optimized and release builds, which might not include full debugging information by default. Symbols enable you to debug these builds effectively.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**7. Minidump and Remote Analysis:&lt;br /&gt;When analyzing minidump files or performing remote analysis, symbols ensure that you can access the relevant information needed to understand the crash context.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;**8. Symbol Servers and Version Control:&lt;br /&gt;Symbol servers store and provide access to symbol files associated with different software versions. This is valuable for debugging across various versions of a program.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;In WinDbg, you can configure symbol paths to direct the debugger to find the appropriate symbol files. Microsoft&#39;s public symbol servers and custom symbol repositories can be used to download the required symbols. By having accurate symbol information, WinDbg can provide meaningful output, such as call stacks, variable names, and function names, that greatly assists in the analysis of memory dumps and debugging sessions.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/5971778718721060044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2023/08/windows-debugging-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/5971778718721060044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/5971778718721060044'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2023/08/windows-debugging-tools.html' title='Windows Debugging tools'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-493224114627566104</id><published>2023-02-02T01:06:00.002-08:00</published><updated>2023-02-08T22:57:49.317-08:00</updated><title type='text'>Security product notes</title><content type='html'>&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is the best description of a worm?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;malware that can independently replicate and spread without human intervention&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the two words that make up the term &quot;malware&quot;?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;malicious and &quot;software&quot;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;What are the two words that make up the term &quot;rootkit&quot; and where do they come from?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;“Root” refers to privileged access on a Unix operating system and “kit” refers to the various software components that make up the program.&lt;/span&gt;&lt;b style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Why are rootkits considered so dangerous?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;They can gain and maintain privileged access undetected.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;Types of malware&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Malware categories include the following:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Worms.&lt;/b&gt; A worm is a standalone program that can self-replicate and spread over a network. Unlike a virus, a worm spreads by exploiting a vulnerability in the infected system or through email as an attachment masquerading as a legitimate file. A graduate student created the first worm (the Morris worm) in 1988 as an intellectual exercise. Unfortunately, it replicated itself quickly and soon spread across the internet.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Ransomware&lt;/b&gt;. As the name implies, ransomware demands that users pay a ransom—usually in bitcoin or other cryptocurrency—to regain access to their computer. The most recent category of malware is ransomware, which garnered headlines in 2016 and 2017 when ransomware infections encrypted the computer systems of major organizations and thousands of individual users around the globe.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Scareware&lt;/b&gt;. Many desktop users have encountered scareware, which attempts to frighten the victim into buying unnecessary software or providing their financial data. Scareware pops up on a user&#39;s desktop with flashing images or loud alarms, announcing that the computer has been infected. It usually urges the victim to quickly enter their credit card data and download a fake antivirus program.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Adware and spyware&lt;/b&gt;. Adware pushes unwanted advertisements at users and spyware secretly collects information about the user. Spyware may record the websites the user visits, information about the user&#39;s computer system and vulnerabilities for a future attack, or the user’s keystrokes. Spyware that records keystrokes is called a keylogger. Keyloggers steal credit card numbers, passwords, account numbers, and other sensitive data simply by logging what the user types.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Fileless malware&lt;/b&gt;. Unlike traditional malware, fileless malware does not download code onto a computer, so there is no malware signature for a virus scanner to detect. Instead, fileless malware operates in the computer&#39;s memory and may evade detection by hiding in a trusted utility, productivity tool, or security application. An example is Operation RogueRobin, which was uncovered in July 2018. RogueRobin is spread through Microsoft Excel Web Query files that are attached to an email. It causes the computer to run PowerShell command scripts, providing an attacker access to the system. As PowerShell is a trusted part of the Microsoft platform, this attack typically does not trigger a security alert. Some fileless malware is also clickless, so a victim does not need to click on the file to activate it.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a PE file?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Portable executable file format is a type of format that is used in Windows (both x86 and x64).&lt;br /&gt;&lt;br /&gt;As per Wikipedia, the portable executable (PE) format is a file format for executable, object code, DLLs, FON font files, and core dumps.&lt;br /&gt;&lt;br /&gt;The PE file format is a data structure that contains the information necessary for the Windows OS loader to manage the wrapped executable code. Before PE file there was a format called COFF used in Windows NT systems.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhsfzHIqhB90p8h5a_BJEwDIntbqw6ADtyjVmgqSH87QQmVz3bgdMemy2pqyHQTOZ1o3fexn8RM7C_s1Pyt05u6_BlIMfNIgLR6p0ziF3gM2zyw7_95WK9NfJoWEyeXTLT5g7yWEWvMR8yBHRHTb6xXZTYrq32ZmgrfXzc59AjtEs6-PsTCFvhSaOAaNg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;761&quot; data-original-width=&quot;1014&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhsfzHIqhB90p8h5a_BJEwDIntbqw6ADtyjVmgqSH87QQmVz3bgdMemy2pqyHQTOZ1o3fexn8RM7C_s1Pyt05u6_BlIMfNIgLR6p0ziF3gM2zyw7_95WK9NfJoWEyeXTLT5g7yWEWvMR8yBHRHTb6xXZTYrq32ZmgrfXzc59AjtEs6-PsTCFvhSaOAaNg=w640-h480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;Explain Antimalware and antivirus solutions&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;The four main types of malware detection are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Signature-based scanning&lt;/b&gt;. This is a basic approach that all antimalware programs use, including free ones. Signature-based scanners rely on a database of known virus signatures. The success of the scanner depends on the freshness of the signatures in the database.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Heuristic analysis&lt;/b&gt;. This detects viruses by their similarity to related viruses. It examines samples of core code in the malware rather than the entire signature. Heuristic scanning can detect a virus even if it is hidden under additional junk code.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Real-time behavioral monitoring solutions&lt;/b&gt;. These seek unexpected actions, such as an application sending gigabytes of data over the network. It blocks the activity and hunts the malware behind it. This approach is helpful in detecting fileless malware.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Sandbox analysis. &lt;/b&gt;This moves suspect files to a sandbox or secured environment in order to activate and analyze the file without exposing the rest of the network to potential risk.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;What are the Steps of the Cyber Security Kill Chain?&lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhM1gBdkWXz1-qMxkrzARS5GrX8bmlS139z2f6HJSX_xmki5mogqgyLUcxZ-R3sks2EetKGzbZT646-zzglpdhnqNV_06LbAGO4v809SVpodzWHwF0rnFoj1wrk04JGUbXlKxxjFd53WLK8HpeiG6iMWjJk10fXx-ZNfnL2vYRzI66GwrMCjGaK8-2ZQw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;409&quot; data-original-width=&quot;817&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhM1gBdkWXz1-qMxkrzARS5GrX8bmlS139z2f6HJSX_xmki5mogqgyLUcxZ-R3sks2EetKGzbZT646-zzglpdhnqNV_06LbAGO4v809SVpodzWHwF0rnFoj1wrk04JGUbXlKxxjFd53WLK8HpeiG6iMWjJk10fXx-ZNfnL2vYRzI66GwrMCjGaK8-2ZQw=s16000&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Step 1: Reconnaissance&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;During the Reconnaissance phase, a malicious actor identifies a target and explores vulnerabilities and weaknesses that can be exploited within the network. As part of this process, the attacker may harvest login credentials or gather other information, such as email addresses, user IDs, physical locations, software applications and operating system details, all of which may be useful in phishing or spoofing attacks&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;Reconnaissance is the first step in the cyber security kill chain and utilizes many different techniques, tools, and commonly used web browsing features including:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Search engines&lt;/li&gt;&lt;li&gt;Web archives&lt;/li&gt;&lt;li&gt;Public cloud services&lt;/li&gt;&lt;li&gt;Domain name registries&lt;/li&gt;&lt;li&gt;WHOIS command&lt;/li&gt;&lt;li&gt;Packet sniffers (Wireshark, tcpdump, WinDump, etc.)&lt;/li&gt;&lt;li&gt;Network mapping (nmap)&lt;/li&gt;&lt;li&gt;DIG command&lt;/li&gt;&lt;li&gt;Ping&lt;/li&gt;&lt;li&gt;Port scanners (Zenmap, TCP Port Scanner, etc.)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;There is a wide range of tools and techniques used by hackers to gather information about their targets, each of which exposes different bits of data that can be used to find doors into your applications, networks, and databases which are increasingly becoming cloud based. It’s important that you secure your sensitive data behind cloud-based SASE defenses, encryption and secure web pages in order to prevent attackers from stumbling on compromising information while browsing through your publicly-accessible assets, including apps and cloud services.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Step 2: Weaponize&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;Once an attacker has gathered enough information about their target, they’ll choose one or several attack vectors to begin their intrusion into your space. An attack vector is a means for a hacker to gain unauthorized access to your systems and information. Attack vectors range from basic to highly technical, but the thing to keep in mind is that, for hackers, targets are often chosen by assessing cost vs. ROI.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Everything from processing power to time-to-value is a factor that attackers take into account Typical hackers will flow like water to the path of least resistance, which is why it is so important to consider all possible entry points along the attack surface (all of the total points in which you are susceptible to an attack) and harden your security accordingly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The most common attack vectors include:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Weak or stolen credentials&lt;/li&gt;&lt;li&gt;Remote access services (RDP, SSH, VPNs)&lt;/li&gt;&lt;li&gt;Careless employees&lt;/li&gt;&lt;li&gt;Insider attackers&lt;/li&gt;&lt;li&gt;Poor or no encryption&lt;/li&gt;&lt;li&gt;System misconfiguration&lt;/li&gt;&lt;li&gt;Trust relationships between devices/systems&lt;/li&gt;&lt;li&gt;Phishing (social engineering)&lt;/li&gt;&lt;li&gt;Denial of service attacks&lt;/li&gt;&lt;li&gt;Man-in-the-middle attacks (MITM)&lt;/li&gt;&lt;li&gt;Trojans&lt;/li&gt;&lt;li&gt;SQL injection attacks&lt;/li&gt;&lt;li&gt;And many others&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;Remember:&lt;/b&gt; a hacker only needs one attack vector to be successful. Therefore, your security is only as strong as its weakest point and it’s up to you to discover where those potential attack vectors are. Ransomware attacks continue to exploit remote access services to gain entry, make lateral movements, detect sensitive data for exfiltration, all before encrypting and making ransom requests.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So typically once an attacker is in, their next move is to find different ways to move laterally throughout your network or cloud resources and escalate their access privileges so their attack will gather the most valuable information, and they’ll stay undetected for as long as possible. Preventing this kind of behavior requires adopting “Zero Trust” principles, which, when applied to security and networking architecture, consistently demands reaffirmation of identity as users move from area to area within networks or applications.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Step 3: Delivery&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Now that a hacker has gained access to your systems, they’ll have the freedom they need to deliver the payload of whatever they have in store for you (malware, ransomware, spyware, etc.). They’ll set up programs for all kinds of attacks, whether immediate, time-delayed or triggered by a certain action (logic bomb attack). Sometimes these attacks are a one-time move and other times hackers will establish a remote connection to your network that is constantly monitored and managed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Malware detection with Next Gen SWGs to TLS decrypt and inspect web and cloud traffic are key components for preventing the delivery of these types of payloads. Increasingly attacks are cloud delivered with 68% of malware using cloud delivery versus web delivery. Running inline threat scanning services for web and cloud traffic along with accounting for the status of all endpoint devices is crucial in ensuring your company is not infected with any malicious software.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Step 4: Exploit&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Once the attacker’s intended payload is delivered, the exploitation of a system begins, depending on the type of attack. As mentioned before, some attacks are delayed and others are dependent on a specific action taken by the target, known as a logic bomb. These programs sometimes include obfuscation features in order to hide their activity and origin in order to prevent detection.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once the executable program is triggered, the hacker will be able to begin the attack as planned, which leads us to the next few steps, encompassing different types of exploitations.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Step 5: Installation&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Immediately following the Exploitation phase, the malware or other attack vector will be installed on the victim’s system. This is a turning point in the attack lifecycle, as the threat actor has entered the system and can now assume control.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If a hacker sees the opportunity for future attacks, their next move is to install a backdoor for consistent access to the target’s systems. This way they can move in and out of the target’s network without running the risk of detection by reentering through other attack vectors. These kinds of backdoors can be established through rootkits and weak credentials, and so long as their behavior doesn’t throw up any red flags to a security team (such as unusual login times or large data movements), these intrusions can be hard to detect. SASE architecture is uniting security defenses to collect rich metadata on users, devices, apps, data, activity and other attributes to aid investigations and enhance anomaly detection.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Step 6: Command and Control&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In Command &amp;amp; Control, the attacker is able to use the malware to assume remote control of a device or identity within the target network. In this stage, the attacker may also work to move laterally throughout the network, expanding their access and establishing more points of entry for the future.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Now that the programs and backdoors are installed, an attacker will take control of systems and execute whatever attack they have in store for you. Any actions taken here are solely for the purpose of maintaining control of their situation with the target, which can take all kinds of forms, such as planting ransomware, spyware, or other means for exfiltrating data in the future.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Unfortunately, once you learn of an intrusion and exfiltration, it is probably too late—the hackers have control of your system. That’s why it’s important to have safeguards that monitor and evaluate data movements for any suspicious activity. A machine is far more likely to detect and prevent malicious behavior faster than any network administrator.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Phase 7: Actions on Objective/Persist&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In this stage, the attacker takes steps to carry out their intended goals, which may include data theft, destruction, encryption or exfiltration.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Over time, many information security experts have expanded the kill chain to include an eighth step: Monetization. In this phase, the cybercriminal focuses on deriving income from the attack, be it through some form of ransom to be paid by the victim or selling sensitive information, such as personal data or trade secrets, on the dark web.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Generally speaking, the earlier the organization can stop the threat within the cyber attack lifecycle, the less risk the organization will assume. Attacks that reach the Command and Control phase typically require far more advanced remediation efforts, including in-depth sweeps of the network and endpoints to determine the scale and depth of the attack. As such, organizations should take steps to identify and neutralize threats as early in the lifecycle as possible in order to minimize both the risk of an attack and the cost of resolving an event.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/493224114627566104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2023/02/security-product-notes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/493224114627566104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/493224114627566104'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2023/02/security-product-notes.html' title='Security product notes'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhsfzHIqhB90p8h5a_BJEwDIntbqw6ADtyjVmgqSH87QQmVz3bgdMemy2pqyHQTOZ1o3fexn8RM7C_s1Pyt05u6_BlIMfNIgLR6p0ziF3gM2zyw7_95WK9NfJoWEyeXTLT5g7yWEWvMR8yBHRHTb6xXZTYrq32ZmgrfXzc59AjtEs6-PsTCFvhSaOAaNg=s72-w640-h480-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-4137676480915655003</id><published>2022-09-27T03:27:00.003-07:00</published><updated>2022-09-27T03:27:28.134-07:00</updated><title type='text'>Page Object Model(POM) based Testing using Selenium WebDriver</title><content type='html'>&lt;p&gt;&lt;b&gt;&amp;nbsp;Page Object Model(POM) based Testing using Selenium WebDriver&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Introduction&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Maintaining 1000 lines of code in a single class file is a heavy task and also it increases its complexity. In order to maintain the project structure and efficient performance of the selenium scripts, it is necessary to use different pages for different tasks.&lt;/p&gt;&lt;p&gt;To ease the access of distributing the code into different modules, the Page Object Model(POM) comes to the rescue. In this blog, we will be learning some of the core concepts of Page Object Model(POM).&lt;/p&gt;&lt;p&gt;&lt;b&gt;What is Page Object Model?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Page Object Model is a design pattern which has become popular in test automation for enhancing test maintenance and reducing code duplication. A page object is an object-oriented class that serves as an interface to a page of your AUT.&lt;/p&gt;&lt;p&gt;The tests than use the methods of this page object class whenever they need to interact with the UI of that page. The benefit is that if UI changes for the page, the tests don’t need to be changed, only the code within the page object needs to change.&lt;/p&gt;&lt;p&gt;Subsequently all changes to support that new UI are located in one place so we don’t have to edit much.&lt;/p&gt;&lt;p&gt;&lt;b&gt;How to Implement POM?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Create a New Maven Project&lt;/p&gt;&lt;p&gt;Create a Maven Project so we don’t have to add all jar files into the library which are needed for our project.&lt;/p&gt;&lt;p&gt;It will automatically download and add all the jar files into your project which are required by just adding the dependencies into the POM.xml file of your project.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Advantages of POM&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Makes our code cleaner and easy to understand – keeps our tests and element locators separately.&lt;/li&gt;&lt;li&gt;Easy to visualise each step of the scenario, view and edit test cases intuitively.&lt;/li&gt;&lt;li&gt;Test cases become short and optimised as we can reuse page object methods in the POM classes.&lt;/li&gt;&lt;li&gt;Any UI change can easily be implement, update and maintain into the Page Objects and Classes.&lt;/li&gt;&lt;li&gt;Re-usability of code – object repository is independent of test cases.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;How to Implement POM?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Create a New Maven Project&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a Maven Project so we don’t have to add all jar files into the library which are needed for our project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It will automatically download and add all the jar files into your project which are required by just adding the dependencies into the POM.xml file of your project.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhRRoClnvqsK_sb8LYHxWZQ7yiqHa0rxrdpkUBZznoezQfs450BwdlWRDRLRhYNJuJbTkxDNxjnfHhae2sI-0U9MS7eoLXlOpq_yHsBQY9uNyx20AS41ZhLvGjzSj9LHuDXsTlUAsByS5Y0i8WHKvVLHg0Akoby418vs7TOA-luDFPEyICfaGpHhzwL1g&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;350&quot; data-original-width=&quot;889&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhRRoClnvqsK_sb8LYHxWZQ7yiqHa0rxrdpkUBZznoezQfs450BwdlWRDRLRhYNJuJbTkxDNxjnfHhae2sI-0U9MS7eoLXlOpq_yHsBQY9uNyx20AS41ZhLvGjzSj9LHuDXsTlUAsByS5Y0i8WHKvVLHg0Akoby418vs7TOA-luDFPEyICfaGpHhzwL1g&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Create a new Package&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After the above step create a new package under our project by any desired name of your choice. The package which you are creating is a user-defined package which will create a folder in your workspace.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create a New Class&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After creating the package you have to create a class under the package which you have created in above step. We can also create an object of a class and access it from another class.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create a Class for Browser&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We will create a method while passing parameters with it having driver, browser name and URL of the website.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Under this method we will provide multiple browser options for the user to choose between them and pass the requirement drivers under the specific conditions of the browser.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After above step we will maximise the browser and add &lt;b&gt;ImplicitWait&lt;/b&gt; and &lt;b&gt;pageLoadTimeout&lt;/b&gt; with it, so if the processor of the system is slow or internet is slow than elements can wait according to the given time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Than we will pass the url of the website using driver.get(appURL); and in the appURL we will pass the website URL.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCYYMsvBJqYkgXriZ_qRjhbW_YL2Z3wrsxb_jtbLcztLZE5_lEphs5kWTnmvjXONEKQLr5vsSOHoVClvreUv_nd9m7KUgqBSbZ2WdVa8HPSEocKK2G3uzTFEC0NViBJWkqo-dUaWOSe8XbNayyeqU2KctzV4FXH6hqOpT4O8XcBJ1_cdX8JClf9Z5zrw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;616&quot; data-original-width=&quot;782&quot; height=&quot;504&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhCYYMsvBJqYkgXriZ_qRjhbW_YL2Z3wrsxb_jtbLcztLZE5_lEphs5kWTnmvjXONEKQLr5vsSOHoVClvreUv_nd9m7KUgqBSbZ2WdVa8HPSEocKK2G3uzTFEC0NViBJWkqo-dUaWOSe8XbNayyeqU2KctzV4FXH6hqOpT4O8XcBJ1_cdX8JClf9Z5zrw=w640-h504&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, we will create a method for browser quit having parameter driver. So when our script is completed than the browser will be quit automatically.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg_sQF5gPSY8EZLV8xfAGPlcygJdVgR3Hj8Z371WvX97QdsEOA-jinbiisr1oBj8NwpASgvfqtDGR5N-iraTNvM2dIbFOHQaKdQ-QCI9xmWpWT3_NN_HcCh3lSBTcYhCP0LpGbt7MEyKyDUIw-meKCPuYxacGXIoO4KAOnTOkQ9EzlzAO4ZeIbpcZgXtQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;109&quot; data-original-width=&quot;552&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg_sQF5gPSY8EZLV8xfAGPlcygJdVgR3Hj8Z371WvX97QdsEOA-jinbiisr1oBj8NwpASgvfqtDGR5N-iraTNvM2dIbFOHQaKdQ-QCI9xmWpWT3_NN_HcCh3lSBTcYhCP0LpGbt7MEyKyDUIw-meKCPuYxacGXIoO4KAOnTOkQ9EzlzAO4ZeIbpcZgXtQ&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Create a Class for Login Page&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We will now create all the elements which are on &lt;b&gt;Login Page &lt;/b&gt;using &lt;b&gt;@FindBy&lt;/b&gt; so we can directly call them using &lt;b&gt;WebElement&lt;/b&gt;. Initialise all the elements together under the class so they can be accessible from anywhere.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiiL97eM5Nj8GdhDXvGMxiSgXHw15nK0EYyFggB9c3jcNu7QxWMnR5JKi96l4i-ntzl0o0JBzkwcg7F1ruveXL5ZYbVgG_NOTMfml8RfxZkNtYezliaIIbT3ZW7ZYfbP9VMm8et6YfvzGkadsEof-P_rbjBPCsObURn_zOkoswHS5WTBcc6LGsEU4un8g&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;304&quot; data-original-width=&quot;758&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiiL97eM5Nj8GdhDXvGMxiSgXHw15nK0EYyFggB9c3jcNu7QxWMnR5JKi96l4i-ntzl0o0JBzkwcg7F1ruveXL5ZYbVgG_NOTMfml8RfxZkNtYezliaIIbT3ZW7ZYfbP9VMm8et6YfvzGkadsEof-P_rbjBPCsObURn_zOkoswHS5WTBcc6LGsEU4un8g=w640-h256&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now create a method where all the&lt;b&gt; WebElements&lt;/b&gt; of the &lt;b&gt;Login Page &lt;/b&gt;will be called to perform some actions. In the method we will pass two parameters for username and password of the website.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhIT5Ka9xctF3pE54YDX2_8RRph2Eh-f2HQv8_SgQ809rqw4b2EVNWGQAA-6jVRe7kXehKVZwGL5TAe8jRus8gBEvHaI1OG80CoGlqMA2egMfxSLZ90TIu26KO6bULhuswuRc_VeA4a7g6TJEDSlp5mpnHzOH0ZlG2K5C5yfp4kSTgwg2GNE705vhvn5g&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;133&quot; data-original-width=&quot;548&quot; height=&quot;155&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhIT5Ka9xctF3pE54YDX2_8RRph2Eh-f2HQv8_SgQ809rqw4b2EVNWGQAA-6jVRe7kXehKVZwGL5TAe8jRus8gBEvHaI1OG80CoGlqMA2egMfxSLZ90TIu26KO6bULhuswuRc_VeA4a7g6TJEDSlp5mpnHzOH0ZlG2K5C5yfp4kSTgwg2GNE705vhvn5g&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Create a Class for Login Page Test&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Now we will create another class where all other classes will be called. Before starting of a function we will call &lt;b&gt;@Test&lt;/b&gt; which is used to run your script with &lt;b&gt;TestNG.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a void method and first call &lt;b&gt;startapplication()&lt;/b&gt; method from &lt;b&gt;BrowserFactory &lt;/b&gt;class to start the browser while passing parameters which are defined in the method.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create an object for &lt;b&gt;Login Page&lt;/b&gt; with any name and initialise all &lt;b&gt;WebElements&lt;/b&gt; using &lt;b&gt;PageFactory&lt;/b&gt;. Now call the method where &lt;b&gt;WebElements&lt;/b&gt; actions are defined under a method from an object which you have created.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, call the method &lt;b&gt;QuitBrowser()&lt;/b&gt; from the class &lt;b&gt;BrowserFactory&lt;/b&gt; which is used to close the browser after your script.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjNl9O6vOo_S8R5O12LrttA2tm2q9PwLRcm-yYRU_85cLUGnbjtY4zuJ04ogB9ZaeK2XDNWzd2_7hQI1XIBMqexU7m_Bl3QKIw9G-eW7ZR0MjZopyUjnoVE0GH7Qx3SNaKaGCOEMy024kFnlFbG5cN3TG5quqM6PCwb0QDcAU_7bwzr1OyC3rKYC7XyJg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;420&quot; data-original-width=&quot;753&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjNl9O6vOo_S8R5O12LrttA2tm2q9PwLRcm-yYRU_85cLUGnbjtY4zuJ04ogB9ZaeK2XDNWzd2_7hQI1XIBMqexU7m_Bl3QKIw9G-eW7ZR0MjZopyUjnoVE0GH7Qx3SNaKaGCOEMy024kFnlFbG5cN3TG5quqM6PCwb0QDcAU_7bwzr1OyC3rKYC7XyJg=w640-h356&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;View of Page Object Model(POM)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Now, if the AUT undergoes any change at the login page or at any page we just need to change the page object. Thus we don’t need to change our test script again and again (even for the new release or built).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The project structure will look like :&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg27NzlVOdmje3amioWxSqgIo7Gju8PPeIOroshrNCrbNGuvlJsDiRNtqSyJ2ap3LR658nirFw8IBMlDFANkcnzMq0bZtHnVT68hb4p_e5PsT9bUmCxjl2g2W0fK1Q38_rXQa88X2yNUidSyyN1DLrl8sd7sna21Ykml8n8lWLZukr-TzaF8RBT_amq0g&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;296&quot; data-original-width=&quot;830&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg27NzlVOdmje3amioWxSqgIo7Gju8PPeIOroshrNCrbNGuvlJsDiRNtqSyJ2ap3LR658nirFw8IBMlDFANkcnzMq0bZtHnVT68hb4p_e5PsT9bUmCxjl2g2W0fK1Q38_rXQa88X2yNUidSyyN1DLrl8sd7sna21Ykml8n8lWLZukr-TzaF8RBT_amq0g&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/4137676480915655003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2022/09/page-object-modelpom-based-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/4137676480915655003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/4137676480915655003'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2022/09/page-object-modelpom-based-testing.html' title='Page Object Model(POM) based Testing using Selenium WebDriver'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhRRoClnvqsK_sb8LYHxWZQ7yiqHa0rxrdpkUBZznoezQfs450BwdlWRDRLRhYNJuJbTkxDNxjnfHhae2sI-0U9MS7eoLXlOpq_yHsBQY9uNyx20AS41ZhLvGjzSj9LHuDXsTlUAsByS5Y0i8WHKvVLHg0Akoby418vs7TOA-luDFPEyICfaGpHhzwL1g=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-2291607171112631947</id><published>2022-09-26T07:48:00.000-07:00</published><updated>2022-09-26T07:48:28.478-07:00</updated><title type='text'>Test Automation framework</title><content type='html'>&lt;p&gt;&amp;nbsp;A well structure design helps reduce the extra cost and conflicts.&amp;nbsp;We need to develop support libraries for re-usability and expandability of the code in our automation&lt;/p&gt;&lt;p&gt;We have to comment in scripts and function headers which will improve the readability and understand-ability of the structure.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Test automation&lt;/b&gt; is the &lt;b&gt;process of automating repetitive processes of users t&lt;/b&gt;o make the work efficient which saves a lot of time.&lt;/p&gt;&lt;p&gt;&lt;b&gt;What is test automation framework ?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A test automation framework is define as a &lt;b&gt;real or conceptual structure&lt;/b&gt;; created to &lt;b&gt;provide support&lt;/b&gt; which could &lt;b&gt;expand in future&lt;/b&gt;. Test Automation framework is not a single process or tool. It&lt;b&gt;’s a collection of tool and process working together to automate the manual process.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Testing Framework is a set of rules which is used for creating and designing test cases.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Automation Framework is also useful when user want to repeat the same process using test scripts when ever it is required to test on multiple browsers at the same time.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Purpose of a Test Automation Framework&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;• It improves the design and development of automated test scripts which involves &lt;b&gt;re-usability of&lt;/b&gt; &lt;b&gt;components or code.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;• Provides a structured development of all test scripts which &lt;b&gt;reduces dependency on individual test-cases which saves time to write the same code.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;• &lt;b&gt;Detects issues and bug with proper root causes&lt;/b&gt; with minimum human involvement.&lt;/p&gt;&lt;p&gt;• &lt;b&gt;Reduces dependency on teams&lt;/b&gt; by automatically selecting the test to execute according to test scenarios.&lt;/p&gt;&lt;p&gt;• &lt;b&gt;Enhance test accuracy&lt;/b&gt; and reduces test maintenance cost which involves lower risk of test failure.&lt;/p&gt;&lt;p&gt;• Improves utilization of various resources and enables maximum returns on efforts.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;• Ensures an uninterrupted automated testing process with little man-power involvement.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Different Types of Framework used in Automation Testing&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Most common types of Test Automation Frameworks are:-&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Linear Scripting Framework:&lt;/b&gt; This framework is based on the concept of record and playback mode that is always achieved in a linear manner. Linear Scripting Framework mostly used for testing on the small applications in which step are written in a sequential order.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Modular Testing Framework:&lt;/b&gt; Modular Test Frameworks break down test cases into small modules. There, the modules are independently tested first and then the application is tested as a whole which makes each test independent.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Data Driven Testing Framework:&lt;/b&gt; In this testing framework, a separate file in a tabular format is used to store both the input and expected output results. A driver script where all test cases are called can execute all the test cases with multiple sets of data. This driver script contains navigation that spreads through the program which covers both reading of data files and logging of test status information.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Keyword Driven Testing Framework: &lt;/b&gt;Keyword Driven test framework separates script logic from test data, then stores the data externally. After that, it stores the keywords in a different location. Since user can use the same keyword across different test scripts which re-uses the code.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Hybrid Testing Framework: &lt;/b&gt;A hybrid test framework improves the weaknesses of different test frameworks. It is a combination of many types of end-to-end testing approaches which uses the advantages of other frameworks.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Test Driven Development Framework (TDD):&lt;/b&gt; Test driven development is an approach in which test cases are developed to specify and validate that what will code do. It starts with designing part and develop test cases for small functionalities for your application, which instructs developers to write code if previous script fails.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Behaviour Driven Development Framework (BDD):&lt;/b&gt; This has been derived from the TDD approach and in this method tests are more focused and are based on the system behavior. Testers can create test cases in simple English language which helps even the non-technical people to easily analyze and understand the tests.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Benefits of Test Automation Frameworks&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;• Optimization of Resources: Test framework helps in making the best use of resources, it does this by making the process easier with use of different resources according to organizational needs.&lt;/p&gt;&lt;p&gt;• Increased Volume of Testing: Test automation frameworks increase the volume of testing by perform test on many devices as it’s not possible to perform manual testing on all devices.&lt;/p&gt;&lt;p&gt;• Simultaneous Testing: Test automation frameworks enable simultaneous testing on different types of devices. When test scripts are automated, than testers can perform the script on other devices at the same time.&lt;/p&gt;&lt;p&gt;• Enhanced Speed and Reliability: Performing different test cases manually can be very time consuming so instead of it we can run all the test cases from our script in very less time.&lt;/p&gt;&lt;p&gt;• More Output in Less Time: An automation script minimises the time taken to prepare and run tests. With increased efficiency and speed, we can gain more output in less time.&lt;/p&gt;&lt;p&gt;• Fixing Bugs at an Early Stage: Test automation framework helps in fixing bugs at an early stage which don’t need much manpower to carry which saves time and expenses of the organisation.&lt;/p&gt;&lt;p&gt;• Remote Testing: With a test automation framework, you don’t need to see all test cases, you can run the test cases and come back later and view the result. User doesn’t need to be present at execution time physically.&lt;/p&gt;&lt;p&gt;• Reusable Automation Code: You can use your automation script in any of your other application or website which has same functionality which increase the code re-usability.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Steps for an Effective Test Automation Approach&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh38hjo7Fd2gCsAmI9tGT51tMEWSAaCusaQ04bIkEdp_v-CdufyKnY6pt1u3kJht0NNiUYpQTf9FUv6hnz3LxVZZehTYkotkeH-0gRgU1UmatjEziTxsIiTuHi0bxD31D0u_OKZHBnplbJcHk_SW8Sh9Bsz37P2N3nDygWJBDwzWlkgETliIgkNuGwlBg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;655&quot; data-original-width=&quot;798&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh38hjo7Fd2gCsAmI9tGT51tMEWSAaCusaQ04bIkEdp_v-CdufyKnY6pt1u3kJht0NNiUYpQTf9FUv6hnz3LxVZZehTYkotkeH-0gRgU1UmatjEziTxsIiTuHi0bxD31D0u_OKZHBnplbJcHk_SW8Sh9Bsz37P2N3nDygWJBDwzWlkgETliIgkNuGwlBg&quot; width=&quot;292&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;• Evaluate to understand real need for automation based on Website/Application type: We should first evaluate what need to be automated which saves the time of the user which he losses it by doing it manually.&lt;/p&gt;&lt;p&gt;• Define automation goals and priorities: The Goals should be first set so we can move ahead in that direction to make the test script and achieve it while having priorities to automate.&lt;/p&gt;&lt;p&gt;• Plan automated testing strategy: Automated Testing Strategy should be planned so that test cases should be built accordingly.&lt;/p&gt;&lt;p&gt;• Select right automation testing tool &amp;amp; testing framework based on your project requirements: The Testing tools &amp;amp; testing framework should be selected before automating the manual process so the script which we are making should be constructed in a proper way with right tool.&lt;/p&gt;&lt;p&gt;• Decide which test case to automate: We should know which test case need to be automated because it can save the time of the user which he spends doing it manually.&lt;/p&gt;&lt;p&gt;• Develop good quality of test data: The script which you are creating should be of good quality which can be used later also and the data which it produces as a result should be in readable format.&lt;/p&gt;&lt;p&gt;• Create automated tests which are more stable to UI changes: Automated Tests which are created should be stable enough even if there are some minor changes in the UI than also your script is able to run the test.&lt;/p&gt;&lt;p&gt;• Execute tests for test scripts developed: Test Scripts which are developed should be executed so the result can be known whether it is correct or not and we can check whether the script which we have created is stable enough or not.&lt;/p&gt;&lt;p&gt;• Test early and often with continuous integration and continuous delivery (CI/CD) pattern: We can test our script early with Continuous Integration and Continuous Delivery that whether the script which we have created is good enough or not.&lt;/p&gt;&lt;p&gt;• Maintain test scripts for future use: Test Script which you have created should always be kept for the future use so you don’t have to write the same code again and again, which you can reuse the code of the script which is required in your new script.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Common Misconceptions about Automated Testing&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Automation will provide you with more free time&lt;/b&gt;: The misconception that automation will provide you more free time is both true and false. In manual testing, most of the time is devoted to explore and do functional testing where we manually search for errors.&lt;/p&gt;&lt;p&gt;With automated testing, that time is cut drastically. The work for automation testers is instead spend in coding the test script and making improvements to tests repeatedly as adjustments are needed.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• The Cost of Automated Testing is Too High:&lt;/b&gt; Investment in automated testing might feel costly, especially for a smaller company. But according to report, over time, automated testing pays for itself.&lt;/p&gt;&lt;p&gt;Automation testing also reduces the cost for multiple code revisions, over the course of time, the investment pays out. Manually repeating these tests is costly and time-consuming; but automated tests can be run over and over again at no additional cost.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Automated Testing is better than Manual Testing: &lt;/b&gt;There is no superiority in the automation vs manual; they are just “different”. Manual testing is performed by a human sitting in-front of a computer carefully going through application; trying various input combinations, comparing the results to the expected behavior and recording the results.&lt;/p&gt;&lt;p&gt;Automated testing is often used after the initial software has been developed. Lengthy tests that are often avoided during manual testing can be automated to save the time. They can even be run on multiple computers with different configurations.&lt;/p&gt;&lt;p&gt;&lt;b&gt;• Automated Testing Inhibits Human Interaction&lt;/b&gt;: Automated testing is more clear-cut and faster than what humans could do with less human errors, so this misconception is understandable.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Automation testing do not replace face-to-face communication which is a necessary part of a software development. Instead, it increases the aspect by providing another channel through which to communicate.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Important points consider while Designing Test Automation Framework&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;•&amp;nbsp;&lt;/b&gt;&lt;b&gt;Handle Scripts and Data separately &lt;/b&gt;– Automated test scripts should be separated from input data files (eg – XML, Ms-Excel or Databases) and code, so that no modifications are needed to the test scripts whenever some data has to be changed.&lt;/p&gt;&lt;p&gt;&lt;b&gt;•&amp;nbsp;Library –&lt;/b&gt; Library should contain all reusable functions such as databases, generic functions, application functions etc. so that we have to just call the function rather than writing the whole code again and again.&lt;/p&gt;&lt;p&gt;&lt;b&gt;•&amp;nbsp;Coding Standards –&lt;/b&gt; Coding standards should always be maintained across your test automation framework, which will encourage individual coding practices and help in maintaining code structure, which makes it easier for others to understand the code.&lt;/p&gt;&lt;p&gt;&lt;b&gt;•&amp;nbsp;Extensibility and Maintenance &lt;/b&gt;– An ideal test automation framework should regularly support all new updation to the software application which allows modification. e.g. Some new library can be created, which would help in updating application features with less effort.&lt;/p&gt;&lt;p&gt;&lt;b&gt;•&amp;nbsp;Script/Framework Versioning &lt;/b&gt;– Versions of your Test Automation Framework / scripts should be maintain in a local repository or some versioning tool, which would help in easy checking of changes to the software code.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjjaI5fUiglcNNSAIHdmfNRVApRBgRKH5cCTuw1eKieMmOaRH5kyWbJkrG7rQUNQiBoICjNWNktYm5hzazLd7qzDCecz3T0dBC9Oycqvc87ga6m5vPH8DyswDWtQBMydeO9G435WAKUllfX4s-esHUKKant7yhWPGPNThOrPmXtdgApdfT5iWDWq2SO0Q&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;777&quot; data-original-width=&quot;794&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjjaI5fUiglcNNSAIHdmfNRVApRBgRKH5cCTuw1eKieMmOaRH5kyWbJkrG7rQUNQiBoICjNWNktYm5hzazLd7qzDCecz3T0dBC9Oycqvc87ga6m5vPH8DyswDWtQBMydeO9G435WAKUllfX4s-esHUKKant7yhWPGPNThOrPmXtdgApdfT5iWDWq2SO0Q&quot; width=&quot;245&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;Goals for designing a Test Automation Framework&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The framework design should be easy to expand and maintain&lt;/li&gt;&lt;li&gt;Provide abstraction from complexities&lt;/li&gt;&lt;li&gt;Identification of the common functions used across scripts&lt;/li&gt;&lt;li&gt;Separate complex logic functions with utility functions&lt;/li&gt;&lt;li&gt;Separate test data and test scripts&lt;/li&gt;&lt;li&gt;Creation of robust functions&lt;/li&gt;&lt;li&gt;Appropriate functional break down which can be changed&lt;/li&gt;&lt;li&gt;Ensure scripts are executed without human intervention, even in false conditions&lt;/li&gt;&lt;li&gt;Improve Design documentation&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Using Page Object Model in Test Automation Framework&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You need classes that interact with the pages of your website. These classes should be within the framework layer. The most popular design pattern for creating these types of classes is the page object model (POM). This model recommends creating a separate class for each page of your website, (e.g. buttons, text fields, etc), as well as methods for interacting with those elements. You can use a browser automation tool, such as Selenium WebDriver, to handle the actual interaction.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhe98pZg4SdJlTEhilYewbNus5UUK-pNrumvpBn0CkF9XXD8Vjj0Z4vLX4IWhd_0yCfLARStXmS_3at2GJI71p8DNpmWW7yXdmb12O_6jISv8sxuefiDVdN7jy-tx_hDuqmzv3VdFHQEXMbBpAW1G1d1Ux1L-qWURb7DbAEjXnaNLV0i_HsHvpyML7XUw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;397&quot; data-original-width=&quot;916&quot; height=&quot;278&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhe98pZg4SdJlTEhilYewbNus5UUK-pNrumvpBn0CkF9XXD8Vjj0Z4vLX4IWhd_0yCfLARStXmS_3at2GJI71p8DNpmWW7yXdmb12O_6jISv8sxuefiDVdN7jy-tx_hDuqmzv3VdFHQEXMbBpAW1G1d1Ux1L-qWURb7DbAEjXnaNLV0i_HsHvpyML7XUw=w640-h278&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;The role of Inheritance in Test Automation Framework&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Inheritance, an object-oriented programming principle that enables objects to receive properties from a parent object, also has its place in your automation test code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We have to always launch the browser for running our scripts. Rather than duplicating your code in every test method, you can use this functionality, and place into a method that runs before each test. To verify, this method does not get duplicate in every test class, place this method in a base test class from which all test classes inherit. The base page can also contain objects for other parts of the website that are visible from any page, such as navigation menus, headers, and footers. All of these would be inherit by any page, and therefore accessible without duplicating code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Test runner tools, such as JUnit and TestNG, provide “before” annotations that you can use to denote methods that should run before the test. They also provide “after” annotations that you can use and can be inherit in the same way to clean up after tests.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihrZ2vdx9Qna75DFakWaeHDpAEheA4wbK1vI1DZBqPAj5Yb3SuyhAmU5ABPM5dQkp9cTwqugCS0tvjHiUEQeKO_PEBu6isBDzSv8YBviM1jJ6TsUWIsmJB8grOz2J6eHq46zpc_R5MBihEUHHH6JApzHK_I5HI_3Uh9T1KbQyPps7EJJhubPRJmxs_0A&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;574&quot; data-original-width=&quot;848&quot; height=&quot;434&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEihrZ2vdx9Qna75DFakWaeHDpAEheA4wbK1vI1DZBqPAj5Yb3SuyhAmU5ABPM5dQkp9cTwqugCS0tvjHiUEQeKO_PEBu6isBDzSv8YBviM1jJ6TsUWIsmJB8grOz2J6eHq46zpc_R5MBihEUHHH6JApzHK_I5HI_3Uh9T1KbQyPps7EJJhubPRJmxs_0A=w640-h434&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;How To Design a Test Automation Framework&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Some points which should be consider while designing a framework:-&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Create Wrapper Method&lt;/b&gt;: Writing a wrapper method is one of the solutions for extending the library features. An example of extending the wrapper method is to allow better logging capabilities and handling the errors well in Selenium.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Implement Custom Logger: &lt;/b&gt;While running the test script; all information should be logged into the file. This information can be use as a reference for understanding the code. The popular logging framework for java is log4j and python is Custom logger.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Choosing the Right Design Pattern&lt;/b&gt;: Choosing the right design pattern speeds up the test case development and helps in preventing minor issues that can cause major problems and therefore improves code readability. The most popular design pattern for creating a selenium automation framework is the Page Object Model (POM).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Separate Tests From Automation Framework:&lt;/b&gt; Separate the Test script logic and the input data from the automation framework. It increases code readability and makes the code readable.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Create a Proper Folder Structure For The Code&lt;/b&gt;: Always define the folder structure which makes the code readable and makes it easy to understand. Eg – Test Cases, Utilities, Input Data etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Build &amp;amp; Continuous Integration:&lt;/b&gt; Continuous Integration is a development practice that integrates with a build automation tool like Maven to ensure whether the software is running without any breaks after making a commit decision.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/2291607171112631947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2022/09/test-automation-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/2291607171112631947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/2291607171112631947'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2022/09/test-automation-framework.html' title='Test Automation framework'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEh38hjo7Fd2gCsAmI9tGT51tMEWSAaCusaQ04bIkEdp_v-CdufyKnY6pt1u3kJht0NNiUYpQTf9FUv6hnz3LxVZZehTYkotkeH-0gRgU1UmatjEziTxsIiTuHi0bxD31D0u_OKZHBnplbJcHk_SW8Sh9Bsz37P2N3nDygWJBDwzWlkgETliIgkNuGwlBg=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-8380949877278569812</id><published>2022-05-02T02:41:00.005-07:00</published><updated>2022-05-03T21:23:21.000-07:00</updated><title type='text'>Software Testing/ QA</title><content type='html'>&lt;p&gt;&lt;b&gt;&amp;nbsp;What is quality assurance?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The role of QA exists to prevent problems in an application so that users don&#39;t encounter bugs and crashes. Quality Assurance, referred to simply as QA, is a systematic process used to determine whether a product meets specifications. An individual in this role can have many titles including QA, QA engineer or QA analyst, Software engineer in test, or Tester. Throughout this course, you will hear me use these titles interchangeably. An individual in the QA role constantly questions parts of the software development process to ensure the team is building the right product and building it correctly. A QA&#39;s primary goal should be to help their team move quickly with confidence. They establish and maintain standards for how to best test a software product. Having solid software testing practices is a huge asset to any team in order to produce a well functioning application.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;How to ensure quality&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Good quality results in a software product that is built correctly, as specified, and works reliably. Quality can be ensured across the code and influenced by process. It can be measured in various ways. Perhaps by customer happiness, annual revenue, or how well the application functions over time. Every quality software product has a team behind it that&#39;s responsible for its success. The team is composed of multiple roles. It is up to all of them to work together to produce high-quality software. It starts by having clear specifications. Then the specifications can be implemented in code, and the code is tested thoroughly to ensure the application works as intended. After the code is released, users will start to use the application and provide feedback. There isn&#39;t a quick and easy solution for how to ensure quality. Instead, it&#39;s an ongoing process that the whole team needs to be invested in. And to maintain quality, it&#39;s necessary to continue to iterate and improve on processes in order to have the best working software.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;Role of QA&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;1) Get involved throughout the SDLC&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The software development lifecycle, referred to as the SDLC, is a process that processes high-quality software in the shortest amount of time. The SDLC includes detailed steps for how to effectively develop, change, and maintain a software system, and is typically broken down into six parts: The steps are linear and do go in a sequential order, but what&#39;s more important to understand is that it&#39;s a cycle that each feature should iterate through. Traditionally, a QA has only gotten involved during the testing phase, but it&#39;s proven really useful for a tester to get involved as early and as often as they can to ensure quality throughout the entire development process. During the planning phase, or identify use cases of the feature. how to best mitigate risk or look for alternate solutions. When defining a feature, a QA can help write specifications or acceptance criteria and help decide what&#39;s in scope and what&#39;s out of scope. At this phase, a QA can also begin to write a test strategy and test scenarios. And also here the team can define when the product will be released and what metrics can be used to measure success. In the design and build phases, a QA can solidify test scenarios and get feedback on them from the team. They can begin to manually test the scenarios defined and script automated test as well. In the test phase, manual and automated tests are completed. This usually happens with the help and collaboration of developers. A QA can also work with a business team member to determine if the functionality will be accepted into the release. When it&#39;s time to do the deploy of the product, a QA is usually involved in the release process and helps to validate the release build. After the release, a QA will verify the functionality in production is still working as expected. or one development sprint, the same cycle can start all over again in another iteration. By getting involved outside of just the testing phase, By getting involved outside of just the testing phase, the product will have quality built into it at all stages. the product will have quality built into it at all stages. This will ensure a successful release This will ensure a successful release and a great experience for users. and a great experience for users.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEimW5bBoBHCmK8PKotbepOT4GF7_6RJs1VNsP7NSnUl7KIxXgymX3KpnAusF1NfjimnMggtL4POQzByUtVCkB81cbxQqe83Zj7PzbWtc7TS2L6oPfJc56LoDp7LabAkg0E9sZWq7cqeWlA8HI6IGlDgCKu6Eq_v68l3vUlJ_YVBKsESNO67RgCXc3mKCg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;441&quot; data-original-width=&quot;944&quot; height=&quot;299&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEimW5bBoBHCmK8PKotbepOT4GF7_6RJs1VNsP7NSnUl7KIxXgymX3KpnAusF1NfjimnMggtL4POQzByUtVCkB81cbxQqe83Zj7PzbWtc7TS2L6oPfJc56LoDp7LabAkg0E9sZWq7cqeWlA8HI6IGlDgCKu6Eq_v68l3vUlJ_YVBKsESNO67RgCXc3mKCg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;2) Collaborate with the team&lt;/b&gt;&lt;/p&gt;&lt;p&gt;It is so valuable to collaborate with cross-functional teammates in each of the phases of the SDLC. Collaboration between teammates leads to a better understanding of each others&#39; roles and a better outcome for the product. and in return help others develop a quality mindset. In a typical software delivery team, there are developers, designer, a tester, and product manager or business analyst. The team works together throughout the SDLC to deliver a quality product. get involved within different phases. The plan, define, and design phase can include a representative from each role. The build and test phase includes a developer, a tester, and a designer. The deploy phase includes a developer, a tester, and a product manager usually has the final sign off. A QA typically collaborates with a business team member to help determine acceptance criteria and scope for a future or story. A business team member can also work with QA to provide sign off on stories and get feedback about test scenarios and what to automate. When working with design, a QA provides feedback on mocks, prototypes, or the product itself after it has been deployed. Developers and QAs pair together to write test and validate functionality. Typically, the more collaboration, the better. Get creative and find the best ways to collaborate with your teammates across different phases of the SDLC. This will allow a QA to get more insight on how to do thorough testing, and will keep a team more in sync by creating a shared vision by creating a shared vision by building trust and accountability. by building trust and accountability.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhpbjg9q6ddgB_UJZwPPQ_zA7D7PlIqn7RPMcj3gRAmew1SMFt-nr5fR8Mb_TI5bsO0xZ-2vpGEEHl_U7iQPIbISpUYCscm_WySXgz8Mf8NspIBOeRUcoXJawui_PbrmXiHIFB09W-GZwXA2znOXdrmF98ZQvzrDNE4CeXJuWzI1Oa3g7k0ckz9EqbbQQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;431&quot; data-original-width=&quot;967&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhpbjg9q6ddgB_UJZwPPQ_zA7D7PlIqn7RPMcj3gRAmew1SMFt-nr5fR8Mb_TI5bsO0xZ-2vpGEEHl_U7iQPIbISpUYCscm_WySXgz8Mf8NspIBOeRUcoXJawui_PbrmXiHIFB09W-GZwXA2znOXdrmF98ZQvzrDNE4CeXJuWzI1Oa3g7k0ckz9EqbbQQ=w640-h286&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;3) Set expectations and goals&lt;/b&gt;&lt;/p&gt;&lt;p&gt;I have shared how varied the role of a QA can be. Keeping that in mind, when you join any new team or project, it will be necessary to set clear expectations, and measurable goals. It&#39;s important to ask questions, to understand your role, share your strengths, and identify areas in which you want to grow. This way, you will come into a situation being fully aware of what to expect. It&#39;s also important to build a relationship with the team. Get to know each of your teammates, their role, and build trust with one another. Spend time collaborating, and also schedule time for one-on-one sessions. Some individuals may have never worked with a software tester before. Some have a misunderstanding about how the role works, and what it entails. Getting to know your teammates will spark ideas about how to best collaborate cross-functionally, and support one another. will make you more accountable, because others will be aware of your goals, and can help you to achieve them. As you get up to speed, and start contributing to the project, make sure to regularly check in with your teammates. Constantly communicate what you are working on to the rest of the team, and don&#39;t be afraid to speak up if you see something wrong. If you need help, find someone who can answer your questions. Over time, ask for feedback to understand if you are meeting expectations, and give others feedback about your experience has been working with them. Always try to give candid feedback, and align the feedback with how an individual is meeting up to their goals. When I was a consultant, I had the opportunity to work with many different clients with unique needs. It was necessary that I be able to set clear expectations with my team early on, especially if I was only going to be working on a project for a few months, and didn&#39;t want to waste any time getting off on the right foot. Before starting a project, I tried to get as much information as I could, by talking to the team and understanding their challenges. Then I would take some time to observe and assess the situation. That allowed me to see first-hand what would work best for that project, and which skills I would need to apply to make a change. Once I had a clear plan of approach for testing, I shared that with the team, With that said, I would get to work to collaborate with the team, to fix some of the challenges Every few weeks or so going forward, and see what I was doing well, and how I could improve. If you&#39;re not already doing any of this, I would recommend starting now. In addition, one-on-one meetings, or retrospective sessions, are great opportunities to share feedback, and talk about how well expectations are being met. If you want to be a successful QA, If you want to be a successful QA, then setting expectations, then setting expectations, and checking in on them regularly, and checking in on them regularly, will give you a great start. will give you a great start.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;u&gt;Test Planning&lt;/u&gt;&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;1) Create a test strategy&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For each project, a QA engineer will create a test strategy, which describes how a product will be tested. A test strategy is useful so that anyone can read and understand the scope of testing clearly. I&#39;ll walk through a template to show what details I include in a test strategy. This template can be reused and modified for any project. First up is the introduction. The introduction is a high-level summary of the project. An example introduction can be, this strategy outlines what quality provides to the project, what type of testing is done, and how testing is carried out. The aim is to ensure quality in all phases of the development lifecycle to deliver a great experience for our users. Next up are references. This will include any relevant links for their project, including their project&#39;s repository and tools used in the tech stack. As an example here, and describe the application teck stack and tools being used for testing. Next up is QA deliverables. This is what a QA engineer will provide to the team. The first deliverable is this quality strategy, the high-level guide of how quality will be maintained on our project. Next there are test plans for each feature which lists test scenarios. Then there are issues reported. Examples of issues reported include bugs, enhancements, and usability improvements. Another deliverable is a release process document. This describes the steps to do a release to production. Moving along in the test strategy, there is the test management section to describe what resources are needed to carry out testing. First up is tooling. An example of tooling is, Jenkins is used to build test versions of the application and virtual machines are used to test the application in Windows. Then there are test environments which describe what environments are needed for exploratory and manual testing. An example of test environments is that manual testing will be done in environments created on-demand. Automation testing is run against a dedicated machine and across Mac and Windows using Chrome. Then, there are supported platforms and versions. For example, Mac and Windows are the supported platforms and each major browser is tested against them. Lastly in this section is test data. A simple example of test data that will be needed is test accounts to access the application. Here it can be helpful to create a table of accounts so that they can be referenced later when testing. is the scope of testing. This describes what types of tests exist for this project. Examples of test include unit, integration, functional, regression, and so on. For each test type use, specify how many there are or how much of the code they cover. Also identify which tools are used to write each type and who owns them. Those five sections in the test strategy do a good job at setting expectations for what a QA will provide, what resources are needed, how testing will be carried out, and which test will be performed. I&#39;ll include the test strategy as a handout for this video. Work with your team to create Work with your team to create a test strategy document for your project. a test strategy document for your project.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh_nRfWGd9zh10PaR3ZHOmeV_Bs0UTBC5LUA4eMkL4fi31WEImNeQb-_FYDzlZVfBYohlD0zvLzpzZ8pBfSj6MJ12mUvLQOswTZHYThrvV6wBATiwbU7GdUcEKd2cJLWgdUaJmRpHnzdaspsun_69d8TVa1Dvv_SWh8CR6spcGzp0U4PcbSsCnHaHFK9A&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;642&quot; data-original-width=&quot;577&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh_nRfWGd9zh10PaR3ZHOmeV_Bs0UTBC5LUA4eMkL4fi31WEImNeQb-_FYDzlZVfBYohlD0zvLzpzZ8pBfSj6MJ12mUvLQOswTZHYThrvV6wBATiwbU7GdUcEKd2cJLWgdUaJmRpHnzdaspsun_69d8TVa1Dvv_SWh8CR6spcGzp0U4PcbSsCnHaHFK9A=w576-h640&quot; width=&quot;576&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhMPqipEPn8riWdigwCrQiQa5GdfnLdF0vKcHV8pLS39PtHf2lW-2eIZObjv4RAJhpyj8k757SSiGAN8MMXPmOg55Fqpys7-TJlFtPWXRZWreNurZJOekt5aAbW3hFa8AEcg-g4jH0qfCeeVeA8C-NPSysBXmDnp8aQ6URifWW8TDOjCSTviAt46_TqfA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;267&quot; data-original-width=&quot;434&quot; height=&quot;394&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhMPqipEPn8riWdigwCrQiQa5GdfnLdF0vKcHV8pLS39PtHf2lW-2eIZObjv4RAJhpyj8k757SSiGAN8MMXPmOg55Fqpys7-TJlFtPWXRZWreNurZJOekt5aAbW3hFa8AEcg-g4jH0qfCeeVeA8C-NPSysBXmDnp8aQ6URifWW8TDOjCSTviAt46_TqfA=w640-h394&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;2) Make a test plan&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Each feature should have an associated test plan. and edge case scenarios to describe how a feature should function, examining it from many angles. During the definition phase, a QA engineer will start to create a test plan for the feature. This way there is ample time for it to be completed, reviewed, and executed before the test plan is over. The test plans I create have four main parts. First there is the scenario, which explains the steps or action that will be executed. Then there is the expected result, which describes what the outcome will be for a given action. Next there is the latest result, and last, there is a field for whether or not the scenario will be automated. This will either be true or false. There is one unique scenario per row. Let&#39;s go through an example now. Say I&#39;m working on a new feature for user management. This feature provides the ability to add and delete users, or edit a user&#39;s profile. If I focus on each of these user management areas, I can brainstorm a long list of scenarios. I&#39;ll first dive into defining scenarios for adding a user. Say I want to click a button to add a new user. Once I click, the expected result will be that the create user modal opens and has two required fields for username and email. There is a create user button that becomes enabled once the fields are populated. After the feature is implemented, I&#39;ll check if this passes or fails based on the expected result. It&#39;s likely that each scenario will be checked multiple times or by different individuals. So every time the check is done, the latest result can be updated. The last part of the scenario is whether it should be automated. Adding a new user sounds like an important feature, and likely something we&#39;re going to want to know always works. Therefore, this is a good candidate for automation. After defining one scenario, I can move onto other scenarios for adding a user, and then editing and deleting users. Once a test plan is complete, I end up with anywhere from 10 to 100 scenarios. The number doesn&#39;t really matter so much. What&#39;s more important is that the test plan identifies all the possible actions the user can take when using a feature. When a test plan is complete, have a review meeting Send out the test plan to attendees to asynchronously read through the scenarios and identify gaps or fill uncertainties. Once all the feedback has been addressed and the test plan is solidified, it can then be referred to later when testing individual components or stories of the feature as they become complete. In addition to reviewing the test plan as a group, I&#39;ve seen great success when a team does group or mob testing together for 30 minutes to run through each scenario in the test plan. This happens in advance of the release and can give team members the chance to use the feature across different browsers, platforms, or devices. across different browsers, platforms, or devices. A test plan is a living document that should be updated A test plan is a living document that should be updated as scenarios change and as tests are executed. as scenarios change and as tests are executed. It is a valuable artifact to have for every feature It is a valuable artifact to have for every feature of an application. of an application.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjJyXNFJ9zIlnlSVMerQEUtfNzXGU9yej7YwE41h4yyPhnrznqg_Ne6HZcdYEZDp-Fvg-e-pDWqkW5xe2CJnxTVV2c5VIFuT7pokSQvWTybYBNDYWqsba_m45jFIzJOzyS35mYS1uJO-rM1BlTO3oPikhZEQJ1j1462zV49DJ-x7krJ0auw2rGwALQrhA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;526&quot; data-original-width=&quot;1126&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjJyXNFJ9zIlnlSVMerQEUtfNzXGU9yej7YwE41h4yyPhnrznqg_Ne6HZcdYEZDp-Fvg-e-pDWqkW5xe2CJnxTVV2c5VIFuT7pokSQvWTybYBNDYWqsba_m45jFIzJOzyS35mYS1uJO-rM1BlTO3oPikhZEQJ1j1462zV49DJ-x7krJ0auw2rGwALQrhA=w640-h298&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEid_aTvHAlHdQkWaRAECv6_bXdF3nyiyQh8VzjsqlVgucBNNG0__Dx1fHcQ9kY7Sx4BFG7zFSW86Oc4FLvMC2a95DJciRbtWZns5eimbdxxpsu1-pCJMWIl-PzBqhWTuUdkolflgllUPvqu2_zqbwSUhy25ytEXnaYCvQZnQUnHyUVqLQa1vB9F99yx4g&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;424&quot; data-original-width=&quot;893&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEid_aTvHAlHdQkWaRAECv6_bXdF3nyiyQh8VzjsqlVgucBNNG0__Dx1fHcQ9kY7Sx4BFG7zFSW86Oc4FLvMC2a95DJciRbtWZns5eimbdxxpsu1-pCJMWIl-PzBqhWTuUdkolflgllUPvqu2_zqbwSUhy25ytEXnaYCvQZnQUnHyUVqLQa1vB9F99yx4g=w640-h304&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;3) Write acceptance criteria&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- It can be difficult to take a feature and determine how to implement it as a whole. User stories help break down a feature into manageable sized pieces of functionality. They typically have acceptance criteria which specify what work is included as part of that particular slice of the feature. Acceptance criteria or AC for short are conditions that a software product must satisfy to be accepted by a stakeholder. Acceptance criteria clearly define how each feature should look and function in detail. They&#39;re an extension of scenarios to find and test plans. An acceptance criteria allow a developer to know what to implement code for, a business analyst to know what scope the story covers and a QA to know which scenarios to test. Acceptance criteria follow a specific format. They always start with a given. This is a precondition or beginning state Next is the when. This describes the input or action of the scenario. The final part is the then. This describes the expected outcome of the scenario. Let&#39;s look at an example of a user story which will provide the functionality to add an item to a shopping cart. One scenario of acceptance criteria might be given I am viewing an item, when I press the Add to Cart button, then the item is added to the cart. Other acceptance criteria might define an error scenario. Let&#39;s take a for example adding an item to a cart that is sold out. Given I am viewing an item that is sold out, when I press the Add to Cart button, then the item is not added to the cart. And I see a message that the item is out of stock. In this acceptance criteria I also add an and statement to describe an additional expected outcome for this scenario. This can be done for any part of the acceptance criteria. it&#39;s pretty straightforward to define an acceptance criteria especially if scenarios have already been defined in a test plan. This is just another way to ensure quality and know that an application and know that an application is being built exactly as specified. is being built exactly as specified.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;4) Identify when testing is complete&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It can take some time to work through all the activities within each phase of the software delivery life cycle. At some points of the SDLC, it can be unclear to know when you have done enough to move onto the next phase. This is definitely true for the testing phase. To take ambiguity out of the equation, it helps to determine what steps need to be taken to say that each story has been adequately tested. To do this, you need to define what it means for work to be done. The definition of done will specify what actions need to be completed before a piece of functionality is ready to be released to the public. The team should decide what will be included in a definition of done, so that they have a shared understanding and abide by it. Typically, this definition includes manual of the acceptance criteria from product, design, and QA. Work will start moving fast on projects and it can be easy to cut corners when the team is in a rush and trying to get work completed before a release. There have been countless times when a release deadline is fastly approaching and teammates have tried to rush me through the testing phase by suggesting things like delaying automation until after the release. When a standard is setup, the team is held accountable to follow the steps for each story to get proper sign off. While having an explicit definition of done might sound like a lot to do for every user story, it&#39;s just one final step to add some extra confidence. Since there were test scenarios, an acceptance criteria defined and testing throughout the process, After all, it&#39;s better to spend a little extra time making sure things are right making sure things are right than rushing to fix a nasty bug that&#39;s discovered too late. than rushing to fix a nasty bug that&#39;s discovered too late.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;u&gt;Types of testing QA&lt;/u&gt;&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Box testing&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One way to model testing is to think about it in terms of a box. that can be performed so that there is a holistic approach to testing an application. First, there is black box testing, which means that the box is completely concealed and it is not possible to see inside of it. Each test scenario here examines the product from the outside. It allows input to the box and gets output from the box. This means that there is no knowledge needed about the internals of the application, such as what the source code is doing or how the system is working. The focus with black box testing is to perform an action in the user interface and expect a certain result from that action. Black box tests include manual testing and UI automation testing, both of which will help uncover issues with functionality and usability. QA engineers are responsible for this level of testing. Next up is gray box testing. Here the box is semi-transparent. Test scenarios here examine the interaction between the outside and inside of the box. It requires QA engineers to have a deeper understanding of the application. Gray box tests include integration testing, which examines how components of the application work together. They can trigger some action in the UI and see how the code responds. Typically QA engineers and developers are responsible for these level of test. And lastly, there is white box testing. Here the box is completely transparent and focuses on the internals of the application and what is happening at the code or system level. It tests specific functionalities in the code and verifies the result. White box testing includes unit and system testing. Developers are responsible for these type of tests and write them alongside development. Take for example a shopping cart on an e-commerce web application, items can be added and removed from the shopping cart and a total is displayed based on the quantity of items in the cart. For this feature I&#39;ll want to think about the type of testing that can be done to ensure quality and confidence that the application works as expected. At the white box level of testing I&#39;m starting from inside the box. Examples of test scenarios here that can be executed at this level are that the quantity can be increased and decreased successfully, and the calculation of items is performed correctly. These tests are written by calling functions in the code that can increase, decrease and calculate the total. Different values are provided to the functions and expect an exact result to be returned. At the gray box level of testing and the results a server or database returned. I want to know that the box as a whole works well rather than one specific component. A test at this level I might write would be to add an item to the cart and confirm form the API response that the item was added and the cart price was updated. Tests here start from the client, which sends a request to the server, and the server responds with details which I can verify. For black box testing in this example I&#39;m focusing on what input I provide to the box and what output I receive. An example of a test here is to add an item to the cart using the UI and see the cart quantity and price update. To write this level of test I manipulate web elements in a browser to click and add items to the cart and navigate to the cart. I can also get the value of web elements and confirm the output is what I expect. and confirm the output is what I expect. So that&#39;s how you can model testing as a box. The whole idea is about looking at a box, The whole idea is about looking at a box, or whatever application is under test from multiple angles to provide thorough test coverage. from multiple angles to provide thorough test coverage.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Manual testing&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Manual testing follows the steps as a user performing workflows in the application. The goal is to uncover any issues in the functionality and usability. Before performing manual testing know what scenarios you want to cover. You will have to understand your customers and identify both their typical and nontypical use cases. Testing at this level is done in the test phase Manual testing is a type of black box testing. Let&#39;s look at an example for an airline site where customers search and buy flights or check their flight status. I will focus specifically on the feature for searching for flights. First, I&#39;ll take some time to brainstorm scenarios that an user can perform while searching for flights. All the scenarios I brainstorm will be added to a test plan for this feature. I&#39;ll think about the Happy Path Scenarios which are scenarios that have successful results. This includes searching for valid one-way flights and round-trip flights and getting a list of flights available. Then I&#39;ll think about Sad Path Scenarios which are scenarios that return errors or do not have results. This includes scenarios such as searching for the same city and destination, searching for invalid routes, and searching for routes that do not operate on certain days. Then I&#39;ll write down scenarios into a test plan spreadsheet specifying the scenario and expected result. Here I can even get down to a more granular level for the scenario by specifying the origin airport, destination airport, departure date, and return date. I can use this test data to execute the test scenarios. This isn&#39;t necessary but can be helpful so that there are specific examples of data to see the results of the scenarios. Having this granular level of data is especially helpful for automation, which we will take a closer look at later. Once a feature is ready to be tested, I will refer back to my plan to manually test each scenario specified and mark whether they passed or failed in the latest result column. Any failing scenarios will need to be addressed and fixed before the feature will be considered done and ready for release. and ready for release.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;UI automation testing&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- UI automation is like manual testing but uses a script to automate test scenarios. The benefit of UI automation is that scenarios can be executed repeatedly by running a test script. This will help catch regressions and other oddities much quicker than when done manually. Another benefit is that the scripts can be run on any platform or browser, which is great because it will emulate the interactions of users and their platforms and browser combinations. UI automation tests can be started in the build phase of the SDLC and then completed after the functionality has been developed during the test phase. It is a type of black box testing because it provides input to the UI of an application and expects particular data returned as a result. To get started I refer to the test plan for the feature at hand and determine which scenarios will be automated. I recommend only automating the most important workflows and not every single scenario, taking anywhere from a few seconds and up to a minute to complete. As the test project will continue to grow over time the more UI automation that exists the longer it will take to execute all the scenarios. Looking at the test plan for the flight search feature I&#39;ll decide to automate the first three scenarios, because if any of these fail I can assume in automating the sad path cases. After deciding what to automate I will start writing a test script to search for flights. Each scenario will be one test. And in each test I will write code to drive action in my browser by simulating entering flight data including origin, destination and flight date. I can then send actions to the browser, depress the search button, Luckily I already have some sample routes I&#39;ve defined in my test plan, and I will use the same city data and trip dates in my automation test as well. Once the test script is complete make sure it runs reliably and runs often make sure it runs reliably and runs often so that any irregularities in the applications interface so that any irregularities in the applications interface can be caught and corrected. can be caught and corrected.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Integration testing&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- With the surface level of the application tested by manual and UI automation, a QA engineer might want to move on to test the application from another perspective. Integration testing focuses on the interaction between components at lower layers of the application. This level of testing covers similar scenarios as we&#39;ve seen with manual and UI automation testing, but doesn&#39;t look at what&#39;s happening at the UI level as a result. Instead, integration tests see how the system reacts to certain actions. Integration tests have some knowledge of how the system works internally, and because of that they are a type of gray box testing. QAs or developers usually write these tests during the build and test phase. Take for example the scenario of searching for a one way flight. Here we can send a request to search for a flight providing the flight parameters to the server directly instead of performing the action from the UI. We&#39;ll then wait for the server to send a response to the request and can confirm that the API returns information we expect, such as a successful This type of integration tests the interaction between the application and the server to confirm that the right information is sent and received. If the request returns the wrong status code, or other incorrect flight data, we know that there is a problem with the flight search feature. The benefits are it can catch issues with functionality and can be run in a matter of seconds, meaning we can write more integration tests than UI automation. QA engineers should gain familiarity with integration testing and look for opportunities to implement it for each application feature. to implement it for each application feature.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Performance testing&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Performance testing is done to benchmark how a system performs under load. It will help ensure that an application can scale over time and use. because we test how the system operates under certain stress but don&#39;t have visibility into what&#39;s going on inside the system. While manual, UI automation, and integration testing are the most common for software projects, performance testing is also very valuable. There are a few different types of performance testing Load testing checks the application&#39;s ability to perform under anticipated user loads. The objective is to identify the maximum operating capacity of an application by observing when bottlenecks occur. If I focus on the Search Flights feature, this sends a request to look for flights and returns all results found. I&#39;ll want to set up a test to simulate many users simultaneously searching for flights. I can use software that generates thousands of different sessions of flight searches. While the system is under load, I&#39;ll want to monitor how long the requests take to complete, and identify when spikes or points of long load time, start to occur in the application. There is also endurance testing. Endurance testing, sometimes referred to as soak testing, is done to make sure the application can handle the expected load over a long period of time. This involves simulating many flight search requests and monitoring the system to see if performance degrades. The goal of endurance testing is to check for system problems such as memory leaks. It is similar to load testing but lasts much longer and monitors unusual behavior that can occur in the application or database. And then there is stress testing. Stress testing involves testing an application&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Security testing&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- As you know, people don&#39;t always use the internet for good. or find ways to bring applications down. Security testing is performed to reveal flaws or vulnerabilities that can be exposed by users. Manual UI automation, an integration test, focus more on functionality and confirming it works as expected. Security testing instead looks to expose problems in the application that can either cause it to behave in unexpected ways or stop it from working. Potential problems can include loss of customer data and trust, decline in revenue, and website downtime. There are so many different ways to approach security testing because they are so many ways someone could try to hack an application. SQL Injection is one of the most common types of attacks used by hackers to insert SQL database statements into any text field. This can expose critical information and allow the system to be manipulated. Thinking about the search flight feature, I could use SQL Injection on different fields in the search flight page and try to inject data that will manipulate flight data. I&#39;ll want to test where SQL can be injected I&#39;ll validate the values received before passing the query to the database. Another common and harmful type of attack This type of attack tries to take down making it inaccessible to users. In terms of flight search, it can be possible to use bots to flood the server with traffic, searching for a large number of flights, or try to send information that will crash a server. To stop a DoS attack, tools can be used to identify requests that are likely coming from bots and eliminate that traffic.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;u&gt;Bug Reporting&lt;/u&gt;&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Identify bugs&lt;/div&gt;&lt;div&gt;Selecting transcript lines in this section will navigate to timestamp in the video&lt;/div&gt;&lt;div&gt;- When an application is built perfectly, there will be no bugs. But as we know, humans are error-prone, and there&#39;s no such thing as a perfect software application. Bugs are inevitable. They occur when the system does not work as designed or specified, and result in incorrect or unexpected behavior in an application. when Grace Hopper was working on a relay calculator and operations were not completing because a moth was physically stuck in the computer. Removing the moth fixed the problems and operations started completing successfully again. Examples of bugs can be when a vending machine gives the wrong item. Perhaps I selected A5 but the item from B5 was dispensed instead. Or even worse, nothing dispenses at all. Another example of a bug can be when an ecommerce website does not calculate the right sales tax or total. Bugs are versatile. They can be low impact or high impact, they can affect many users or just a handful of users, they can be constantly reproducible or not, and some bugs even go away and come back later. The only constant with bugs It will be necessary to determine how to manage bugs for a project how to manage bugs for a project so that the application can continue to run smoothly. so that the application can continue to run smoothly.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Report bugs&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Once a bug is identified it should be reported right away. Use the reporting system to create and manage bug reports. Bug reporting systems make it easy to do things like report, triage, view, assign, and close bugs. There are an abundance of options available. Some focus specifically on bug management while others provide a variety of services to manage a software project. Some popular options include Jira, Rally, GitHub, and Bugzilla to name a few. I recommend managing bugs within the same software you use to manage your project. Otherwise pick a tool specifically for bugs if that suits your needs best. For example, if your team uses Jira to track features, user stories, and tasks, then bugs can be tracked there as well. With Jira, there are many attributes that can not only describe the bug but also assign a priority, status, or owner to the issue. Other systems like GitHub have fewer attributes but allow you to put an abundance of information in the description using markdown to style the body, and allow labels to be attached to the bug to provide extra information. All bug reporting systems are different. At a minimum, they allow reporters to thoroughly describe the bug. It&#39;s also beneficial to be able to categorize bugs so that they become easy to find and analyze. Choose a bug reporting system to accurately report and manage bugs. When reporting bugs, it&#39;s necessary to report details about the bug and any other details that will be helpful when reviewing and fixing the bug. A bug report should include details like the name of the bug, a description with steps to reproduce it, an expected and actual result, a picture, video or screen shot, the browser or software version, and a log when applicable. Let&#39;s look at an example bug report for an eCommerce application where items are not added to the cart The steps to reproduce are to go to the application home page and select first item and choose add to cart. The expected result is that when I go to the cart, I can see the item that I selected has been added. The actual result is that when I go to the cart there are no items. I&#39;ll also record and include a GIF which clearly shows the steps to reproduce the bug and see the problem. And then I&#39;ll check in my browser console to see if there were any helpful logs I can find and attach. Lastly, I&#39;ll tag an individual or team to look into the bug, give it a priority of high, and a status of ready for development. so that all fields are presented to the bug reporter to provide thorough detail about the issue they found. This makes all bug reports follow a similar structure This makes all bug reports follow a similar structure with enough information for anyone with enough information for anyone who reads the report to understand. who reads the report to understand.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Triage bugs&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;- You will want to regularly go through and review open bugs with representatives from development, business, and QA. Start with and prioritize bugs and identify the severity and priority of each one. Severity is based on how impactful the bug is to the business, and priority is based on how fast the bug should be fixed. Let me show you what this looks like so you can better visualize it. Severity and priority can be plotted on a basic graph. Let severity be on the x-axis and priority on the y-axis. In the lower left hand quadrant, there is low severity and low priority. These types of bugs only affect a minimal amount of customers and don&#39;t affect major workflows. This level of bug isn&#39;t very impactful. In the upper left hand quadrant, there&#39;s low severity and high priority. Bugs here are important to fix, While the bug might be very visible, it is not preventing users from completing any workflow. For example, on an e-commerce site, during the checkout, there might be a glaring UI bug that breaks some HTML. While it is distracting, it is not preventing users from purchasing items. In the lower right hand quadrant, there is high severity and low priority. Bugs here cause major problems, but only under some circumstances. using an outdated operating system such as Windows 7, In the upper right hand quadrant, there is high severity and high priority. Bugs here are major problems that affect most customers. Bugs at this level indicate service disruption and cause the application to be unusable in some workflows. For example, perhaps users are unable to purchase any items. This is frustrating for users and equally frustrating for the business because they can&#39;t make any money. Using this matrix will help decide how to best order bugs to be fixed. You can then classify bugs as level one through four, or high, medium, low. After all new bugs are prioritized, you can get to work on fixing them in order of importance, you can get to work on fixing them in order of importance, and don&#39;t forget to set up and don&#39;t forget to set up a regularly occurring meeting to triage bugs. a regularly occurring meeting to triage bugs.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Communicate bugs to the team&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- After bugs have been prioritized, communicate details about the status of bugs with the team. Share things like the top priority bugs, Listen to the team to reach consensus that bugs have been prioritized correctly. Clarify the effort and time it will take to fix bugs, and identify who will be able to fix them. To communicate the status of bugs, it can also be nice to have a bug specific project board. The project board can include columns for new, ready for development, in progress, QA, and done. Place box in the appropriate column and keep the status updated. You can also capture analytics about your bugs such as the amount open and closed per month. This can give you an idea of how frequently bugs are being fixed in relation to how many are being created. Identify the features where bugs are coming from. This can be good to see where bugs are occurring in the application and if there are any trends. Communicating bugs to the team will let the team know that it&#39;s important to acknowledge and fix bugs regularly. to acknowledge and fix bugs regularly.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Communicate bugs to the team&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- After bugs have been prioritized, communicate details about the status of bugs with the team. Share things like the top priority bugs, Listen to the team to reach consensus that bugs have been prioritized correctly. Clarify the effort and time it will take to fix bugs, and identify who will be able to fix them. To communicate the status of bugs, it can also be nice to have a bug specific project board. The project board can include columns for new, ready for development, in progress, QA, and done. Place box in the appropriate column and keep the status updated. You can also capture analytics about your bugs such as the amount open and closed per month. This can give you an idea of how frequently bugs are being fixed in relation to how many are being created. Identify the features where bugs are coming from. This can be good to see where bugs are occurring in the application and if there are any trends. Communicating bugs to the team will let the team know that it&#39;s important to acknowledge and fix bugs regularly. to acknowledge and fix bugs regularly.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Have bug bashes&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- It&#39;s important for your team to dedicate time to both find and fix bugs. To find bugs, it can be great to have mob testing sessions around particular features in the application. Taking one hour, have a group of teammates get together to test. They can either do exploratory testing of a specific feature to help uncover bugs, or they can do manual testing using a test plan. This method is a bit more guided, and expects testing to follow the defined steps and scenarios. I recommend doing mob testing at least one week before the release date for every major feature, so your team has time to fix any identified issues. Outside of development sprints, have a bug bash. A week where team-members focus entirely on fixing bugs. This allows individuals who don&#39;t always fix bugs to dig deeper into the codebase. I recommend having bug bashes two to four times a year. They can be great for your application&#39;s health, and fun for your team.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/8380949877278569812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2022/05/software-testing-qa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8380949877278569812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8380949877278569812'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2022/05/software-testing-qa.html' title='Software Testing/ QA'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEimW5bBoBHCmK8PKotbepOT4GF7_6RJs1VNsP7NSnUl7KIxXgymX3KpnAusF1NfjimnMggtL4POQzByUtVCkB81cbxQqe83Zj7PzbWtc7TS2L6oPfJc56LoDp7LabAkg0E9sZWq7cqeWlA8HI6IGlDgCKu6Eq_v68l3vUlJ_YVBKsESNO67RgCXc3mKCg=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-6070778872082764065</id><published>2022-04-13T03:21:00.011-07:00</published><updated>2022-05-05T07:27:56.004-07:00</updated><title type='text'>Learn SQL in 20 days</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 20pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DAY 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 4pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SQL ( STRUCTURED QUERY LANGUAGE )&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 18.35pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DATABASE&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 4pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is
DATA ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 6.25pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&quot;&lt;/span&gt;&lt;b style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&lt;i&gt;Data
is a raw-fact which describes the attributes of an Entity&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; &quot;.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 6pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 4pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Properties or Attributes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhE1JrPXFV_N-u8tylruMV6i-903dPkFjov-2nU6c5smlYaR3f8RnT8AY9nlbXloLnx6TNZNic-wvJVlFVBC8G4Yb0OB0QQnJUjyWrE6x-jpivpJOHrfa6Y0SFkJrfyFB4Oez-8Low5_R53Tb2HNy7GJ9xBbclbEKH2Gl8OqR1bg9XE8kAZ9Hfbk9tog&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;542&quot; data-original-width=&quot;674&quot; height=&quot;329&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjhE1JrPXFV_N-u8tylruMV6i-903dPkFjov-2nU6c5smlYaR3f8RnT8AY9nlbXloLnx6TNZNic-wvJVlFVBC8G4Yb0OB0QQnJUjyWrE6x-jpivpJOHrfa6Y0SFkJrfyFB4Oez-8Low5_R53Tb2HNy7GJ9xBbclbEKH2Gl8OqR1bg9XE8kAZ9Hfbk9tog=w466-h329&quot; width=&quot;466&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgk8cu_X5facPvY61gdGOSdPGUZSw4xvf0PBGi66_iY9W5do7LcvUQx7jWOpDRE3_0gUtuKW09xX5gmKZ5gdnTSrxpsxPhuywjzYd3l_F6rfUXUSV0tevcMZ_CbupSjj0INqgq3WCTnf7XCVtC_CZb9pkKXhjhh8v_H-XUuLBBLu_2LvFX1_Cv9yKQdvQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;404&quot; data-original-width=&quot;833&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgk8cu_X5facPvY61gdGOSdPGUZSw4xvf0PBGi66_iY9W5do7LcvUQx7jWOpDRE3_0gUtuKW09xX5gmKZ5gdnTSrxpsxPhuywjzYd3l_F6rfUXUSV0tevcMZ_CbupSjj0INqgq3WCTnf7XCVtC_CZb9pkKXhjhh8v_H-XUuLBBLu_2LvFX1_Cv9yKQdvQ=w510-h232&quot; width=&quot;510&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DATABASE :&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&quot;&lt;/span&gt;&lt;b style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&lt;i&gt;&lt;u&gt;Database is a place or a medium in which
we store the data in a Systematic and organized manner&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; &quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 4pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEggkYaSYZD2cuuV6j6NTwQVcy7TpIlZ6k7_0NB6dr-Z759OyD_MpHTElbPE2b0e7JtxRIWXIsGIkWEMyqP72su3ENm48LTnANEIrYAIFVxZzETNAJCzYUtq4i-NKTnAin3PLxvW6dr2JZHbtsCA9BmfRKmmtGC1vTOhRizHJam55r3bdIG_MSrEQqREGA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;351&quot; data-original-width=&quot;774&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEggkYaSYZD2cuuV6j6NTwQVcy7TpIlZ6k7_0NB6dr-Z759OyD_MpHTElbPE2b0e7JtxRIWXIsGIkWEMyqP72su3ENm48LTnANEIrYAIFVxZzETNAJCzYUtq4i-NKTnAin3PLxvW6dr2JZHbtsCA9BmfRKmmtGC1vTOhRizHJam55r3bdIG_MSrEQqREGA=w393-h178&quot; width=&quot;393&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;sup&gt;&lt;span face=&quot;&amp;quot;MS PGothic&amp;quot;,sans-serif&quot; style=&quot;font-size: 24pt; mso-bidi-font-family: &amp;quot;MS PGothic&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/sup&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The basic
operations that can be performed on a database are&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;▪&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;CREATE / INSERT&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;▪&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;READ / RETRIEVE&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;▪&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;UPDATE / MODIFY&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;▪&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DELETE / DROP&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;These operations are referred as &lt;b&gt;&quot;CRUD&quot;&lt;/b&gt; Operations .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;&lt;b&gt;&lt;u&gt;DATABASE MANAGEMENT SYSTEM ( DBMS ) :&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;&quot;It is a software which is used to maintain and manage The database &quot;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;span style=&quot;text-indent: -16.85pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -22.4667px;&quot;&gt;▪&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;b&gt;Security&lt;/b&gt; and &lt;b&gt;authorization&lt;/b&gt; are the two important features that DBMS provides .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg5W6-z7vCL16DtBv0FNtvAAIIm5jeiuGoGHmsRwEo_CWDcuflFQN7xc9PSFcHV-OKNUj0Ux5qbn732vAusWE0PYxfA1umflkt2ee-t4kM4pL2JmMUY_tNAqP8pmHxRHqkrfPcw7SFC7h8AYe1DdOGNmFpa1iYwXnUX_JKxZZur2GNpqVaFEwm2yLwxew&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;239&quot; data-original-width=&quot;479&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg5W6-z7vCL16DtBv0FNtvAAIIm5jeiuGoGHmsRwEo_CWDcuflFQN7xc9PSFcHV-OKNUj0Ux5qbn732vAusWE0PYxfA1umflkt2ee-t4kM4pL2JmMUY_tNAqP8pmHxRHqkrfPcw7SFC7h8AYe1DdOGNmFpa1iYwXnUX_JKxZZur2GNpqVaFEwm2yLwxew&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -22.4667px;&quot;&gt;▪&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;We use query language to communicate or interact with DBMS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -22.4667px;&quot;&gt;▪&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;DBMS stores the data in the form of&amp;nbsp; files .&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiMF8HXL8_rtVaiXjTgYERlmh5s1q9tIyUV56qh7JrcOHyWFSTSCbwbHmPsz1ZWXkShy6ezWD4Rpr-LBuGdjMVKtTVpsFK4j0iBTWq1zWfGXd6GjZVLj0yz9s9SE-J5PiuUR29czjTdP5Go9kvw-obOKsNvw3RyLtDTulyvNSPb6KYQ1-4QKo5MlzeBhQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;152&quot; data-original-width=&quot;625&quot; height=&quot;78&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiMF8HXL8_rtVaiXjTgYERlmh5s1q9tIyUV56qh7JrcOHyWFSTSCbwbHmPsz1ZWXkShy6ezWD4Rpr-LBuGdjMVKtTVpsFK4j0iBTWq1zWfGXd6GjZVLj0yz9s9SE-J5PiuUR29czjTdP5Go9kvw-obOKsNvw3RyLtDTulyvNSPb6KYQ1-4QKo5MlzeBhQ&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;b style=&quot;text-align: left; text-indent: -22.4667px;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 95%; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;b style=&quot;text-align: left; text-indent: -22.4667px;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 95%; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;RELATIONAL
DATABASE MANAGEMENT SYSTEM (RDBMS ):&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/span&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 4.0pt; margin-right: 169.35pt; margin-top: 0cm; margin: 0cm 169.35pt 0cm 4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 4.0pt; margin-right: 169.35pt; margin-top: 0cm; margin: 0cm 169.35pt 0cm 4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&quot;It
is a type of DBMS software in which we store the data.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;In the form of Tables ( rows &amp;amp; columns ) &quot;.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 4.0pt; margin-right: 169.35pt; margin-top: 0cm; margin: 0cm 169.35pt 0cm 4pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 4.0pt; margin-right: 169.35pt; margin-top: 0cm; margin: 0cm 169.35pt 0cm 4pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiPKhZ3J-VsSifUWBy2EJo4ro8zwi2sKBUQBDcwuW4-2vM8hKkzRHvgRmxqIG6pE4sAwtkOdZ7MM4LsIdkHaWN48JneU6T5sqsoIWYeA-tP_53EOAjyxx_1PX5wX--hG3czOaVxYmqwjtdvuc1LbCCWm-g-3koY8vZk-4TqW67olcnPJsccQbbKxC9sQg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;277&quot; data-original-width=&quot;644&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiPKhZ3J-VsSifUWBy2EJo4ro8zwi2sKBUQBDcwuW4-2vM8hKkzRHvgRmxqIG6pE4sAwtkOdZ7MM4LsIdkHaWN48JneU6T5sqsoIWYeA-tP_53EOAjyxx_1PX5wX--hG3czOaVxYmqwjtdvuc1LbCCWm-g-3koY8vZk-4TqW67olcnPJsccQbbKxC9sQg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;•&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;We use SQL to communicate or interact with RDBMS&lt;/div&gt;&lt;div&gt;•&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;RDBMS stores the data in the form of Tables.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;RELATIONAL MODEL :&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Relational Model was designed by &lt;b&gt;E.F CODD .&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In Relational Model we can store the data in the from of tables .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any DBMS which follows Relational Model becomes RDBMS .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhU9J5rslA_Sy-cJQr6jVwMbQMn-AYB4lpHscJf1U6C7sDdwZM-m0LIDdDoSlSMYk0uJMzUl989Cg75Y18-17yIt8iTMJ5HeEmSBGbwB9Oido-nJyOpNSXKgXzhQpT1NHcsbYVup5ZmS2C7BKMTITO2q-OVRdgAh-fCQufXn9HHslsFVy6v4NvtmGuTHQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;88&quot; data-original-width=&quot;739&quot; height=&quot;38&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhU9J5rslA_Sy-cJQr6jVwMbQMn-AYB4lpHscJf1U6C7sDdwZM-m0LIDdDoSlSMYk0uJMzUl989Cg75Y18-17yIt8iTMJ5HeEmSBGbwB9Oido-nJyOpNSXKgXzhQpT1NHcsbYVup5ZmS2C7BKMTITO2q-OVRdgAh-fCQufXn9HHslsFVy6v4NvtmGuTHQ&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Any DBMS which follows rules of EF CODD becomes RDBMS .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;TABLE&lt;/b&gt; : &quot;It is a logical organization of data which consists of Columns &amp;amp;Rows .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjqMWETcRU1q47ddWhwzUDuwiiudZnreLd-yKucwD4zipf3lA5IXY6CPvvpwbrFnHus9kt229mRtlD70wTEnJBu-hKJ3LOwkZM0JcPqyqIf0NnoxtwlUN1Iwb9Gv9albZpjP9183Geq80hwKABZXWx5I5GT9DIFHUghS6oV8DeZR3hpkhEPDMgtJ-FxYw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;363&quot; data-original-width=&quot;926&quot; height=&quot;135&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjqMWETcRU1q47ddWhwzUDuwiiudZnreLd-yKucwD4zipf3lA5IXY6CPvvpwbrFnHus9kt229mRtlD70wTEnJBu-hKJ3LOwkZM0JcPqyqIf0NnoxtwlUN1Iwb9Gv9albZpjP9183Geq80hwKABZXWx5I5GT9DIFHUghS6oV8DeZR3hpkhEPDMgtJ-FxYw=w346-h135&quot; width=&quot;346&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhicZDGf8gECqACQWsb2bmTJorrJTRPB0V0LHT1g2tQ7W0jyJO6PoN7_TMdn9d6t2EY7D64lG-prWtyVlrGEhRLt6tKx4kNXgM6UumoWCg5YcLIkUglOhovQzd7kH-rAolYAyiztCfew1Cy5h7vlrKWnQHm-QuL9tqu3AVthUQdZPzTF7iOo-bT4Bx4lQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;345&quot; data-original-width=&quot;905&quot; height=&quot;137&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhicZDGf8gECqACQWsb2bmTJorrJTRPB0V0LHT1g2tQ7W0jyJO6PoN7_TMdn9d6t2EY7D64lG-prWtyVlrGEhRLt6tKx4kNXgM6UumoWCg5YcLIkUglOhovQzd7kH-rAolYAyiztCfew1Cy5h7vlrKWnQHm-QuL9tqu3AVthUQdZPzTF7iOo-bT4Bx4lQ=w359-h137&quot; width=&quot;359&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;RULES OF E.F CODD :&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;The data entered into a cell must always be a single valued data .&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh5msCHiRsYME74iA02x6PMD_ES8jXWZo_nWM7KmHnKLiBiaa36tLcHIIcFNe6_tbhY7Kq1aO4jEzSrf0xNmee5XrPjOEygM2XysAj7gxkbN0jpUVPPt3J97NNZXYOHZuUOOgqCgcMjyo0EjyhkiU54agIqvOYvWbAjIyoFwqw5f1ykU6LInKRNFZd9mA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;518&quot; data-original-width=&quot;822&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh5msCHiRsYME74iA02x6PMD_ES8jXWZo_nWM7KmHnKLiBiaa36tLcHIIcFNe6_tbhY7Kq1aO4jEzSrf0xNmee5XrPjOEygM2XysAj7gxkbN0jpUVPPt3J97NNZXYOHZuUOOgqCgcMjyo0EjyhkiU54agIqvOYvWbAjIyoFwqw5f1ykU6LInKRNFZd9mA&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-indent: -22.4667px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;2. According to E.F CODD we can store the data in Multiple Tables , If needed we can establish a connection between the tables with the Help of Key Attribute .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;3. &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;In RDBMS we store everything in the from of tables including&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Metadata .&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;Example : Metadata : The details about a data is knows as Metadata.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 31.0pt; text-indent: -16.85pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; text-indent: -16.85pt;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhowb5_jzyiUsHaf8UVGg6ddqaJc5QSiI23IQnwXy8XHehstsH172DKaKCC-CJ7t_uHsf8jmY34BynjWrpMCcOrARqSDthhRvRxKBVQPxQEiYdQOXUKYE425V74f2igE3IE_WFXXchq-QnRQJk4hvYD1f43wvkYXjBlK-YbYcf5e9e_jZaVgvGAvLpTgw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;641&quot; data-original-width=&quot;997&quot; height=&quot;309&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhowb5_jzyiUsHaf8UVGg6ddqaJc5QSiI23IQnwXy8XHehstsH172DKaKCC-CJ7t_uHsf8jmY34BynjWrpMCcOrARqSDthhRvRxKBVQPxQEiYdQOXUKYE425V74f2igE3IE_WFXXchq-QnRQJk4hvYD1f43wvkYXjBlK-YbYcf5e9e_jZaVgvGAvLpTgw=w480-h309&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;4. The data entered into the table can be validated in 2 steps .&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;By assigning Datatypes .&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;By assigning Constraints .&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;Datatypes are mandatory , whereas Constraints are Optional .&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;text-indent: -22.4667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-indent: -22.4667px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;u&gt;DATATYPES :&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; It is used to specify or determine the type of data that will be stored In a particular memory location .&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;u&gt;Datatypes in SQL :&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;1. 1. CHAR&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;2. 2. VARCHAR / VARCHAR2&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;3. 3. DATE&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;4. 4. NUMBER&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;5. 5. LARGE OBJECTS&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;i.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;i. Character Large Object .&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;ii.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;ii. Binary Large Object .&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NOTE :&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SQL is not a Case Sensitive Language .&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1.&lt;/b&gt;&amp;nbsp;&lt;u style=&quot;font-weight: bold;&quot;&gt;CHAR :&lt;/u&gt; In character datatype we can store &#39;A-Z&#39; , &#39;a-z&#39; , &#39;0-9&#39;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And Special Characters( $ , &amp;amp; , @ , ! … ) .&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Characters must always be enclosed within single quotes &#39; &#39;.&lt;/li&gt;&lt;li&gt;Whenever we use char datatype we must mention size&lt;/li&gt;&lt;li&gt;Size : it is used to specify number of characters it can store .&lt;/li&gt;&lt;/ul&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The maximum number of characters it can store is&lt;b&gt; &lt;span style=&quot;color: red;&quot;&gt;2000ch&lt;/span&gt;&lt;/b&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Char follows fixed length memory allocation .&lt;/li&gt;&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;Syntax:
CHAR ( SIZE )&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhTqxgORKs7S3qxDoeO3iK0DjSQywIx1Gdfiw1ymtgP8SiwGDH8qqiNmuOMykY6a30eoV7VL90V9tMNOkBsaXAP6IXBHKWiZn1TOSaXdHMLpY1ZXIpa966JAuk7xMGHVn0lwL2P78yuCY1CnEpT7MsdJLW_2Av70TQM3khgropieLvUnmvHUwnu0rh5Dg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;264&quot; data-original-width=&quot;1025&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhTqxgORKs7S3qxDoeO3iK0DjSQywIx1Gdfiw1ymtgP8SiwGDH8qqiNmuOMykY6a30eoV7VL90V9tMNOkBsaXAP6IXBHKWiZn1TOSaXdHMLpY1ZXIpa966JAuk7xMGHVn0lwL2P78yuCY1CnEpT7MsdJLW_2Av70TQM3khgropieLvUnmvHUwnu0rh5Dg=w386-h110&quot; width=&quot;386&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2.&lt;u&gt;VARCHAR&lt;/u&gt;&lt;/b&gt; : In varchar datatype we can store &#39;A-Z&#39; , &#39;a-z&#39; , &#39;0-9&#39;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;And Special Characters( $ , &amp;amp; , @ , ! … ) .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Characters must always be enclosed within single quotes &#39; &#39;.&lt;/li&gt;&lt;li&gt;Whenever we use char datatype we must mention size&lt;/li&gt;&lt;li&gt;Size : it is used to specify number of characters it can store .&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The maximum number of characters it can store is &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;2000ch&lt;/span&gt;.&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;VarChar follows variable length memory allocation .&lt;/li&gt;&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;Syntax:
VARCHAR ( SIZE )&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example : VARCHAR ( 8 )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjRK773uii9tSEGf-U9Rnd35X2p5PmGvaRsXIeP_A9ecFTiQ-byzya7rTz5E-XB4aTI3csYZ06YSJzN5xM2dEXkdDnEq1HHYXLTMOSpgh-5oaUBDbz2C36yLbffryoF59PnKTqU2GIEwo8mEQbq_jcyENkly2UxTCccncPwsjTZtRUZEvGJgACraZcSww&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;183&quot; data-original-width=&quot;990&quot; height=&quot;59&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjRK773uii9tSEGf-U9Rnd35X2p5PmGvaRsXIeP_A9ecFTiQ-byzya7rTz5E-XB4aTI3csYZ06YSJzN5xM2dEXkdDnEq1HHYXLTMOSpgh-5oaUBDbz2C36yLbffryoF59PnKTqU2GIEwo8mEQbq_jcyENkly2UxTCccncPwsjTZtRUZEvGJgACraZcSww&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;NOTE : &lt;b&gt;VARCHAR2 &lt;/b&gt;: it is an updated version of varchar where in We can store up to &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;4000Ch.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;Syntax: VARCHAR2( SIZE )&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEje5Fqx2sAaCwn23cOyq4SovOlz_qUOh5Quk6JowyrxkGR-2lBjw-p3UFO-FOr5k96pkr9B8EbkV8cdK9GVxUjzaB78i_Hy7K0OGTZqRdJJSlOPjZyzMMGux2QTK-RyQ8ysbta-Q_OWllG44ibDgNq5Br55KXGDMad2psmOnhhGRuhodGVdghfWD0wLxA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;312&quot; data-original-width=&quot;968&quot; height=&quot;129&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEje5Fqx2sAaCwn23cOyq4SovOlz_qUOh5Quk6JowyrxkGR-2lBjw-p3UFO-FOr5k96pkr9B8EbkV8cdK9GVxUjzaB78i_Hy7K0OGTZqRdJJSlOPjZyzMMGux2QTK-RyQ8ysbta-Q_OWllG44ibDgNq5Br55KXGDMad2psmOnhhGRuhodGVdghfWD0wLxA=w400-h129&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;3. NUMBER : It is used to store numeric values .&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SYNTAX: NUMBER ( Precision , [ Scale ] )&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;[ ] - Not Mandatory .&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Precision &lt;/b&gt;: it is used to determine the number of digits used To store integer value .&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Scale : &lt;/b&gt;it is used to determine the number of digits used to store Decimal ( floating ) value within the precision .&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Scale is not mandatory , and the default value of scale Is zero ( 0 ) .&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg__oFQEmjRoUUODCpJu9Og029cM3GPnIfZGDI5bbRgwFX4FOPLZJGe5m5a7SlurmFjJ-aTsSUOCVgpvxjzFIFEAMggYnypkLX9bBMnEsGv_3FxIJsiaSCXa15IMsCEmhu8vcBiUHQEE60ClBAyHPY9kvd68kIqyNMyhx65jjhlXIfLVPEiMFgzegv9HA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;368&quot; data-original-width=&quot;561&quot; height=&quot;263&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg__oFQEmjRoUUODCpJu9Og029cM3GPnIfZGDI5bbRgwFX4FOPLZJGe5m5a7SlurmFjJ-aTsSUOCVgpvxjzFIFEAMggYnypkLX9bBMnEsGv_3FxIJsiaSCXa15IMsCEmhu8vcBiUHQEE60ClBAyHPY9kvd68kIqyNMyhx65jjhlXIfLVPEiMFgzegv9HA=w400-h263&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiOs-zxy6mcUNwuUtGEOgjYPvEuE5MqWVwODT2thKFoaWMgD-U_QwVTsj84ZWd4ee2dqCP9tWGibA3ayitJp9v3eEmqvdZmwm45uQLrQi35EFmnhCIKTqAyGpkV2J8D3zH3iB1LA9De31i_3lks1ANHhFtZm0m3sM29BTzVy-8Ix6IZAND5xDCgUuw3kA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;175&quot; data-original-width=&quot;567&quot; height=&quot;123&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiOs-zxy6mcUNwuUtGEOgjYPvEuE5MqWVwODT2thKFoaWMgD-U_QwVTsj84ZWd4ee2dqCP9tWGibA3ayitJp9v3eEmqvdZmwm45uQLrQi35EFmnhCIKTqAyGpkV2J8D3zH3iB1LA9De31i_3lks1ANHhFtZm0m3sM29BTzVy-8Ix6IZAND5xDCgUuw3kA&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b style=&quot;font-weight: bold;&quot;&gt;4. DATE : &lt;/b&gt;it is used to store dates in a particular format .&amp;nbsp;&lt;span style=&quot;text-align: center;&quot;&gt;It used Oracle specified Format.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiXaH1VsEnYpoMKOPnmW8K2toVfl6J43qybnYrlb7Bi0wfLejYW6XaLAIz9sN1rutpsMgYiBXKlIVQ6Gq74I-DTdFuw2DV0BxxTmAVwm10Uqv4ikpXxHTnN5QXetoq4h5bxHtmxZKBhzSrKRfBxZfSq4XRmn49QVMaDFQR47bn49ZMjblhJn-sDCNKsag&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;107&quot; data-original-width=&quot;524&quot; height=&quot;65&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiXaH1VsEnYpoMKOPnmW8K2toVfl6J43qybnYrlb7Bi0wfLejYW6XaLAIz9sN1rutpsMgYiBXKlIVQ6Gq74I-DTdFuw2DV0BxxTmAVwm10Uqv4ikpXxHTnN5QXetoq4h5bxHtmxZKBhzSrKRfBxZfSq4XRmn49QVMaDFQR47bn49ZMjblhJn-sDCNKsag&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 31pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; margin-left: 27.5pt; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-table-layout-alt: fixed;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;height: 15.05pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border-top: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 26pt;&quot; valign=&quot;bottom&quot; width=&quot;35&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-font-width: 96%;&quot;&gt;DOB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: none; border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: 1pt solid rgb(198, 198, 198); height: 15.05pt; padding: 0cm; width: 48pt;&quot; valign=&quot;bottom&quot; width=&quot;64&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-top: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: none; border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: 1pt solid rgb(198, 198, 198); height: 15.05pt; padding: 0cm; width: 62pt;&quot; valign=&quot;bottom&quot; width=&quot;83&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Hire date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-top: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-top: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-font-width: 98%;&quot;&gt;Anniversary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.2pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: none; border-top: 1pt solid windowtext; height: 2.2pt; padding: 0cm; width: 26pt;&quot; valign=&quot;bottom&quot; width=&quot;35&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.2pt; padding: 0cm; width: 48pt;&quot; valign=&quot;bottom&quot; width=&quot;64&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.2pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: none; border-top: 1pt solid windowtext; height: 2.2pt; padding: 0cm; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.2pt; padding: 0cm; width: 17pt;&quot; valign=&quot;bottom&quot; width=&quot;23&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.2pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: none; border-top: 1pt solid windowtext; height: 2.2pt; padding: 0cm; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 15.05pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 26pt;&quot; valign=&quot;bottom&quot; width=&quot;35&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 48pt;&quot; valign=&quot;bottom&quot; width=&quot;64&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 62pt;&quot; valign=&quot;bottom&quot; width=&quot;83&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 10pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;01-JAN-1945’
‘20-JUN-20&#39;&amp;nbsp; &#39;15-APR-2008&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 10pt; mso-line-height-rule: exactly;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 10pt; mso-line-height-rule: exactly;&quot;&gt;&lt;b&gt;5. LARGE OBJECTS&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Character large object (CLOB):&lt;/b&gt;&lt;/div&gt;&lt;div&gt;It is used to store characters up to 4 GB of size.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2.Binary large object (BLOB):&lt;/b&gt;&lt;/div&gt;&lt;div&gt;It is used to store binary values of images, mp3, mp4 Documents etc. …. Up to 4GB of size.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;CONSTRAINTS:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is a rule given to a column for validation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;Types of Constraints:&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;UNIQUE&lt;/div&gt;&lt;div&gt;2.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;NOT NULL&lt;/div&gt;&lt;div&gt;3.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;CHECK&lt;/div&gt;&lt;div&gt;4.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;PRIMARY KEY&lt;/div&gt;&lt;div&gt;5.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;FOREIGN KEY.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. UNIQUE&lt;/b&gt;: &quot;It is used to avoid duplicate values into the column &quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. NOT NULL&lt;/b&gt;: &quot;It is used to avoid Null &quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3. CHECK:&lt;/b&gt; &quot;It is an extra validation with a condition&amp;nbsp;&lt;/div&gt;&lt;div&gt;If the condition is satisfied, then the value is accepted else Rejected &quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4. PRIMARY KEY:&lt;/b&gt; &quot;It is a constraint which is used to identify a record Uniquely from the table &quot;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;u&gt;Characteristics of Primary key:&lt;/u&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;We can have only 1 PK in a table&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;PK cannot accept duplicate / repeated values.&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;PK cannot accept Null&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;PK is always a combination of Unique and Not Null Constraint.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5. FOREIGN KEY&lt;/b&gt;: &quot;It is used to establish a connection between the the tables &quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;Characteristics of Foreign key:&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;We can have only Multiple FK in a table&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;FK can accept duplicate / repeated values.&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;FK can accept Null&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;FK is not a combination of Unique and Not Null Constraint.&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;For an Attribute (column) to become a FK, it is mandatory That it must be a PK in its own table .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Example:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;WordSection1&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;background: rgb(232, 76, 34); font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Primary key&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;span style=&quot;background: rgb(178, 161, 199);&quot;&gt;&amp;nbsp;Check ( Salary &amp;gt; &lt;/span&gt;&amp;nbsp;Check&lt;/b&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: Arial; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi1eqb7S43Gb_wu5XITgXmQliWwCWQ0qp1aitcVLnkrUjaWE0xmj8F5QO-dKpizz91lXJrEsNBlMBiMG9ZMZfIw6P15xHyWrji2h0vsJpLUkQe9tOo4XCPVwT1vbroHMKFf2ZGpeW6izegQg5jzev5bTMpFPH6CHw1a41B9Hs-G6VFtLvXWKpgxocAuAg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;325&quot; data-original-width=&quot;863&quot; height=&quot;242&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi1eqb7S43Gb_wu5XITgXmQliWwCWQ0qp1aitcVLnkrUjaWE0xmj8F5QO-dKpizz91lXJrEsNBlMBiMG9ZMZfIw6P15xHyWrji2h0vsJpLUkQe9tOo4XCPVwT1vbroHMKFf2ZGpeW6izegQg5jzev5bTMpFPH6CHw1a41B9Hs-G6VFtLvXWKpgxocAuAg=w640-h242&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br clear=&quot;all&quot; style=&quot;break-before: page; mso-break-type: section-break; page-break-before: always;&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 10pt; mso-ansi-language: EN-US; mso-bidi-font-family: Arial; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjuLg86nQp1Pb0PpwrALQyGnZRna3MfAh4l_ShgGKY-GerKk_98e0C7St8T-RoSvYJQvfGhZ3YE5l8LBGLhSiaTYu05bJimMUPMb_U7jFkwTEY1ewNZFMzWKF0TOqltTRkzuJQ71a9Txin01xnjurbJO7Rn52qWFaUkRjVVQxMAx8l9dltr7QMyW9de5A&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;548&quot; data-original-width=&quot;820&quot; height=&quot;429&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjuLg86nQp1Pb0PpwrALQyGnZRna3MfAh4l_ShgGKY-GerKk_98e0C7St8T-RoSvYJQvfGhZ3YE5l8LBGLhSiaTYu05bJimMUPMb_U7jFkwTEY1ewNZFMzWKF0TOqltTRkzuJQ71a9Txin01xnjurbJO7Rn52qWFaUkRjVVQxMAx8l9dltr7QMyW9de5A=w640-h429&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;Differentiate between Primary key and Foreign key .&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;

&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; margin-left: 27.5pt; mso-padding-alt: 0cm 0cm 0cm 0cm; mso-table-layout-alt: fixed;&quot;&gt;
 &lt;tbody&gt;&lt;tr style=&quot;height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;border-bottom: none; border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: 1pt solid rgb(198, 198, 198); height: 15pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-top: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 87pt;&quot; valign=&quot;bottom&quot; width=&quot;116&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-font-width: 98%;&quot;&gt;PRIMARY KEY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: none; border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: 1pt solid rgb(198, 198, 198); height: 15pt; padding: 0cm; width: 77pt;&quot; valign=&quot;bottom&quot; width=&quot;103&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-top: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: none; border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: 1pt solid rgb(198, 198, 198); height: 15pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FOREIGN KEY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.25pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: none; height: 2.25pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: none; border-top: 1pt solid windowtext; height: 2.25pt; padding: 0cm; width: 87pt;&quot; valign=&quot;bottom&quot; width=&quot;116&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.25pt; padding: 0cm; width: 77pt;&quot; valign=&quot;bottom&quot; width=&quot;103&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.25pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: none; border-top: 1pt solid windowtext; height: 2.25pt; padding: 0cm; width: 85pt;&quot; valign=&quot;bottom&quot; width=&quot;113&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.25pt; padding: 0cm; width: 92pt;&quot; valign=&quot;bottom&quot; width=&quot;123&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 15pt; mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It is
  used to identify a records&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It is
  used to establish a connection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 13.3pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 13.3pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 13.3pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.3pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Uniquely
  from the table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 13.3pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 13.3pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.3pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Between
  the tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.25pt; mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: none; height: 2.25pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.25pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.25pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.25pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 15pt; mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It
  cannot accept Null&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It can
  accept Null&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.25pt; mso-yfti-irow: 6;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: none; height: 2.25pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.25pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.25pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.25pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 15.05pt; mso-yfti-irow: 7;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It
  cannot accept duplicate values&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It can
  accept duplicate values&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.2pt; mso-yfti-irow: 8;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: none; height: 2.2pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.2pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.2pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.2pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 15.05pt; mso-yfti-irow: 9;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It is
  always a combination of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;It is
  not a combination of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 13.3pt; mso-yfti-irow: 10;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 13.3pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 13.3pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.3pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Not
  Null and Unique constraint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 13.3pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 13.3pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.3pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Not
  Null and Unique constraint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.2pt; mso-yfti-irow: 11;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: none; height: 2.2pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.2pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.2pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.2pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 1.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 15.05pt; mso-yfti-irow: 12;&quot;&gt;
  &lt;td style=&quot;border-left: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 164pt;&quot; valign=&quot;bottom&quot; width=&quot;219&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;We can
  have only 1 PK in a table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;height: 15.05pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-right: solid #C6C6C6 1.0pt; border: none; height: 15.05pt; padding: 0cm; width: 176pt;&quot; valign=&quot;bottom&quot; width=&quot;235&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;We can
  have Multiple FK in a table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr style=&quot;height: 2.3pt; mso-yfti-irow: 13; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: 1pt solid rgb(198, 198, 198); border-right: none; border-top: none; height: 2.3pt; padding: 0cm; width: 4pt;&quot; valign=&quot;bottom&quot; width=&quot;5&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 2pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.3pt; padding: 0cm; width: 87pt;&quot; valign=&quot;bottom&quot; width=&quot;116&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 2pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.3pt; padding: 0cm; width: 77pt;&quot; valign=&quot;bottom&quot; width=&quot;103&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 2pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.3pt; padding: 0cm; width: 3pt;&quot; valign=&quot;bottom&quot; width=&quot;4&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 2pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid #C6C6C6 1.0pt; border: none; height: 2.3pt; padding: 0cm; width: 85pt;&quot; valign=&quot;bottom&quot; width=&quot;113&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 2pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: 1pt solid rgb(198, 198, 198); border-left: none; border-right: 1pt solid rgb(198, 198, 198); border-top: none; height: 2.3pt; padding: 0cm; width: 92pt;&quot; valign=&quot;bottom&quot; width=&quot;123&quot;&gt;
  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 2pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;NOTE :&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;NULL&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Null Is a keyword which is used to represent Nothing / Empty Cell.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Characteristics of Null :&lt;/b&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Null doesn’t represent 0 or Space .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Any operations performed on a Null will result in Null itself&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Null doesn’t Occupy any Memory .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;We cannot Equate Null .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;OVERVIEW OF SQL STATEMENTS :&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA DEFINITION LANGUAGE&amp;nbsp; ( DDL )&lt;/div&gt;&lt;div&gt;2.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA MANIPULATION LANGUAGE&amp;nbsp; ( DML )&lt;/div&gt;&lt;div&gt;3.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;TRANSCATION CONTROL LANGUAGE&amp;nbsp; ( TCL )&lt;/div&gt;&lt;div&gt;4.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA CONTROL LANGUAGE&amp;nbsp; ( DCL )&lt;/div&gt;&lt;div&gt;5.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA QUERY LANGUAGE ( DQL )&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;DATA QUERY LANGUAGE ( DQL ) :&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&quot;DQL is used to retrieve the data from the database &quot; . It had 4 statements :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT&lt;/div&gt;&lt;div&gt;2.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;PROJECTION&lt;/div&gt;&lt;div&gt;3.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECTION&lt;/div&gt;&lt;div&gt;4.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;JOIN&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. SELECT :&lt;/b&gt; &quot;It is used to retrieve the data from the table and display it.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2. PROJECTION :&lt;/b&gt; &quot;It is a process of retrieving the data by &lt;span style=&quot;color: red;&quot;&gt;selecting only the columns&lt;/span&gt; is known as Projection &quot;&amp;nbsp;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;In projection all the records / values present in a particular column are by default selected .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3.SELECTION&lt;/b&gt; : &quot;It is a process of retrieving the data by &lt;span style=&quot;color: red;&quot;&gt;selecting both the columns and rows&lt;/span&gt; is known as Selection &quot; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4.JOIN&lt;/b&gt; :&quot;It is a process of retrieving the data from &lt;span style=&quot;color: red;&quot;&gt;Multiple tables&lt;/span&gt; simultaneously is known as Join &quot; .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PROJECTION&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&quot;It is a process of retrieving the data by &lt;span style=&quot;color: red;&quot;&gt;selecting only the columns&lt;/span&gt; is known as Projection &quot; .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;In projection all the records / values present in a particular column are by default selected .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 18pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #fa0000; font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SYNTAX&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; :&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 124.35pt; margin-top: 0cm; margin: 0cm 124.35pt 0cm 18pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 95%; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * / [DISTINCT] Column_Name
/ Expression [ALIAS] FROM Table_Name ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 124.35pt; margin-top: 0cm; margin: 0cm 124.35pt 0cm 18pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 95%; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 124.35pt; margin-top: 0cm; margin: 0cm 124.35pt 0cm 18pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;u&gt;ORDER OF EXECUTION&lt;/u&gt;&lt;/div&gt;&lt;div&gt;1. FROM Clause&lt;/div&gt;&lt;div&gt;2. SELECT Clause&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example : Write a query to display names of all the students .&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgoqXKbfbe467ovFPHSvl6jLWs58Hoz1oEpz2nmwFadCkH8fSU0os4-tx3xZ1rioacvoU4mqI7s7Xf9iKsxeERauXvOtlNl4WeJB1uPnvPxtyovApOLDkMQTAHluG36geM3z43-adYzZ1wIUs4IDZa-9LWHmbYNiwLSOW42_z7Px7iZpQkJI1PVrtPSyw&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;477&quot; data-original-width=&quot;820&quot; height=&quot;373&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgoqXKbfbe467ovFPHSvl6jLWs58Hoz1oEpz2nmwFadCkH8fSU0os4-tx3xZ1rioacvoU4mqI7s7Xf9iKsxeERauXvOtlNl4WeJB1uPnvPxtyovApOLDkMQTAHluG36geM3z43-adYzZ1wIUs4IDZa-9LWHmbYNiwLSOW42_z7Px7iZpQkJI1PVrtPSyw=w640-h373&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;NOTE :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;FROM Clause starts the execution .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;For FROM Clause we can pass Table_Name as an argument .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;The job of FROM Clause is to go to the Database and search for the table and put the table under execution .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT Clause will execute after the execution of FROM Clause&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;For SELECT Clause we pass 3 arguments&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;*&lt;/li&gt;&lt;li&gt;Column_Name&lt;/li&gt;&lt;li&gt;Expression&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;The job of SELECT Clause is to go the table under execution and select the columns mentioned .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT Clause is responsible for preparing the result table .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Asterisk(*) : it means to select all the columns from the table .&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;Semicolon : it means end of the query .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD student id and student names for all the students.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;SELECT SID , SNAME FROM STUDENT ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD name and branch of all the students .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;SELECT SNAME , BRANCH FROM STUDENT ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD NAME , BRANCH AND PERCENTAGE FOR ALL THE STUDENTS .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;SELECT SNAME , BRANCH , PER FROM STUDENT ;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD details of all the students from students table .&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;SELECT *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;FROM STUDENT ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD sname , sid , per , branch of all the students .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;SELECT SNAME , SID , PER , BRANCH FROM STUDENT ;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EMP Table :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiUXEmLA4P0po2hQhULofpI5WM-Aay0EBxfMNAsT6kg7OE5ViEYrmvQNxkX-HZgEIS9rAu_ilkAe_3EV-h3SKjKzud9JXSOWqHawRcoR2rJS6qey-IJQXoIa66EFhgxhcxU1MFdxsR9YQwlnKncOh5AlzTq10smj7YWH8GZZn0yVdOslH1SP_DFA1YlhA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;437&quot; data-original-width=&quot;759&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiUXEmLA4P0po2hQhULofpI5WM-Aay0EBxfMNAsT6kg7OE5ViEYrmvQNxkX-HZgEIS9rAu_ilkAe_3EV-h3SKjKzud9JXSOWqHawRcoR2rJS6qey-IJQXoIa66EFhgxhcxU1MFdxsR9YQwlnKncOh5AlzTq10smj7YWH8GZZn0yVdOslH1SP_DFA1YlhA=w640-h368&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;WAQTD name salary and commission given to all the employees .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;Select ename , sal , comm From emp ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD name of the employee along with their date of joining .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;Select ename , hiredate From emp ;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh89JKsQ8uLHFEe6m0NC6p-Jt90vpPuaN30PfQiKkCcUZ5BrEEgBV1exRpreidItw3yAufBesCSsK_dZQvfwzumFIaahTzm9wqdhdbCIM5Za4us-1_oEkiGv3f_DtmsGOwnOG-gUZgKFkfuJPWlx7X47xulkXm9ZW2PwG367x7k0kerY-KEeyNkqLK0nA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;234&quot; data-original-width=&quot;463&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh89JKsQ8uLHFEe6m0NC6p-Jt90vpPuaN30PfQiKkCcUZ5BrEEgBV1exRpreidItw3yAufBesCSsK_dZQvfwzumFIaahTzm9wqdhdbCIM5Za4us-1_oEkiGv3f_DtmsGOwnOG-gUZgKFkfuJPWlx7X47xulkXm9ZW2PwG367x7k0kerY-KEeyNkqLK0nA=w400-h203&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;WAQTD dname and location for all the depts .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;Select dname , loc From dept ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;QUESTIONS ON EMP AND DEPT TABLE:&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;1.WRITE A QUERY TO DISPLAY ALL THE DETAILS FROM THE EMPLOYEE TABLE.&lt;/div&gt;&lt;div&gt;2.WAQTD NAMES OF ALL THE EMPLOYEES.&lt;/div&gt;&lt;div&gt;3.WAQTD NAME AND SALARY GIVEN TO ALL THE EMPLOYEES.&lt;/div&gt;&lt;div&gt;4.WAQTD NAME AND COMMISSION GIVEN TO ALL THE EMPLOYEES.&lt;/div&gt;&lt;div&gt;5.WAQTD EMPLOYEE ID AND DEPARTMENT NUMBER OF ALL THE EMPLOYEES&lt;/div&gt;&lt;div&gt;IN EMP TABLE.&lt;/div&gt;&lt;div&gt;6.WAQTD ENAME AND HIREDATE OF ALL THE EMPLOYEES .&lt;/div&gt;&lt;div&gt;7.WAQTD NAME AND DESIGNATION OF ALL THE EMPLPOYEES .&lt;/div&gt;&lt;div&gt;8.WAQTD NAME , JOB AND SALARY GIVEN ALL THE EMPLOYEES.&lt;/div&gt;&lt;div&gt;9.WAQTD DNAMES PRESENT IN DEPARTMENT TABLE.&lt;/div&gt;&lt;div&gt;10.WAQTD DNAME AND LOCATION PRESENT IN DEPT TABLE.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;DISTINCT Clause&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&quot;It is used to remove the duplicate or repeated values from the Result table &quot; .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Distinct clause has to be used As the first argument to select clause .&lt;/li&gt;&lt;li&gt;We can use multiple columns As an argument to distinct clause, it will remove the combination of columns in which the records are duplicated .&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhxLMsT3QFto0nSygAKorwj65LhHeDeccUWXf5aQbEZI4in3ewD26-1de3VJ8Zt2PmbMtOiXUfOsUo9J8KDsRYZkCg7ydxk2QbMb6LaZvPRg-UUedCbLLbU5kSu5vIyDBMXClVG8o1IHCtn_Iy8FpaUamzGmSs7YilSHVy9xDcbrfuUQO1teqnCbsUYBQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;288&quot; data-original-width=&quot;410&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhxLMsT3QFto0nSygAKorwj65LhHeDeccUWXf5aQbEZI4in3ewD26-1de3VJ8Zt2PmbMtOiXUfOsUo9J8KDsRYZkCg7ydxk2QbMb6LaZvPRg-UUedCbLLbU5kSu5vIyDBMXClVG8o1IHCtn_Iy8FpaUamzGmSs7YilSHVy9xDcbrfuUQO1teqnCbsUYBQ&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;SELECT SNAME FROM STUDENT;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh_jwIa96Pq3tlY_2tcLPNq3ohp5BHE7v_Lkmzc9aSc56AmL5YA1btPkcDjaE9-FAtngg6LyAR6s8BssMS-E98Hjzvj-eYKC_xv-QlfCXS9azSEgGDBC6E5xB7Iwi1brtyr9gRZ0MwsAR84OyVuL2WB9jsmomDA7b366uPCZED4QlkSgaXqvwuLF-x7EQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;285&quot; data-original-width=&quot;169&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEh_jwIa96Pq3tlY_2tcLPNq3ohp5BHE7v_Lkmzc9aSc56AmL5YA1btPkcDjaE9-FAtngg6LyAR6s8BssMS-E98Hjzvj-eYKC_xv-QlfCXS9azSEgGDBC6E5xB7Iwi1brtyr9gRZ0MwsAR84OyVuL2WB9jsmomDA7b366uPCZED4QlkSgaXqvwuLF-x7EQ&quot; width=&quot;142&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT &lt;span style=&quot;color: red;&quot;&gt;DISTINCT&lt;/span&gt; SNAME FROM STUDENT ;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgfP3ksVrGwqehWe4Y4WqhLDe9G_KJjneM5Mx1cn31Qsq6TGm9klTP31QLnWH5eFTQlEC0-XcAbIRW2SB3njZFEozBQDWhuEkEc67jtEzWEYTGmOnfk0iNT7qSxN2QnjpxIwI5DBW5-GAE0UrjEb470jjnG1BSAzm5T_fjqO0p5qAkmLkDEW6Wn4YCptQ&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;262&quot; data-original-width=&quot;417&quot; height=&quot;251&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgfP3ksVrGwqehWe4Y4WqhLDe9G_KJjneM5Mx1cn31Qsq6TGm9klTP31QLnWH5eFTQlEC0-XcAbIRW2SB3njZFEozBQDWhuEkEc67jtEzWEYTGmOnfk0iNT7qSxN2QnjpxIwI5DBW5-GAE0UrjEb470jjnG1BSAzm5T_fjqO0p5qAkmLkDEW6Wn4YCptQ=w400-h251&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT DISTINCT BRANCH FROM STUDENT ;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEijMsPrWY1CNhRvWVuxCPwwFv6WIGzLLLyaQoYFF_YbF-Eo3d6i31tECupXcCIu9rg2nq3vhDdY83HPGZ6m34B3xAPLeQePnyM9GG0UD_lRVFtevOCmRuhbg2-t9M_hb7LWFCmwRwVkCWC4SVlkQLriEhpIs8cca-jKMoye5CG1yb700HtBGpxElcYEEg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;283&quot; data-original-width=&quot;411&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEijMsPrWY1CNhRvWVuxCPwwFv6WIGzLLLyaQoYFF_YbF-Eo3d6i31tECupXcCIu9rg2nq3vhDdY83HPGZ6m34B3xAPLeQePnyM9GG0UD_lRVFtevOCmRuhbg2-t9M_hb7LWFCmwRwVkCWC4SVlkQLriEhpIs8cca-jKMoye5CG1yb700HtBGpxElcYEEg=w400-h275&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT DISTINCT PER FROM STUDENT ;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjoItJ6Bwsi2aSB8HiUIwV0skKnjq-q8RwX2C0CFp_emZfeGjnOkh0fzsUbsYYwzcDVxS7DAdMbYZRe4nXSQQVd6svorkTTAIRvF3gpQNG68lFL4-W1E7Bf15y-C9WRJ6zauW3JxMtgVm3wD3xELC4T7ZGqH2Yrsj8-GZ1kX0feM5XPTANG9WHQRST_Ag&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;180&quot; data-original-width=&quot;376&quot; height=&quot;153&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjoItJ6Bwsi2aSB8HiUIwV0skKnjq-q8RwX2C0CFp_emZfeGjnOkh0fzsUbsYYwzcDVxS7DAdMbYZRe4nXSQQVd6svorkTTAIRvF3gpQNG68lFL4-W1E7Bf15y-C9WRJ6zauW3JxMtgVm3wD3xELC4T7ZGqH2Yrsj8-GZ1kX0feM5XPTANG9WHQRST_Ag&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT DISTINCT BRANCH , PER FROM STUDENT;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEisdYe43YfIX1m8pACZIaQu1FyDv-iEwQIUUuiX4VaeheBhwVmJkNqtGqOIggFwN3eKfigykz7f9jsZYAN6yXxZtF-uPJ6njmzRLGnzvwRSyHJkh2siBxxXrh2uQu2wbE-tiy6Q-uCh2NOHUlIJetFXfVcisHqbm5OCtoB_6g0CI-th5BdnzAp1_YMA5Q&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;290&quot; data-original-width=&quot;624&quot; height=&quot;186&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEisdYe43YfIX1m8pACZIaQu1FyDv-iEwQIUUuiX4VaeheBhwVmJkNqtGqOIggFwN3eKfigykz7f9jsZYAN6yXxZtF-uPJ6njmzRLGnzvwRSyHJkh2siBxxXrh2uQu2wbE-tiy6Q-uCh2NOHUlIJetFXfVcisHqbm5OCtoB_6g0CI-th5BdnzAp1_YMA5Q=w400-h186&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;u&gt;OVERVIEW OF SQL STATEMENTS :&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;1.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA DEFINITION LANGUAGE&amp;nbsp; ( DDL )&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;2.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA MANIPULATION LANGUAGE&amp;nbsp; ( DML )&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;3.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;TRANSCATION CONTROL LANGUAGE&amp;nbsp; ( TCL )&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;4.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA CONTROL LANGUAGE&amp;nbsp; ( DCL )&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;5.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;DATA QUERY LANGUAGE ( DQL )&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;b&gt;&lt;u&gt;DATA QUERY LANGUAGE ( DQL _) &lt;/u&gt;&lt;/b&gt;:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&quot;DQL is used to retrieve the data from the database &quot; .&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&amp;nbsp;It had 4 statements :&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;1.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECT&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;2.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;PROJECTION&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;3.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;SELECTION&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;4.&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;JOIN&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;1.&amp;nbsp;&lt;b&gt;&lt;u&gt;SELECT :&lt;/u&gt;&lt;/b&gt; &quot;It is used to retrieve the data from the table and display it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2.&amp;nbsp;&lt;b&gt;&lt;u&gt;PROJECTION&lt;/u&gt;&lt;/b&gt; : &quot;It is a process of retrieving the data by &lt;span style=&quot;color: red;&quot;&gt;selecting only the columns &lt;/span&gt;is known as Projection &quot; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;In projection all the records / values present in a particular column are by default selected .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3.&amp;nbsp;&lt;b&gt;&lt;u&gt;SELECTION &lt;/u&gt;&lt;/b&gt;: &quot;It is a process of retrieving the data by &lt;span style=&quot;color: red;&quot;&gt;selecting both the columns &lt;/span&gt;and rows is known as Selection &quot; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4.&amp;nbsp;&lt;b&gt;&lt;u&gt;JOIN&lt;/u&gt;&lt;/b&gt; :&quot;It is a process of retrieving the data from &lt;span style=&quot;color: red;&quot;&gt;Multiple tables &lt;/span&gt;simultaneously is known as Join &quot; .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;PROJECTION&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&quot;It is a process of retrieving the data by selecting only the columns is known as Projection &quot; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;➢&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;In projection all the records / values present in a particular column are by default selected .&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;SYNTAX :&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;SELECT * / [DISTINCT] Column_Name / Expression [ALIAS] FROM Table_Name ;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;ORDER OF EXECUTION&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. FROM Clause&lt;/div&gt;&lt;div&gt;2. SELECT Clause&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example : Write a query to display names of all the students .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjJbQX_mfWv-a8UvE5avVbH6uf4XV-EHNwUvJA5ltk8uFkO_xwOByj5G3UrTI9ii99R6QcJymFJLUxx3ldRCVKlUxUSje7-MQcmTniS_UOJoj9Iw9eyyXHSr6rB-ZVwpfWDSMwgKzD22vpO65f4gFDBPKz4G-YHCowXbMk_a99LbabecOl0YFvlo-nV7w&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;484&quot; data-original-width=&quot;796&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjJbQX_mfWv-a8UvE5avVbH6uf4XV-EHNwUvJA5ltk8uFkO_xwOByj5G3UrTI9ii99R6QcJymFJLUxx3ldRCVKlUxUSje7-MQcmTniS_UOJoj9Iw9eyyXHSr6rB-ZVwpfWDSMwgKzD22vpO65f4gFDBPKz4G-YHCowXbMk_a99LbabecOl0YFvlo-nV7w&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 20pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DAY 6&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;



&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 114pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXPRESSION&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 33pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;A
statement which gives result is known as Expression &quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;Expression
is a combination Operand and Operator .&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.8pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Operand&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; : These
are the values that we pass .&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Operator&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; : These are
the Symbols which perform some Operation on the operand&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;Example:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;5*10&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgb9odDK8keJQ7mJT9mLehNBWolDCd0HYrGdgkbVDRfzYEpiQ4Iymc8ufdfjJJaoikHYgJzhMO4CHl-B5RDTDuDvrz5XMMtMcl1NNyxuxseRfO7STGw35LMZhq4XOBwBmHZeS277Ag-BvNSCLx9rXps24-x26AyLGi1zD5qfIza58YzgrplqUaOrqCPRg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;186&quot; data-original-width=&quot;311&quot; height=&quot;239&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgb9odDK8keJQ7mJT9mLehNBWolDCd0HYrGdgkbVDRfzYEpiQ4Iymc8ufdfjJJaoikHYgJzhMO4CHl-B5RDTDuDvrz5XMMtMcl1NNyxuxseRfO7STGw35LMZhq4XOBwBmHZeS277Ag-BvNSCLx9rXps24-x26AyLGi1zD5qfIza58YzgrplqUaOrqCPRg=w400-h239&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 14.25pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; text-indent: -17.05pt;&quot;&gt;1.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; text-indent: -17.05pt;&quot;&gt;WAQTD
name and salary given to the employees .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.35pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;SELECT ENAME , SAL FROM EMP ;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 144%; text-indent: -17.05pt;&quot;&gt;2.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 144%; text-indent: -17.05pt;&quot;&gt;WAQTD name and annual salary of
the employees . SELECT ENAME , SAL * 12&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 96%; text-indent: -17.05pt;&quot;&gt;3.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 96%; text-indent: -17.05pt;&quot;&gt;FROM EMP ;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiY8f8WJ-dLSZNXJ8bQRIHD-OjeWQj_QGuPF3xrVOs5DrnAEXXJxAp34sEmhCaQLPKpWFQY-uM_VyXaAWP_GYCTq_WKS4B4MdYIpO7WtsiLE0jXjJRhpA3fnBMGrQbqCQ92D7_ESd2tAj0HEh4FTqY-nFmH22TXCo7NFd9NQYYs8LCwUg3htcxlZqpgDA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;159&quot; data-original-width=&quot;233&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiY8f8WJ-dLSZNXJ8bQRIHD-OjeWQj_QGuPF3xrVOs5DrnAEXXJxAp34sEmhCaQLPKpWFQY-uM_VyXaAWP_GYCTq_WKS4B4MdYIpO7WtsiLE0jXjJRhpA3fnBMGrQbqCQ92D7_ESd2tAj0HEh4FTqY-nFmH22TXCo7NFd9NQYYs8LCwUg3htcxlZqpgDA&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 33pt; mso-line-height-alt: 0pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.05pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WAQTD all
the details of the employee along with annual salary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;Select &lt;/span&gt;&lt;span style=&quot;background: rgb(242, 220, 219); font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;eid , ename , sal&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; , sal*12 From emp ;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;Select &lt;/span&gt;&lt;span style=&quot;background: rgb(242, 220, 219); font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;emp.*&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt; , sal*12 From emp ;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 12.8pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; text-indent: -17.05pt;&quot;&gt;5.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; text-indent: -17.05pt;&quot;&gt;WAQTD
name and salary with a hike of 20% .&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.35pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;Select ename , Sal + Sal*20/100 From emp ;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;WordSection1&quot;&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 33pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 11.5pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Formulae to calculate percentage
:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 1pt; mso-line-height-rule: exactly;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line
 id=&quot;_x0000_s1026&quot; style=&#39;position:absolute;z-index:-251876864&#39; from=&quot;83.05pt,1.5pt&quot;
 to=&quot;83.05pt,20.35pt&quot; o:userdrawn=&quot;t&quot; strokecolor=&quot;#c6c6c6&quot; strokeweight=&quot;.6pt&quot;/&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 39px; margin-left: 180px; margin-top: 19px; mso-ignore: vglayout; position: absolute; width: 2px; z-index: -1896044032;&quot;&gt;&lt;img height=&quot;26&quot; src=&quot;file:///C:/Users/SAHANA~1.BHA/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif&quot; v:shapes=&quot;_x0000_s1026&quot; width=&quot;1&quot; /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line id=&quot;_x0000_s1027&quot;
 style=&#39;position:absolute;z-index:-251875840&#39; from=&quot;183.25pt,1.5pt&quot; to=&quot;183.25pt,20.35pt&quot;
 o:userdrawn=&quot;t&quot; strokecolor=&quot;#c6c6c6&quot; strokeweight=&quot;.6pt&quot;/&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 39px; margin-left: 380px; margin-top: 19px; mso-ignore: vglayout; position: absolute; width: 3px; z-index: -1896043008;&quot;&gt;&lt;img height=&quot;26&quot; src=&quot;file:///C:/Users/SAHANA~1.BHA/AppData/Local/Temp/msohtmlclip1/01/clip_image002.gif&quot; v:shapes=&quot;_x0000_s1027&quot; width=&quot;2&quot; /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line id=&quot;_x0000_s1028&quot;
 style=&#39;position:absolute;z-index:-251874816&#39; from=&quot;82.75pt,1.8pt&quot; to=&quot;234.3pt,1.8pt&quot;
 o:userdrawn=&quot;t&quot; strokecolor=&quot;#c6c6c6&quot; strokeweight=&quot;.6pt&quot;/&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 2px; margin-left: 179px; margin-top: 19px; mso-ignore: vglayout; position: absolute; width: 306px; z-index: -1896041984;&quot;&gt;&lt;img height=&quot;1&quot; src=&quot;file:///C:/Users/SAHANA~1.BHA/AppData/Local/Temp/msohtmlclip1/01/clip_image003.gif&quot; v:shapes=&quot;_x0000_s1028&quot; width=&quot;204&quot; /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line id=&quot;_x0000_s1029&quot;
 style=&#39;position:absolute;z-index:-251873792&#39; from=&quot;82.75pt,20.05pt&quot; to=&quot;234.3pt,20.05pt&quot;
 o:userdrawn=&quot;t&quot; strokecolor=&quot;#c6c6c6&quot; strokeweight=&quot;.6pt&quot;/&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 2px; margin-left: 179px; margin-top: 56px; mso-ignore: vglayout; position: absolute; width: 306px; z-index: -1896040960;&quot;&gt;&lt;img height=&quot;1&quot; src=&quot;file:///C:/Users/SAHANA~1.BHA/AppData/Local/Temp/msohtmlclip1/01/clip_image004.gif&quot; v:shapes=&quot;_x0000_s1029&quot; width=&quot;204&quot; /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line id=&quot;_x0000_s1030&quot;
 style=&#39;position:absolute;z-index:-251872768&#39; from=&quot;234.05pt,1.5pt&quot; to=&quot;234.05pt,20.35pt&quot;
 o:userdrawn=&quot;t&quot; strokecolor=&quot;#c6c6c6&quot; strokeweight=&quot;.6pt&quot;/&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=&quot;height: 39px; margin-left: 482px; margin-top: 19px; mso-ignore: vglayout; position: absolute; width: 2px; z-index: -1896039936;&quot;&gt;&lt;img height=&quot;26&quot; src=&quot;file:///C:/Users/SAHANA~1.BHA/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif&quot; v:shapes=&quot;_x0000_s1030&quot; width=&quot;1&quot; /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; mso-bidi-font-family: Arial; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 87pt; mso-line-height-alt: 0pt;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiCcHDqv3xef_yAS-eaS-01aKmnFnPHMA30gU8gXyE6X-A6toW7L155f6LoSfRqP_fI_cvxrUaqVfXIs42T_PDRH_jqloC0rg0fAkoy_Z54FHEXCqrFfhoZ-ihgWeaNkHEH41swrEDTu5RfhBnG49fteGlI4vwzor-bckw1RdQOIpP7vP_5ULx_rpv2WA&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;68&quot; data-original-width=&quot;334&quot; height=&quot;65&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiCcHDqv3xef_yAS-eaS-01aKmnFnPHMA30gU8gXyE6X-A6toW7L155f6LoSfRqP_fI_cvxrUaqVfXIs42T_PDRH_jqloC0rg0fAkoy_Z54FHEXCqrFfhoZ-ihgWeaNkHEH41swrEDTu5RfhBnG49fteGlI4vwzor-bckw1RdQOIpP7vP_5ULx_rpv2WA&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 95%; margin-bottom: 0cm; margin-left: 33.0pt; margin-right: 150.35pt; margin-top: 0cm; margin: 0cm 150.35pt 0cm 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.05pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 95%; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 95%; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WAQTD name and salary of an employee
with a deduction Of 10% .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;Select ename , sal - sal * 10 /100 From emp ;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.4pt; mso-line-height-rule: exactly;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;&lt;u&gt;ALIAS&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.35pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman, serif;&quot;&gt;&quot;It is an alternate name given to a Column or an Expression In the result table &quot; .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.35pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;○&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;We can assign alias name with or without using &#39;As&#39; keyword .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 13.35pt; mso-line-height-rule: exactly;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;○&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Alias names have to be a single string which is separated by An underscore or enclosed within double quotes&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhXBA7yWFfEPFort6mukgMxZi3kxlaFQBDESyY3a7QQR4o8zWPTOGYe7u3MKEWRSwe3pWO9ojpihySP8-HzmI6GSLv7GbNaj0o54L4oIc9J8Htnzhs8pY2-IvwEc9AsLMd0QL3TwnA1aR2WTc1fpG6HCBlX5wDv4aU0nalcGA944cKKUvqy8tymHMhHpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;92&quot; data-original-width=&quot;393&quot; height=&quot;75&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhXBA7yWFfEPFort6mukgMxZi3kxlaFQBDESyY3a7QQR4o8zWPTOGYe7u3MKEWRSwe3pWO9ojpihySP8-HzmI6GSLv7GbNaj0o54L4oIc9J8Htnzhs8pY2-IvwEc9AsLMd0QL3TwnA1aR2WTc1fpG6HCBlX5wDv4aU0nalcGA944cKKUvqy8tymHMhHpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;sup&gt;&lt;span face=&quot;&amp;quot;MS PGothic&amp;quot;,sans-serif&quot; style=&quot;font-size: 23.5pt; line-height: 75%; mso-bidi-font-family: &amp;quot;MS PGothic&amp;quot;; mso-bidi-font-size: 10.0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/sup&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 75%; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WAQTD annual salary for all the
employees .&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;Select
sal*12 From emp ;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: 75%; margin-left: 33pt; mso-list: l0 level1 lfo1; tab-stops: 33.0pt; text-indent: -17.55pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 11.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/6070778872082764065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2022/04/learn-sql-in-20-days.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/6070778872082764065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/6070778872082764065'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2022/04/learn-sql-in-20-days.html' title='Learn SQL in 20 days'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjhE1JrPXFV_N-u8tylruMV6i-903dPkFjov-2nU6c5smlYaR3f8RnT8AY9nlbXloLnx6TNZNic-wvJVlFVBC8G4Yb0OB0QQnJUjyWrE6x-jpivpJOHrfa6Y0SFkJrfyFB4Oez-8Low5_R53Tb2HNy7GJ9xBbclbEKH2Gl8OqR1bg9XE8kAZ9Hfbk9tog=s72-w466-h329-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-1617861962316712319</id><published>2022-02-14T22:39:00.003-08:00</published><updated>2022-02-14T22:39:33.118-08:00</updated><title type='text'>Advanced Python Interview questions</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #990000;&quot;&gt;&lt;u&gt;&lt;i style=&quot;background-color: #d9ead3;&quot;&gt;Advanced Python Interview questions:&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;1) What is the difference between method and constructor ?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;Method&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1) Name of method can be any name&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2) Method will be executed if we call that method&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3) Per object, method can be called any number of times.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;4) Inside method we can write business logic&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;Construtor&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1) __new__ and __init__ collectively form constructor.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2) Object initialization is controlled by an instance method called __init__ and which is also usually called as&amp;nbsp; Constructor.&amp;nbsp;Once the object is created,we can make sure that every variable in the object is properly initialized by defining an __init__ method in our class, which means init-iate&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3) Constructor will be executed automatically at the time of object creation.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;4) Per object, Constructor will be executed only once&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;5) Inside Constructor we have to declare and initialize instance variables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFEq1bGRfbTqwo66FHz2o7YzLrlsLite2qolRYuHsaRlAekQEGU4x4xghPMXePu4Dbh39pXh1sd2LmDB3Xi7nJYXwi-bTn3k_LtOEckp5CVFIPU3viAqMnzu4VkbSh6d7-GY5imA0bQq7V/s1600/111.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;606&quot; data-original-width=&quot;1007&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFEq1bGRfbTqwo66FHz2o7YzLrlsLite2qolRYuHsaRlAekQEGU4x4xghPMXePu4Dbh39pXh1sd2LmDB3Xi7nJYXwi-bTn3k_LtOEckp5CVFIPU3viAqMnzu4VkbSh6d7-GY5imA0bQq7V/s640/111.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;2) Explain different types of methods in Python?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python has three types of methods:&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;1) Instance Methods&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;2) Class Methods&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;3) Static Methods&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: purple;&quot;&gt;1)Instance Methods:&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This is called if the class has been instantiated.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Instance method has to be declared with self variable.Example - &amp;nbsp;def test(self):&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;By using self variable,method can o access instance variables.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Within the class we can call instance method by using self variable and from outside of the class we can call by using object reference.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;class&amp;nbsp;Student:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;def&amp;nbsp;__init__(self,name)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;self.name=name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;def&amp;nbsp;display(self)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(&#39;My name is &#39;,self.name)&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;2) Class Methods&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This method does not require self as argument and they use only class variable.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;They need a parameter called cls. This stands for class and like self it gets automatically passed by python&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This methods needs to be declared using @classmethod decorator.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can call this method using classname or object reference variable&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;class Bird:&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp; legs = 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;@classmethod&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;def walk(cls,name):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;print(&#39;{} walks with {} legs...&#39;.format(name,cls.lEgs))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Bird.walk(&#39;Crow&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;3) Static Methods&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;These methods are general utility methods.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;These methods do not use any instance or class variables.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This method does not require self or cls arguments at the time of declaration.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This can be declared exlicitly by using @staticmethod decorator&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can access static methods by using classname or object reference&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;class Mathfunc:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; @staticmethod&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; def add(x,y)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;print(&#39;The Sum:&#39;,x+y)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Mathfunc.add(10,20)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;3)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Can tuple be used as dictionary keys?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Yes.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Only immutable elements can be used as dictionary keys.Hence only tuples and not lists can be used as keys.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;d={}&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;t1 = (5,9)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;t2 = (30,40,9)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;d[t1] = 7&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;d[t2] = 90&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print d[t1], d[t2]&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;7 90&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;4)Which OOP’s concept is not applicable in Python?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;Python Method overloading is not possible.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If we are trying to declare multiple methods with same name and different number of arguments then Python will always consider only last method.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;5)How to handle Overloaded Method Condition&amp;nbsp; in Python?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Most of the times, if method with variable number of arguments required then we can handle with default arguments or with variable number of argument methods.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: purple;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: purple;&quot;&gt;Default Arguments:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;class Test:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def sum(self,a=None,b=None,c=None):&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if a!=None and b!= None and c!= None:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&#39;The Sum of 3 Numbers:&#39;,a+b+c)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;Variable Number of Arguments:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;class Test:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; def sum(self,*a):&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp;for x in a:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp;print(x)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;6&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;What is the difference between yield and return statement?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border: 1pt solid windowtext; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;Return&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: none; border-right: 1pt solid windowtext; border-top: 1pt solid windowtext; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Yield&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;‘return’ statement causes the function to exit and arrives back the value to caller, then function loses its local state. Thus calling it next time it starts from first statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;‘yield’ statement cause the function to return back a generator object to the caller and maintains states between func calls .Thus resumes from where it left off when we call next() method again&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It is used when function is ready to exit and return a value back to the caller&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It is used to calculate series of results 1 by 1 on the fly&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It will exit the function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It will not cause function to exit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It will terminate the loop immediately&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Does not terminate the loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Returns single value to the caller function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: none; padding: 0in 5.4pt; width: 233.75pt;&quot; valign=&quot;top&quot; width=&quot;312&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It returns generator object which can parse into list&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;7)Difference between str() and repr()&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;Difference between __str__()&amp;nbsp; and __repr__()&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;str() internally calls __str__() function and hence functionality of both is same.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;repr() internally calls __repr__() function and hence functionality of both is same.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;str()&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;str() returns a string containing a nicely printable representation object.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The main purpose of str() is for readability.It may not possible to convert result string to original object to original object&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;import datetime&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;today=datetime.datetime.now()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;s=str(today)#converting datetime object to str&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;print(s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;d=eval(s)#converting str object to datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #741b47;&quot;&gt;Output&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #741b47;&quot;&gt;2020-06-13 16:57:36.425246&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #741b47;&quot;&gt;Traceback (most recent call last):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #741b47;&quot;&gt;&amp;nbsp; File &quot;&amp;lt;string&amp;gt;&quot;, line 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #741b47;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2020-06-13 16:57:36.425246&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #741b47;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #741b47;&quot;&gt;SyntaxError: Invalid token&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;repr()&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;repr() returns a string containing a printable representation of object.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;The main goal of repr() is definite. We can convert result string to original object by using eval() function,which is possible in str() function.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;import datetime&lt;/i&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;today=datetime.datetime.now()&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;s=repr(today)#converting datetime object to str&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;print(s)&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;d=eval(s)#converting str object to datetime&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: purple;&quot;&gt;Output : datetime.datetime(2020, 6, 13, 16, 59, 18, 355503)&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;8) How to remove directory/directories in python?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python provides inbuilt module os,which contains several functions to perform directory related operations.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;import os&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;os.rmdir(&quot;mysub/mysub2&quot;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#Remove single dir&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(&quot;mysub2 directory deleted&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;os.removedirs(&quot;sub1/sub2/sub3&quot;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# Remove multiple dirs&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(&quot;All 3 directories sub1,sub2 and sub3 removed&quot;)&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;9)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Explain Garbage collection in Python?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Main objective of Garbage Collector is to destroy useless/unusable objects&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Garbage collection is the process of cleaning computer memory which is currently being put to use by a running program when that program no longer needs that memory&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;With Garbage collection, that chunk of memory is cleaned so that other programs (or same program) can use it again.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;Automatic garbage collection of cycles&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python handles its objects by keeping a count to the references each object have in the program, i.e each object stores how many times it is referenced in the program. This count is updated with the program runtime and when it reaches zero, this means it is not reachable from the program anymore. Hence, the memory for this object can be reclaimed and be freed by the interpreter.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;Manual garbage collection&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The garbage collector can be called manually in the following way:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;import gc&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;collected = gc.collect()&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;print &quot;Garbage collector: collected %d objects.&quot; % (collected)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;gc.collect() returns the number of objects it has collected and deallocated. You can print this information in the following way:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;By default Garbage collector is enabled, but we can disable based on our requirement. In this context we can use the following functions of gc module.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1) gc.isenabled()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Returns True if GC enabled&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2) gc.disable()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; To disable GC explicitly&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3) gc.enable()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;To enable GC explicitly&lt;/span&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;10) What is function decorator?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Decorators are used to wrap/cover a function within another function. It takes a function as argument and extend its functionality and return modified function with extended feature&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The main objective of decorator is to extend the functionality of existing function without modifying it&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;def wish(name):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;print(&quot;Hello&quot;,name,&quot;Good Morning&quot;)&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This function can always print same output for any name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;But we need modify this function to provide different message if name is “Seetha”,We can do this without modifying wish() function by using decorator.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;def decor(func):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;def inner(name):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;if name==&quot;Seetha&quot;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;print(&quot;Hello Seetha Good Day!!&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;else:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;func(name)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;return inner&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;@decor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;def wish(name):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &amp;nbsp; print(&quot;Hello&quot;,name,&quot;Good Morning&quot;)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;&lt;span style=&quot;color: #e69138;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;wish(&quot;Tina&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;wish(“Seetha&quot;)&lt;/span&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #6aa84f;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #6aa84f;&quot;&gt;Output: Hello Tina Good Morning&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Hello Seetha Good Day!!&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In the above program whenever we call wish() function automatically decor function will be executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;11)&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;What is lambda function ?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A function without any name. Nameless functions are called anonymous functions or lambda functions.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The main purpose of anonymous function is just for instant use or one time usage&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It is a function-like callable that is not defined with a def statement.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python lambdas are only a shorthand notation if you are too lazy to define a function.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;Syntax of lambda Function:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;lambda&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;argument_list&lt;/span&gt;&amp;nbsp;&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #e06666;&quot;&gt;expression&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;Normal Function:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can define by using def keyword.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;def squareIT(n):&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &amp;nbsp;return n*n&lt;/span&gt;&lt;br /&gt;&lt;u&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;lambda Function:&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can define by using lambda keyword&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;lambda n:n*n&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u&gt;Advantages:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;By using Lambda Functions we can write concise code so that readability of the program will be improved.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Lambda Function internally returns expression value and do not required to have return statement explicitly.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Sometimes we can pass function as argument to another function. In such cases lambda functions are best choice.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can use lambda functions very commonly with filter(),map() and reduce() functions as these functions expect function as argument.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;12) What are generator function ?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generator is a function which contains yield statement/keyword&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The difference between normal function and generator function is instead of returning one value with return statement, we can yield several values one at a time.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Based on yield statement, it allows to pause/freeze a function and return an immediate result. Generator function saves its execution context and so can be resumed later.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;When generator function is called, the code in the function body is not executed but an iterator is returned&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Return statement in the generator should stop the execution. Return can be called without arguments when it is used inside generator&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generators contains of two components:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;generator-function&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;generator-iterator&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generator function is statements defined within function definition with yield statement&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generator iterator is what the function returns.Generally these two entities are treated as one and its called a generator&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; def test_generator():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;yield 1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;...&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; test_generator&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;lt;function test_generator at 19bb&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #20124d;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt;test_generator()&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #20124d;&quot;&gt;&lt;i&gt;&amp;lt;generator object at 163b&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;13)&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;Explain how to build command-line options in Python? OR&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: blue; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;How to read the values from the terminal?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The ‘argparse’ module is a command line interface. We will use ‘argparse’ module to read the values from the&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Terminal.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Using the Python argparse library has four steps:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1)&amp;nbsp; Import the Python argparse library&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2)&amp;nbsp; Create the parser&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3)&amp;nbsp; Add optional and positional arguments to the parser&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;4)&amp;nbsp; Execute .parse_args()&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;import argparse&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;my_parser = argparse.ArgumentParser()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;my_parser.add_argument(&#39;--input&#39;, action=&#39;store&#39;, type=int, required=True)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;my_parser.add_argument(&#39;--id&#39;, action=&#39;store&#39;, type=int)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;args = my_parser.parse_args()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(args.input)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;$ python test.py --in 42&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;42&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Uses of the Python argparse Library&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1) Setting the Name of the Program&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2) Displaying a Custom Program Usage Help&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3) Displaying Text Before and After the Arguments Help&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;4) Customizing the Allowed Prefix Chars&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;5) Setting Prefix Chars for Files That Contain Arguments to Be Included&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;6) Allowing or Disallowing Abbreviations&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;7) Using Auto Help&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;14)What are pros and cons of using generators?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Pros:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;Saves Memory space -&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Iterators do not calculate the value of each item when instantiated. They compute it when its asked for. This is called lazy eval&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;uation.Lazy evaluation is beneficial when we have large data set to compute. It allows us to use data immediately while the whole data set is being calculated.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generators easy to implement as they inevitably implement next(), iter() &amp;amp; StopIteration or else had to be explicitly implemented.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Improves performance and are best suitable for reading data from large set of large files&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generators work best for web scraping and crawling&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Cons:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Generators can only be iterated over once.&amp;nbsp;If we try to iterate over it again, no value will be returned. It will behave like an empty list.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;15)&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;b style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Explain constructor overloading in Python?&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Constructor overloading is not possible in Python.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;If we define multiple constructors then the last constructor will be considered&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;class Test:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp; def __init__(self):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;print(&#39;No-Arg Constructor&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp; def __init__(self,a):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;print(&#39;One-Arg constructor&#39;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;t1=Test()&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: red;&quot;&gt;&lt;i&gt;Output&lt;/i&gt;: Error&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;16) How to fetch shell environment variables in python?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import os&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; os.environ.keys( )&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;[&#39;WINBOOTDIR&#39;, &#39;PATH&#39;, &#39;USER&#39;, &#39;PP2HOME&#39;, &#39;CMDLINE&#39;, &#39;PYTHONPATH&#39;, &#39;TEMP&#39;, &#39;PROMPT&#39;, &#39;WINDIR&#39;, &#39;TMP&#39;]&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;17)What are abstract method?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Methods with only declaration and without implementation is called abstract method.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can declare abstract method by using @abstractmethod decorator&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;@abstractmethod decorator is present in abc module. Hence it is required to import abc module, else it will throw an error.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;class Sample:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;@abstractmethod&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp;def test(self):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; pass&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;NameError: name &#39;abstractmethod&#39; is not defined&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;from abc import *&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;class Sample:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;@abstractmethod&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;def test(self):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; pass&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;18)Can we have Public, Protected and Private Attributes in Python?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Public:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In Python by default all attributes/members are Public. Hence it can be accessed anywhere within the class or from outside the class.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Ex : name = “Srishti”&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;class employee:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; def __init__(self, name, sala):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.name=name&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.sala =sala&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1=employee(&quot;Srishti&quot;,10000)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1.salary&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;10000&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1.salary=20000&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1.salary&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;20000&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Protected:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Protected attributes/members of a class can be accessed within the class and available to its child classes only . No other environment is allowed&amp;nbsp; to access it&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can specify an protected attribute in python by pre-fixing with _ (single underscore) symbol.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Syntax: _variablename = value&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Eg: _name=&#39;Vanahalli&#39;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;class employee:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; def __init__(self, name, sala):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self._name=name&amp;nbsp; # protected attribute&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self._salary=sala # protected attribute&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;But it is just convention and in in reality protected attributes does not exist. Below operation is still possible&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1=employee(&quot;Vanahalli&quot;, 10000)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1._salary&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;10000&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1._salary=20000&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1._salary&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;20000&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Private:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Private attributes/members can be accessed within the class only. It is not accessible from outside the class or child classes&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Private variables can be declared by explicitly pre-fixing double underscored __ . Any attempt to access it will result in AttributeError&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;syntax: __variablename=value&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;class employee:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; def __init__(self, name, sala):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.__name=name&amp;nbsp; # private attribute&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.__salary=sala # private attribute&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1=employee(&quot;Bill&quot;,10000)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; e1.__salary&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #e06666;&quot;&gt;AttributeError: &#39;employee&#39; object has no attribute &#39;__salary&#39;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;19)&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;How to Access Private Variables from Outside of the Class ?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python internally performs name twisting of private variables/attributes.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Every attribute with double underscore will be changed to&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;object._classname__variable&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Hence if we need to access private variables outside the class, we can do it as below. But this is not recommended.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;class Sample:&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def __init__(self):&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; self.__x=20&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;x=Sample()&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(x._Sample__x)#20&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;20) What is the difference between del and None?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;del&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;del is used to delete object and&amp;nbsp;removes the binding of the variable&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Since the variable will be removed, we cant access the variable&amp;nbsp; ( un bind operation)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;a= “test”&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;del a&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;Print(a)&amp;nbsp; -&amp;gt; NameError: name a is not defined&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;None&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In the case of None assignment, the variable will not be removed but the corresponding object is eligible for garbage collection ( re-bind operation).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Hence after assigning None value to the variable, we can still access it&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;a=&quot;test&quot;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;a=None&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(a) # None&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;21)&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Can tuples be modified?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python tuple has amazing feature: they are immutable, but their values may change.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;This may happen when a tuple holds a reference to any mutable object, such as a list.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;gt;&amp;gt;&amp;gt; t=(1,[1,2,3])&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;gt;&amp;gt;&amp;gt; t[1][2]=5&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;gt;&amp;gt;&amp;gt; t&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;(1, [1, 2, 5])&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;22)What is pass statement ?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;pass is a keyword in Python.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;To define an empty block we use pass keyword . It defined empty block with pass keyword&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It is basically an empty/null statement&amp;nbsp; and doesn’t do anything&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;if True:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;SyntaxError: unexpected EOF while parsing&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;if True: pass&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;def test():&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;SyntaxError: unexpected EOF while parsing&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;def test(): pass&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;use case of pass:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If we need parent class to contain a function with no implementation and expect child class method be responsible for code implementation, we can define parent class method using pass statement&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;23) What is super method in python?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;super() is a built-in method which is used to call the super class constructors,variables and methods from the child class.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;class Person1:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def __init__(self,name):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;self.name=name&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def display(self):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; print(&#39;Name is :&#39;,self.name)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;class Student1(Person1):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp;def __init__(self,name,rollno):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;super().__init__(name)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;self.rollno=rollno&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def display(self):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; super().display()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; print(&#39;Roll No:&#39;,self.rollno)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;t1=Student1(&#39;Srishti&#39;,101)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;t1.display()&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;Output:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;Name is: Srishti&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;Roll No: 101&lt;/span&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;24)&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;Explain about the special variable __name__?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Every python program will be added with a special variable __name__&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This variable stores information about the program is executed as an individual program or as a module.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If the program is executed as individual program then this variable value will be __main__&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If the program executed as a module from some other program then the value of this variable&amp;nbsp; will be name of module where it is defined.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Hence by using this __name__ variable we can identify whether the program executed directly or as module.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;module1.py:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;def func():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; if __name__==&#39;__main__&#39;:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;The code executed as main pgm&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&amp;nbsp;else:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(&quot;The code executed as a module “)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;func()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;test.py:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;import module1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;module1.func()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;C:\Python&amp;gt;python module1.py&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;The code executed as main pgm&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;D:\Python&amp;gt;python test.py&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The code executed as a module&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;25) What is shallow copy?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Shallow copy of any python object makes a copy of the object itself . It also creates reference to the objects contained in the list&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Shallow copy can be achieved by slice operator&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;Vowel = [‘a’,’e’,’I’,’o’,’u’]&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt;V_copy = Vowel[:]&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; Vowel is V_copy&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;0&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt;Vowel == V_copy&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can use copy(object) func of the copy module&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;import copy&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;high = copy.copy(Vowel)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; high is Vowel, high == Vowel&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;(0,1)&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;26) what is use of setdefault() method?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The setdefault() method allows to set a value in dictionary for certain key if that key does not previously have a value&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It takes key to check for as the first element and value to set at the key as second.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If key does exits, then this method method returns key’s value.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;msg = &#39; Srishti&#39;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;cnt = {}&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;for c in msg:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;cnt.setdefault(c, 0)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;cnt[c] = cnt[c] + 1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(cnt)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;b&gt;Output&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;C:/TEST_PGMS&amp;gt; python test.py&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;{&#39; &#39;: 1, &#39;S&#39;: 1, &#39;r&#39;: 1, &#39;i&#39;: 2, &#39;s&#39;: 1, &#39;h&#39;: 1, &#39;t&#39;: 1}&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The program loops over each character in the msg,counting how often each character seems.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The setdefault() method call&amp;nbsp;ensures that the key is in the cnt dictionary (with a default value of 0) so the program doesn’t toss a KeyError error when cnt[c] = cnt[c] + 1 is performed.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;27)&amp;nbsp;What are different types of function arguments in Python?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In a function func1 – x,y are called formal arguments and 1,2 are called actual arguments&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def func1 (x , y): pass&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;func1(1,2)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;There are 4 types are actual arguments are allowed in Python.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;1. Positional argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;2. Keyword argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;3. Default argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;4. Variable length argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;1. Positional arguments:&amp;nbsp;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;These are the arguments need to be passed to function in precise positional order.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The number of arguments and position of arguments must match. If we change the order the result would be changed. If number of arguments differ, it will result in Error&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Positional-only parameters are placed before a / (forward-slash). The / is used to logically distinct the positional-only parameters from the rest of the parameters&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;def pos_only_arg(arg, /):&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;print(arg)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;def sub(x,y):&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;print(x-b)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i style=&quot;color: #351c75;&quot;&gt;sub(20,40)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i style=&quot;color: #351c75;&quot;&gt;sub(40,20)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;2. Keyword arguments/ named arguments&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can pass argument values by keyword and a = sign&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Keyword is the key or parameter name and value is the value or object to be passed as that keyword&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The order of the arguments does not matter but number of arguments must be matched&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;To notify parameters as keyword-only, representing parameters must be passed by keyword argument, place an * in the arguments list just before the first keyword-only parameter.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;def kwd_only_arg(*, arg):&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(arg)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;def hello(name,msg):&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;print(&quot;Hello&quot;,name,msg)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;hello(name=&quot;Satish&quot;,msg=&quot;Good Morning&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;u&gt;Output&lt;/u&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;Hello Satish Good Morning&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;Note:&lt;/i&gt;&amp;nbsp;In a function call, we can have positional and keyword arguments together specified. Always Positional arguments must be at the beginning followed by keyword arguments if not we get Syntax error&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def test(volume, number=&#39;hello&#39;, action=&#39;sum’, type=&#39;Red&#39;): pass&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;u&gt;Valid:&lt;/u&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;test(volume=10)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # 1 keyword argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;test(volume =100, action=&#39;done&#39;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 2 keyword arguments&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;test(action=&#39;done’, volume =100)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # 2 keyword arguments&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;test(&#39;this&#39;, &#39;is&#39;, &#39;positional&#39;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # 3 positional arguments&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;i&gt;test(&#39;hundred&#39;, number=&#39;I am number&#39;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 1 positional, 1 keyword&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;u&gt;Invalid&lt;/u&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;i&gt;test(actor=&#39;Deepika&#39;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # unknown keyword argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;i&gt;test()&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # required argument missing&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;i&gt;test(volume=2.0, &#39;200&#39;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # non-keyword argument after a keyword argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #cc0000;&quot;&gt;&lt;i&gt;test(110, volume=220)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # duplicate value for the same argument&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;3. Default argument&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Default arguments are those positional arguments that take default values if no explicit values are passed to these arguments from the function call.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Let&#39;s define a function with one default argument.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def find_one(int1=2, int2=3):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; result = int1 * int2&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; return result&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;4. Variable length arguments&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;We can create functions to accept any number of arguments. These functions can accept an unknown amount of input, also as successive entries or named arguments.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;we can use the&amp;nbsp;&lt;b&gt;*args&lt;/b&gt;&amp;nbsp;or&amp;nbsp;&lt;b&gt;**kwargs&lt;/b&gt;&amp;nbsp;syntax to capture a variable number of arguments in functions. By adding * and ** (one or two asterisks) to the beginning of parameter name in the function definition we can specify an arbitrary/varibale number of arguments&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def test_varargs(*args, **kwargs):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(args)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(kwargs)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;*args: Receive multiple arguments as a tuple&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;**kwargs: Receive multiple keyword arguments as a dictionary&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u style=&quot;background-color: yellow;&quot;&gt;NOTE&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;When mingling the positional and named arguments, positional arguments should come before named arguments. Additionally, arguments of a fixed length come before arguments with variable length. So, we can order like below:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1) Known positional arguments&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2) *args&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3) Known named arguments&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;4) **kwargs&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A function with all types of arguments will be like&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def all_in_one_function (number1, number2, *args, callmeback=None, msgs=[], **kwargs):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; pass&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;28) How to detect the scope of a Variable ?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python has two built-in methods called globals() and locals().&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;They let us determine whether a variable is either part of the global namespace or local namespace.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The following example shows how to use these methods:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def test():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;global address&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; address = &quot;bangalore&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; name = &quot;Satish&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(&quot;Address in global:&quot;, &#39;Address&#39; is globals())&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(&quot;Address in local :&quot;, &#39; Address &#39; in locals())&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(&quot;name in global :&quot;, &#39;name&#39; in globals())&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(&quot;name in local&amp;nbsp; :&quot;, &#39;name&#39; in locals())&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; return&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;address = &quot;Gadag&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print (address)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;test()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The output is as below and display the scope of the two variables address and name inside the function test():&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;$ python test.py&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;Gadag&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;Address in global: True&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;Address in local : False&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;name in global : False&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;name in local&amp;nbsp; : True&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #0c343d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;29) Explain different types of variables in python?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A variable is an concept for the memory cells that contain the actual value. It is easy to remember the name of the memory cell than&amp;nbsp; to recall its physical memory address.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;All the variables are portion of the some namespace and hence have the some scope.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Unless redefined as a local variable well along&amp;nbsp; a variable defined in the main program belongs to the global namespace, that can be accessed by any function in the Python program&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python supports 2 types of variables.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1. Global Variables&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2. Local Variables&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3. Nonlocal variable(only from Python3)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;1. Global Variables&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The variables which are declared outside of function are called global variables.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;These variables can be accessed in all functions of that module.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A variable cannot be be both local and global inside any function.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python will decide that we want a local variable due to the assignment to s inside test(), so the first print statement before the definition of s throws the error message. Any variable which is altered or created inside a function is local, if it is not been declared as a global variable.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;To express Python that we want to use the global variable, we have to clearly tell this by using the keyword &quot;global&quot;, as seen in the following example:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;Example1:&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;def test():&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; global s&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(s)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; s = &quot;Only in winter Bangalore weather is Good&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(s)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;s = &quot;I am looking for python course&quot;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;test()&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(s)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;i&gt;Output:&lt;/i&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;I am looking for python course&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Only in winter Bangalore weather is Good&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Only in winter Bangalore weather is Good&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;Example2:&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;a=100 # global variable&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def func1():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;print(a)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def func2():&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print(a)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;func1()&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;func2()&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;Output&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;100&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;100&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;NOTE:We can use global keyword for the following&amp;nbsp; purposes:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1. To declare global variable inside function&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2. To make global variable available to the function so that we can perform required alterations&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;2. Local Variables:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The variables which are declared inside a function are called local variables.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Local variables are available only for the function in which we its declared i.e from outside of function we cannot access.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def fun1():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;a=10&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;print(a) # valid&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;def fun2():&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;print(a) #invalid&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;fun1()&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp;fun2()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;NameError: name &#39;a&#39; is not defined&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: purple;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;3) Nonlocal Variables&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Nonlocal variables are used in nested functions whose local scope is not defined. This means that the variable can be neither in the local nor the global scope.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;One difference to global variables is that its not possible to change variables from the module scope, i.e. variables which are not defined inside of a function by using the nonlocal statement.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We use nonlocal keyword to create nonlocal variables.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; d&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;ef out():&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x = &quot;out_func&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;def in():&lt;/i&gt;&lt;/span&gt;&amp;nbsp;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;color: #351c75; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i style=&quot;color: #351c75; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;nonlocal x&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;x = &quot;nonlocal_var&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;print(&quot;in:&quot;, x)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: orange;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;color: #351c75; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;in()&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; print(&quot;out:&quot;, x)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: orange;&quot;&gt;out()&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;color: #351c75; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Output:&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In:nonlocal_var&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;out:out_func&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;30)Why is python string immutable&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Improved performance. String is immutable hence we can allocate space for it during creation time and the storage necessities are fixed and remains unchanged.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Strings in Python are measured as “fundamental” as numbers&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;31)Difference between is and ==&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;• An is expression evaluates to True if two variables point to the same (identical) object.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;• An == expression evaluates to True if the objects referred to by the variables are equal (have the same contents).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Example1:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; a = (1,2,3)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; b=(1,2,3)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; a == b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; a is b&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;False&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; id(a), id(b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;(671301, 789098)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Example2:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; c=a&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; c&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;(&#39;1&#39;,’2’,’3’)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; c == a&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; c is a&amp;nbsp; &amp;nbsp; # because c and a refer to the same object&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #274e13;&quot;&gt;True&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;32)&amp;nbsp;Function vs Module vs Library&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1. A group of lines with a name is called a function&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2. A group of functions saved to a file&amp;nbsp; is called Module&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3. A group of Modules is called Library&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge5A8gkmCwNED1u3yqGWBFelpHCaOg21BqI9MxeddTvALCEEJ5kvZOHsNmq-wjqs3HsAViMl6LnLRyd4b_nnrO3NEnbFbPypbmovzL1l9KS3fz7mC7AWrvhY_zt_65nORIwmbfBxnHSnZL/s1600/mod.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;651&quot; data-original-width=&quot;1099&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge5A8gkmCwNED1u3yqGWBFelpHCaOg21BqI9MxeddTvALCEEJ5kvZOHsNmq-wjqs3HsAViMl6LnLRyd4b_nnrO3NEnbFbPypbmovzL1l9KS3fz7mC7AWrvhY_zt_65nORIwmbfBxnHSnZL/s640/mod.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;33)How to run Other Programs from Python Program&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i style=&quot;background-color: yellow;&quot;&gt;&lt;u&gt;Method 1&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;OS Module contains system() function to run programs and commands.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;os.system(&quot;commad string&quot;).The argument is any command which is executing from DOS.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;import os&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;os.system(&quot;dir *.py&quot;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;os.system(&quot;py test.py&quot;)&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i style=&quot;background-color: yellow;&quot;&gt;&lt;u&gt;Method 2:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;To run an external command without interacting with it, as we do with os.system() we can use the call() function from subprocess module.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;import subprocess&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;# Simple command&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;subprocess.call([&#39;ls&#39;, &#39;-1&#39;], shell=True)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The command line arguments are passed as a list of strings, which avoids the need for escaping quotes or other special characters that might be interpreted by the shell.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several older modules and functions:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;os.system&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;os.spawn*&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;34)Explain about the hashable objects in python?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;An object is hashable if it has a hash value which never alters during its lifetime (it needs a __hash__() method) and can be compared to other objects (it needs an __eq__() or __cmp__() method).&amp;nbsp; Hashable objects which compare equal must have the same hash value.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Hashable objects are&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;integers, floats, strings, tuples, and frozensets&lt;/span&gt;&lt;/b&gt;. Note that all hashable objects are also immutable objects.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Objects which are instances of user-defined classes are hashable by default, they all compare unequal, and their hash value is their id().&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The key of a dictionary should be unique. Internally, the key is transformed by a hash function and become an index to a memory where the value is stored. Suppose, if the key is changed, then it will be pointing somewhere else and we lose the original value the the old key was pointing.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Tuples are not always hashable because tuples may hold references to unhashable objects such as lists or dicts. A tuple is only hashable if all of its items are hashable&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;color: #351c75; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; t1 = (109, &#39;Z&#39;, frozenset([1, 2, 3]))&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; t2 = (1, &#39;r&#39;, {1, 2, 3})&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; hash(t1)&amp;nbsp; # OK!&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;1315572702399614049&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; hash(t2)&amp;nbsp; # NOT OK!&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;Traceback (most recent call last):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; File &quot;&amp;lt;stdin&amp;gt;&quot;, line 1, in &amp;lt;module&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;TypeError: unhashable type: &#39;set&#39;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Mutable objects are lists, dictionaries, and sets which are not hashable&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;35)&lt;/b&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;How to identify data type of any object in python?&lt;/b&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We can retrieve type of any object by passing the object to&amp;nbsp;&lt;b&gt;&lt;i&gt;type(obj)&lt;/i&gt;&lt;/b&gt;&amp;nbsp;function.&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; i=10&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; type(i)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;lt;class &#39;int&#39;&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; x = (1,2)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; type(x)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;lt;class &#39;tuple&#39;&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;36) What is Namedtuple?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Namedtuple is a tuple where each value has a pre-assigned name&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Namedtuples are immutable containers similar to regular tuples. Once we save data in top-level attribute on a namedtuple, we cannot alter them by&amp;nbsp; updating the attribute. All attributes on a&amp;nbsp;namedtuple object follow the principle -&amp;nbsp; “write once, read many”&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Each object stored in namedtuple can be retrieved through a unique,human-readable identifier and we do not have to remember integer indexes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A named tuple can be accessed like a class attribute&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Named tuples that are available from the collections module can be used to access values with object notation as shown below:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; from collections import namedtuple&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; student = namedtuple(&#39;student&#39;,&#39;name,marks&#39;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; s1 = student(&#39;satish&#39;,150)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; s1.name&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&#39;satish&#39;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; s1.marks&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;150&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; type(s1)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;lt;class &#39;__main__.student&#39;&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;38)&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Why must dictionary keys be immutable?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The hash table implementation of dictionaries uses a hash value calculated from the key value to find the key. If the key were a mutable object, its value could alter and thus its hash could also change.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;But since whoever changes the key object can’t tell that it was being used as a dictionary key, it can’t move the entry around in the dictionary. Then, when you try to look up the same object in the dictionary it won’t be found because its hash value is different. If you tried to look up the old value it wouldn’t be found either, because the value of the object found in that hash bin would be different.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If you want a dictionary indexed with a list, then convert the list to a tuple first,&amp;nbsp; the function tuple(L) creates a tuple with the same entries as the list L. Tuples are immutable and can therefore be used as dictionary keys.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;39) How do you read an entire file?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python provides numerous methods to read the entire contents of a file.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;open the file and call the read() function. This will read the entire contents of the file until an EOF marker is met and returns the contents of the file as a string.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;open the file and use the readlines() function. This reads the entire contents of the file, separating each line into individual strings, until an EOF marker is reached. Once the end of the file is found, a list of strings representing each line is returned.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In case of very large files we might want to read only a specific number of bytes at a time.Then use the read(bytes) function to read a specific number of bytes at a time, which can then be processed more easily. This will read a specific number of bytes from the file if possible and return them as a string. If the first character read is an EOF marker, null is returned.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;filePath = &quot;input.txt&quot;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;#Read entire file into a buffer&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;buffer = open(filePath, &#39;rU&#39;).read()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print buffer&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;#Read lines into a buffer&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;inList = open(filePath, &#39;rU&#39;).readlines()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print inList&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;#Read bytes&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;file = open(filePath, &#39;rU&#39;)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;bytes = file.read(5)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;if bytes:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; print bytes&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;osx-$ python t.py&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;hi&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;hello&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;line&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;ends&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;here&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;[&#39;hi\n&#39;, &#39;hello\n&#39;, &#39;line\n&#39;, &#39;ends\n&#39;, &#39;here\n&#39;]&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;hi&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;he&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;40)&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;How do you swap keys for Values in a dictionary?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;This is useful when we are using dictionary in which we often need to look up items by value. Rather than searching through the entire dictionary each time, we could create an alternate dictionary that has the values swapped.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;To swap the keys and values in a dictionary&amp;nbsp; iterate through the items in the dictionary using the iteritems method and use the values as keys assigning the original key as the value.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;myDict = {&#39;colour&#39;:&#39;red&#39;, &#39;nu&#39;:6}&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;#Swap keys for value&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;swapDict = {}&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;for key, val in myDic.iteritems():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; swapDict[val] = key&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print swapDic&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;b&gt;&lt;u&gt;OUTPUT:&lt;/u&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;i&gt;{&#39;red&#39;: &#39;colour&#39;, 6: &#39;nu&#39;}&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;41)&amp;nbsp;&lt;/span&gt;How do you list directory tree or walking the directory tree in python?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The walk(path) function will walk the directory tree, and for each directory in the tree create a three-tuple containing (1) the dirpath, (2) a list of dirnames, and (3) a list of filenames.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Every tuple contains&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Index 0 - path to the directory&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Index 1 - Lists of the subdirectories&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Index 2 - files contained in the directory&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;import os&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;tree = os.walk(&#39;/Users/qauser&#39;)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;for directory in tree:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &amp;nbsp; print(directory)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Output&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;(&#39;/tmp/test&#39;, [], [&#39;file2&#39;, &#39;fil1&#39;])&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;42) Explain zip() to process iterators in parallel ?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Zip aggregates two or more iterators with a lazy generator. The zip generator yields tuples containing the next value from each iterator. It takes iterables (can be zero or more) wrap them in a tuple and return it&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It keeps yielding tuples until a wrapped iterator is exhausted. . This method works if the iterators are of the same length&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;zip truncates its output silently if you supply it with iterators of different lengths.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;The zip_longest function from the itertools built-in module let us iterate over multiple iterators in parallel regardless of their lengths&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;Return Value from zip()&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If we do not pass any parameter, zip() returns an empty iterator&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If a single iterable is passed, zip() returns an iterator of tuples with each tuple having only one element.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;If multiple iterables are passed, zip() returns an iterator of tuples with each tuple having elements from all the iterables.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Suppose, two iterables are passed to zip(); one iterable containing four and other containing six elements. Then, the returned iterator will contain four tuples. It is because iterator stops when the shortest iterable is exhausted.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;n_list = [5, 6, 7]&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;s_list = [&#39;five&#39;, &#39;six&#39;, &#39;seven&#39;]&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;# No iterables are passed&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;result = zip()&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;# Converting itertor to list&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;r_list = list(result)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(r_list)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;# Two iterables are passed&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;result = zip(n_list, s_list)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(result)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;# Converting itertor to set&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;result_set = set(result)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print(result_set)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&amp;nbsp;[]&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;[(5, &#39;five&#39;), (6, &#39;six&#39;), (7, &#39;seven&#39;)]&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;set([(6, &#39;six&#39;), (5, &#39;five&#39;), (7, &#39;seven&#39;)])&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;43)How to pass command line arguments in python?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Python standard library called sys and we use an attribute/variable within the module called argv.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The sys.argv variable is a list containing the command-line parameters passed to the program on startup&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The first item in the sys.argv list will always be a string holding the program’s filename (&#39;test.py&#39;), and the second item will be the first command line argument&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;import sys&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;if __name__ == &quot;__main__&quot;:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;print(sys.argv)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;$ python a.py test this&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;[&#39;a.py&#39;, &#39;test&#39;, &#39;this&#39;]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;44)&amp;nbsp;How do you find the number of lines in a file?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;When parsing files using Python, it&#39;s useful to know exactly how many lines are contained in the file.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It is done by using readlines() to generate a list of lines and using the len() function to determine the number of lines in the list&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;filePath = &quot;input.txt&quot;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;cnt = len(open(filePath, &#39;rU&#39;).readlines())&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;print &quot;File %s has %d lines.&quot; % (filePath,cnt)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #134f5c;&quot;&gt;File input.txt has 4 lines.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;45)How to r&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;aise your own errors?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;We have to define and raise exceptions explicitly to indicate that error ,such type of exceptions are called User Defined Exceptions or Customized Exceptions&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;You can manually throw (raise) an exception in Python with the keyword raise. This is usually done for the purpose of error-checking.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Programmer is responsible to define these exceptions . Hence we need to raise explicitly based on the requirement by using &quot;raise&quot; keyword.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;An exception can be a string, a class or an object&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Note:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;raise keyword is best suitable for customized exceptions but not for pre defined&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;exceptions&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;if line_count &amp;lt; 1:&lt;/i&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp;raise error&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;i&gt;&lt;b&gt;46)&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;b style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;Explain generator function with an example?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A generator object is a Python iterator, so we can use it in for loop&lt;/span&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def test_gen():&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; z = 0&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while z &amp;lt; 2:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield z&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z += 1&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt;num = test_gen()&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; type(num)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;lt;class &#39;generator&#39;&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt; for n in num:&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;...&amp;nbsp; &amp;nbsp; &amp;nbsp;print(num)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;0&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;You can also step through one by one, using the built-in next() function:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;gt;&amp;gt;&amp;gt; more_num =&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;test_gen&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;()&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; next(more_num)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;0&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; next(more_num)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;1&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; next(more_num)&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Traceback (most recent call last):&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&amp;nbsp; File &quot;&amp;lt;stdin&amp;gt;&quot;, line 1, in &amp;lt;module&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;StopIteration&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;StopIteration is built-in exception type. It inevitably raised once the generator stops yielding.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It is a signal to for loop to stop looping. Instead we can pass a default value as the second argument to next():&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; next(more_num, 40)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;40&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style=&quot;color: blue; font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;&quot;&gt;47)How to create dictionaries from lists&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;k = [&#39;Toy&#39;, &#39;Game&#39;, &#39;Tiger&#39;]&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;v = [&#39;Toys&#39;, &#39;Games&#39;, &#39;Tigers&#39;]&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;#create dict&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;dc = dict(zip(k, v))&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;print(dc)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;# {&#39;Game&#39;: &#39;Games&#39;, &#39;Tiger&#39;: &#39;Tigers&#39;, &#39;Toy&#39;: &#39;Toys&#39;}&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;d = dict(enumerate(v))&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;print(d)&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;# {0: &#39;Toys&#39;, 1: &#39;Games&#39;, 2: &#39;Tigers&#39;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;48) Explain P&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;ython&#39;s documentation tool?&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Sphinx is the most widespread Python documentation tool.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It converts the reStructured Text markup language into a range of output formats, including HTML, LaTeX (for printable PDF versions), manual pages, and plain text.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;It can be&amp;nbsp; configured with commit hooks to the source repository so that rebuilding of the documentation will happen automatically&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;reStructured Text Sphinx uses reStructured Text and all Python documentation is written using it. If the content of the long_description argument to setuptools.setup() is written in reStructured Text, it will be condensed as HTML on PyPI—other formats will just be presented as text.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;Docstrings placed at the beginning of a module or at the top of an __init__.py file will also appear in help(). Sphinx’s autodoc feature can also automatically generate docu‐ mentation using appropriately formatted docstrings.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;background-color: yellow;&quot;&gt;Docstring and Block Comments&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #7f6000;&quot;&gt;&lt;i&gt;# This is programmer note&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #351c75;&quot;&gt;&lt;i&gt;def root(x):&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #674ea7;&quot;&gt;&lt;i&gt;&amp;nbsp;&quot;&quot;&quot;Return the square root&quot;&quot;&quot;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;i&gt;&amp;nbsp;…..&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1)&amp;nbsp; The leading comment block is a programmer’s note.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2)&amp;nbsp; The docstring describes the operation of the function or class and will be shown in an interactive Python session when the when the user types help(root).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;49) What is Base case in recursive function?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;A base case is a case, where the problem can be solved without further recursion. A recursion can end up in an infinite loop, if the base case is not met in the calls.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;The base case returns a value without making any subsequent recursive calls. It does this for one or more special input values for which the function can be evaluated without recursion. For factorial(), the base case is n = 1.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;50)&amp;nbsp;How to count occurrences of a character in a Python string?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;1. str.count() function&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;div&gt;A simple and efficient solution is to get the number of occurrences of a character in string is using the str.count() method. This is best solution to count a single character in a string.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; s = &quot;ABADACB&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;n = s.count(&#39;A&#39;)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; print(n)&amp;nbsp; &amp;nbsp; &amp;nbsp;# 3&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;b&gt;2. collections.Counter class&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;If you need to find frequency of several characters, calling str.count() method for each character is not recommended. Instead, you should use collections. Counter Python class. It works by storing each character as dictionary keys and their counts as dictionary values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;import collections&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; s = &quot;ABADACB&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; counter = collections.Counter(s)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; n = counter[&#39;A&#39;]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; print(n)&amp;nbsp; &amp;nbsp; &amp;nbsp;# 3&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Counter class takes linear time to pre-process the string and offers constant time count operations. However, it occupies some space to store the frequency of each character.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;3. Using Dictionary&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;div&gt;As an alternate to the collections.Counter class, you can also construct a simple dictionary. The idea is to store each character as dictionary keys and their counts as dictionary values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; s = &quot;ABADACB&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; chars = dict.fromkeys(s, 0)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; for c in s:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chars[c] += 1&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; n = chars[&#39;A&#39;]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; print(n)&amp;nbsp; &amp;nbsp; &amp;nbsp;# 3&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;4. Regular Expressions&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;You can also use regular expressions to count the number of occurrences of a character in string. However, regular expressions should be best avoided for this trivial task.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;import re&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; s = &quot;ABADACB&quot;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; n = len(re.findall(&#39;A&#39;, s))&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; print(n)&amp;nbsp; &amp;nbsp; &amp;nbsp;# 3&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;5. Lambda expressions&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;div&gt;Finally, here’s solution using lambda:&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; s = &quot;ABADACB&quot;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; n = sum(map(lambda x: 1 if x == &#39;A&#39; else 0, s))&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; print(n)&amp;nbsp; &amp;nbsp; &amp;nbsp;# 3&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;51) How do you r&lt;/b&gt;&lt;/span&gt;&lt;b&gt;eturn Multiple Values in Python&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;In Python, we can return multiple values from a function. Following are different ways&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;1)&amp;nbsp;&lt;b&gt;Using Object:&lt;/b&gt;&amp;nbsp;This is similar to C/C++ and Java, we can create a class (in C, struct) to hold multiple values and return an object of the class.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&lt;div&gt;# A Python program to return multiple&amp;nbsp; &amp;nbsp;values from a method using class&amp;nbsp;&lt;/div&gt;&lt;div&gt;class Test:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; def __init__(self):&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.str = &quot;testfortst&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.x = 20&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;# This function returns an object of Test&amp;nbsp;&lt;/div&gt;&lt;div&gt;def fun():&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; return Test()&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;# Driver code to test above method&amp;nbsp;&lt;/div&gt;&lt;div&gt;t = fun()&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;print(t.str)&amp;nbsp;&lt;/div&gt;&lt;div&gt;print(t.x)&amp;nbsp;&lt;/div&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;testfortst&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;20&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;2)&amp;nbsp;&lt;b&gt;Using Tuple&lt;/b&gt;: A Tuple is a comma separated sequence of items. It is created with or without (). Tuples are immutable. See this for details of tuple and list.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&lt;div&gt;# A Python program to return multiple&amp;nbsp; values from a method using tuple&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;# This function returns a tuple&amp;nbsp;&lt;/div&gt;&lt;div&gt;def fun():&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; str = &quot;testfortst&quot;&lt;/div&gt;&lt;/i&gt;&lt;i&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; x&amp;nbsp; &amp;nbsp;= 20&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; return str, x;&amp;nbsp; # Return tuple, we could also&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # write (str, x)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;# Driver code to test above method&amp;nbsp;&lt;/div&gt;&lt;div&gt;str, x = fun() # Assign returned tuple&amp;nbsp;&lt;/div&gt;&lt;div&gt;print(str)&amp;nbsp;&lt;/div&gt;&lt;div&gt;print(x)&amp;nbsp;&lt;/div&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;3)&lt;/span&gt;&amp;nbsp;&lt;b&gt;Using a list:&amp;nbsp;&lt;/b&gt;A list is like an array of items created using square brackets. They are different from arrays as they can contain items of different types. Lists are different from tuples as they are mutable.&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot; style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&lt;div&gt;# A Python program to return multiple values from a method using list&amp;nbsp;&lt;/div&gt;&lt;div&gt;# This function returns a list&amp;nbsp;&lt;/div&gt;&lt;div&gt;def fun():&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; str = &quot;testfortst&quot;&lt;/div&gt;&lt;/i&gt;&lt;i&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; x = 20&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; return [str, x];&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;# Driver code to test above method&amp;nbsp;&lt;/div&gt;&lt;div&gt;list = fun()&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;print(list)&amp;nbsp;&lt;/div&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;[&#39;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #990000; font-style: italic;&quot;&gt;testfortst&#39;,20]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4) Using a Dictionary:&lt;/b&gt;&amp;nbsp;A Dictionary is similar to hash or map in other languages. See this for details of dictionary.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;# A Python program to return multiple&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;i style=&quot;color: #990000;&quot;&gt;values from a method using dictionary&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;i style=&quot;color: #990000;&quot;&gt;# This function returns a dictionary&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;def fun():&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; d = dict();&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; d[&#39;str&#39;] = &quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;color: #990000; font-style: italic;&quot;&gt;testfortst&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; d[&#39;x&#39;]&amp;nbsp; &amp;nbsp;= 20&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; return d&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;# Driver code to test above method&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;d = fun()&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;print(d)&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;{&#39;x&#39;: 20, &#39;str&#39;: &#39;&quot;testfortst&quot;&#39;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5) Using Data Class (Python 3.7+):&lt;/b&gt;&amp;nbsp;In Python 3.7 and above the Data Class can be used to return a class with automatically added unique methods. The Data Class module has a decorator and functions for automatically adding generated special methods such as __init__() and __repr__() in the user-defined classes.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;from dataclasses import dataclass&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;@dataclass&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;class Book_list:&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; name: str&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; perunit_cost: float&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; quantity_available: int = 0&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; # function to calculate total cost&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; def total_cost(self) -&amp;gt; float:&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return self.perunit_cost * self.quantity_available&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;book = Book_list(&quot;Introduction to programming.&quot;, 300, 3)&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;x = book.total_cost()&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;# print the total cost&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;# of the book&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print(x)&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;# print book details&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print(book)&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;# 900&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Book_list(name=&#39;Python programming.&#39;,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; perunit_cost=200,&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quantity_available=3)&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;900&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;Book_list(name=&#39;Introduction to programming.&#39;, perunit_cost=300, quantity_available=3)&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;Book_list(name=&#39;Python programming.&#39;, perunit_cost=200, quantity_available=3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;b&gt;52)What are different&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;ays to remove duplicates from list&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Method 1 : Naive method&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In naive method, we simply traverse the list and append the first occurrence of the element in new list and ignore all the other occurrences of that particular element.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;# Python 3 code to demonstrate&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;removing duplicated from list&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp;using naive methods&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;# initializing list&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;test_list = [1, 3, 5, 6, 3, 5, 6, 1]&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The original list is : &quot; +&amp;nbsp; str(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;i&gt;# using naive method&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;to remove duplicated&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;&amp;nbsp;from list&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;res = []&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;for i in test_list:&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; if i not in res:&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; res.append(i)&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;# printing list after removal&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The list after removing duplicates : &quot; + str(res))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Method 2 : Using list comprehension&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This method has working similar to the above method, but this is just a one-liner shorthand of longer method done with the help of list comprehension.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;i&gt;# Python 3 code to demonstrate&amp;nbsp; removing duplicated from list&amp;nbsp; using list comprehension&lt;/i&gt;&lt;/span&gt;&lt;i style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;i&gt;# initializing list&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;t&lt;span style=&quot;color: #990000;&quot;&gt;est_list = [1, 3, 5, 6, 3, 5, 6, 1]&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;print (&quot;The original list is : &quot; +&amp;nbsp; str(test_list))&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;# using list comprehension to remove duplicated&amp;nbsp; from list&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;res = []&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;[res.append(x) for x in test_list if x not in res]&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;i&gt;# printing list after removal&amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;i&gt;print (&quot;The list after removing duplicates : &quot; + str(res))&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Method 3 : Using set()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This is the most popular way by which the duplicated are removed from the list. But the main and notable drawback of this approach is that the ordering of the element is lost in this particular method.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;# Python 3 code to demonstrate&amp;nbsp; removing duplicated from list&amp;nbsp; &amp;nbsp;using set()&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp;# initializing list&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;test_list = [1, 5, 3, 6, 3, 5, 6, 1]&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The original list is : &quot; +&amp;nbsp; str(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# using set() to remove duplicated&amp;nbsp; from list&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;test_list = list(set(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# printing list after removal&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# distorted ordering&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The list after removing duplicates : &quot; + str(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;Method 4 : Using list comprehension + enumerate()&lt;/div&gt;&lt;div&gt;list comprehension coupled with enumerate function can also achieve this task. It basically looks for already occurred elements and skips adding them. It preserves the list ordering.&lt;/div&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# Python 3 code to demonstrate removing duplicated from list&amp;nbsp; using list comprehension + enumerate()&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;# initializing list&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;test_list = [1, 5, 3, 6, 3, 5, 6, 1]&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The original list is : &quot; +&amp;nbsp; str(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# using list comprehension + enumerate()&amp;nbsp; to remove duplicated&amp;nbsp; from list&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;res = [i for n, i in enumerate(test_list) if i not in test_list[:n]]&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# printing list after removal&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The list after removing duplicates : &quot; + str(res))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Method 5 : Using collections.OrderedDict.fromkeys()&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This is fastest method to achieve the particular task. It first removes the duplicates and returns a dictionary which has to be converted to list. This works well in case of strings also&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# Python 3 code to demonstrate&amp;nbsp; removing duplicated from list&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# using&amp;nbsp; collections.OrderedDict.fromkeys()&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;from collections import OrderedDict&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# initializing list&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;test_list = [1, 5, 3, 6, 3, 5, 6, 1]&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The original list is : &quot; +&amp;nbsp; str(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# using collections.OrderedDict.fromkeys()&amp;nbsp; to remove duplicated&amp;nbsp; &amp;nbsp;from list&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;res = list(OrderedDict.fromkeys(test_list))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;# printing list after removal&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print (&quot;The list after removing duplicates : &quot; + str(res))&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;53)Explain Map,Reduce and filter function?&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1) Map() Function&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This function takes two arguments. The first argument in the function is the name of function and the second is the sequence or the list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Syntax: map(func, seq)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let’s take a look at map() function with example of a list.&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;a=[1,2,3,4]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;b=[2,3,4,5]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;c=map(lambda x,y:x+y, a,b)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print(list(c))&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Output: [3, 6, 9, 12]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Note:&lt;/b&gt;&amp;nbsp;If you don’t print it as a list(c) then chances are there that output will be printed as a map object. So you have to print it as a list.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Like the above example you can also evaluate some more mathematical expressions and check the list as a boolean output. For example, make a list with number divisible and non-divisible by 2. Now add that condition in the lambda function expression and then get the output as a list. You’ll find that it prints true and false output.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2) Filter() Function&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Like map() function this filter() function also takes two arguments – func and list. Let’s take an example to see how the filter() function works.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;b=[2,3,4,9]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;c=filter(lambda x:x%3==0,b)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;print(list(c))&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Output: 3,9&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;You see filter() function removes the list items that are not divisible by 3. It only displays the two items that qualifies for the same. So the list argument in the filter function only returns value that are true as per the condition.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3) Reduce() function&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Reduce function is not available in python 3.x. You can skip this section if you’re using the new version of python. In case if you wish to use this function, you can use functools.reduce() instead. Reduce() function takes two arguments and the seq/list item continually evaluates until the last item. This way the list/sequence is reduced as per the arithmetical expression condition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let’s take a look at example to see how it works.&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;a=[1,2,3,4]&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;reduce(lambda x,y:x&amp;gt;y, a)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Output: false&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;This sums up our small tutorial on python lambda functions. You can keep tab on python 3.x version updates to see changes to the lambda functions.&amp;nbsp;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: #2b00fe;&quot;&gt;54) Explain Underscore (_) in Python&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Following are different places where _ is used in Python:&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A. Single Underscore:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;In Interpreter&lt;/li&gt;&lt;li&gt;After a name&lt;/li&gt;&lt;li&gt;Before a name&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;B. Double Underscore:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;__leading_double_underscore&lt;/li&gt;&lt;li&gt;__before_after__&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #990000;&quot;&gt;A.Single Underscore&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;trebuchet ms&amp;quot; , sans-serif&quot;&gt;&lt;div&gt;In Interpreter:&lt;/div&gt;&lt;div&gt;_ returns the value of last executed expression value in Python Prompt/Interpreter&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; a &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; b &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; _ &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Traceback (most recent call last): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;File&lt;/code&gt; &lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, line &lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;1&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;in&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;module&amp;gt; &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;NameError: name &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;_&#39;&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;is&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;not&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;defined &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; a&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;+&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;b &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;20&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; _ &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;20&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; _ &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;*&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;40&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number13 index12 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; _ &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number14 index13 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;40&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number15 index14 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; _ &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;/&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number16 index15 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;20&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;For ignoring values:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Multiple time we do not want return values at that time assign those values to Underscore. It used as throwaway variable.&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;# Ignore a value of specific location/index &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;for&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;_ &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;in&lt;/code&gt; &lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;range&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;Test&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;comments&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;# Ignore a value when unpacking &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;a,b,_,_ &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;my_method(var1) &lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;After a name&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Python has their by default keywords which we can not use as the variable name. To avoid such conflict between python keyword and variable we use underscore after name&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;MyClass(): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;__init__(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;OWK&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;my_defination(var1 &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;1&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class_&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;MyClass): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(var1) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class_&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; my_defination() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;1&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;__main__.MyClass &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Before a name&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Leading Underscore before variable/function/method name indicates to programmer that It is for internal use only, that can be modified whenever class want.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here name prefix by underscore is treated as non-public. If specify from Import * all the name starts with _ will not import. Python does not specify truly private so this ones can be call directly from other modules if it is specified in __all__, We also call it weak Private&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Prefix: &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;__init__(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;.public &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;._private &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;12&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; test &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Prefix() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; test.public &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; test._private &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;12&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span face=&quot;urw-din, sans-serif&quot; style=&quot;color: #40424e;&quot;&gt;&lt;span style=&quot;font-size: 17px; letter-spacing: 0.162px;&quot;&gt;&lt;b&gt;&lt;u&gt;Python class_file.py&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;public_api(): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;public api&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;_private_api(): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;private api&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Calling file from Prompt&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;from&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class_file &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;import&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;*&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; public_api() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;public api &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; _private_api() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Traceback (most recent call last): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;File&lt;/code&gt; &lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;&amp;lt;stdin&amp;gt;&quot;&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, line &lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;1&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;in&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;lt;module&amp;gt; &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;NameError: name &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;_private_api&#39;&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;is&lt;/code&gt; &lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;not&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;defined &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;import&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class_file &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; class_file.public_api() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;public api &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number13 index12 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; class_file._private_api() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number14 index13 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;private api &lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #990000;&quot;&gt;B. Double Underscore(__)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;__leading_double_underscore&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Leading double underscore tell python interpreter to rewrite name in order to avoid conflict in subclass. Interpreter changes variable name with class extension and that feature known as the Mangling.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;testFile.py&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Myclass(): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;__init__(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;.__variable &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-size: 14.6667px; height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;Calling from Interpreter&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #009900; font-family: Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;import&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;testFile &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;testFile.Myclass() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj.__variable &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Traceback (most recent call last): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;File&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&quot;&quot;, line &lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;1&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;in&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;AttributeError: Myclass instance has no attribute &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;__variable&#39;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;nce has no attribute &lt;/code&gt;&lt;code class=&quot;string&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: blue; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&#39;Myclass&#39;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number8 index7 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj._Myclass__variable &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number9 index8 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/code&gt;&lt;/div&gt;&lt;div&gt;In Mangling python interpreter modify variable name with ___. So Multiple time It use as the Private member because another class can not access that variable directly. Main purpose for __ is to use variable/method in class only If you want to use it outside of the class you can make public api&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Myclass(): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;__init__(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;.__variable &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;func(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;.__variable)&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span face=&quot;urw-din, sans-serif&quot; style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;b&gt;Calling from Interpreter&lt;/b&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background: 0px 0px rgb(255, 255, 255); border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;import&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;testFile &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;testFile.Myclass() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj.func() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;background-color: initial; font-size: 14.6667px; letter-spacing: 0.162px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;i&gt;&lt;u&gt;__BEFORE_AFTER__&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Name with start with __ and ends with same considers special methods in Python. Python provide this methods to use it as the operator overloading depending on the user.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span face=&quot;urw-din, sans-serif&quot; style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;Python provides this convention to differentiate between the user defined function with the module’s function&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;class&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;Myclass(): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;def&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;__add__(&lt;/code&gt;&lt;code class=&quot;color1&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: grey; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;self&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;,a,b): &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;undefined spaces&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;functions&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: deeppink; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;print&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(a&lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;*&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;b) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span face=&quot;urw-din, sans-serif&quot; style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;b&gt;Calling from Interpreter&lt;/b&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span face=&quot;urw-din, sans-serif&quot; style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;import&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;testFile &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj &lt;/code&gt;&lt;code class=&quot;keyword&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; font-weight: 700; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;=&lt;/code&gt; &lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;testFile.Myclass() &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj.__add__(&lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;1&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; obj.__add__(&lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;5&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;,&lt;/code&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/code&gt;&lt;code class=&quot;plain&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;) &lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number6 index5 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #40424e; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;value&quot; style=&quot;background: 0px 0px; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 11pt; height: auto; inset: auto; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;10&lt;/code&gt;&lt;/div&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; font-size: var(--font-din); height: auto; inset: auto; letter-spacing: 0.162px; line-height: 1.2em; margin: 0px; min-height: auto; outline: 0px; overflow: auto hidden; padding: 0px 1em 0px 0px; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #40424e; font-size: 17px; letter-spacing: 0.162px; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/code&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/1617861962316712319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2022/02/advanced-python-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/1617861962316712319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/1617861962316712319'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2022/02/advanced-python-interview-questions.html' title='Advanced Python Interview questions'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFEq1bGRfbTqwo66FHz2o7YzLrlsLite2qolRYuHsaRlAekQEGU4x4xghPMXePu4Dbh39pXh1sd2LmDB3Xi7nJYXwi-bTn3k_LtOEckp5CVFIPU3viAqMnzu4VkbSh6d7-GY5imA0bQq7V/s72-c/111.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-6711962843601669262</id><published>2021-04-17T06:56:00.028-07:00</published><updated>2023-09-22T03:01:19.961-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="#freshers"/><category scheme="http://www.blogger.com/atom/ns#" term="interview"/><category scheme="http://www.blogger.com/atom/ns#" term="networking"/><title type='text'>Networking Interview Questions - for Testers</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&lt;i style=&quot;font-family: helvetica;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Basics of Network Communication&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/i&gt;&lt;br /&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;For a network to exist, we need a minimum of two connected devices.&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;font-family: helvetica; text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Network communication happens at different levels or layers (OSI model and TCP/IP model)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Each layer of network communication is responsible for passing the information on to the next layer in the stack.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Data transferred between layers is known as a Protocol Data Unit (PDU).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;These network layers of communication allow for better troubleshooting.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The rise of the internet and new technology has changed the way devices communicate with each other and thus may require new protocols.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a reverse proxy?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A proxy is a server that accepts connections from clients, which actively configured the proxy server on their machines, in their network settings.&lt;/li&gt;&lt;li&gt;When a client makes a connection to a server, the requests always pass through that proxy server.&lt;/li&gt;&lt;li&gt;Companies and organizations can set up proxy servers to filter connections, provide more security, and log traffic. Without using the proxy, clients can’t reach the outside network. Proxy servers are also useful to provide privacy and avoid network restrictions imposed by countries governments.&lt;/li&gt;&lt;li&gt;A &lt;b&gt;reverse proxy on the other hand&lt;/b&gt; is set up by the server. It’s completely transparent to clients, they don’t know this middleman exists, but it does a very useful job on the servers, filtering requests and sending them to the appropriate service that handles them&lt;/li&gt;&lt;li&gt;It’s common to use Nginx as a reverse proxy, and have services written for example in Node.js listening on internal ports, inaccessible from the outside.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Network Protocol Terminologies&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;LAN:&lt;/b&gt; LAN stands for “Local Area Network” and refers to a network that is not publicly accessible by the internet. Examples of this are home or office network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;WAN&lt;/b&gt;: WAN stands for “Wide Area Network” and generally refers to large dispersed networks and, more broadly, the internet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;ISP&lt;/b&gt;: ISP stands for “Internet Service Provider” and refers to the company responsible for providing you access to the internet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;NAT&lt;/b&gt;: Network Address Translation allows requests from outside your local network to be mapped to devices within your local network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Firewall&lt;/b&gt;: A firewall is a piece of hardware or software that enforces what type of network traffic is and is not allowed. This is generally done by establishing rules for which ports should be externally accessible.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Router:&lt;/b&gt; A router is a network device whose main goal is to transfer data back and forth between different networks. This device allows requests to be made to the internet and for information to be sent back to the devices on a local network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Switch: &lt;/b&gt;The basic function of a switch is to provide access between devices on a local network. An example is an Ethernet switch.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Network Interface:&lt;/b&gt; This component allows you to connect to a public or private network. It provides the software required to utilize networking hardware. An example of this is the Network Interface Cards (NICs).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Port:&lt;/b&gt; A port is a logically defined connection location. Ports provide a destination endpoint for communication and the transfer of data. The ports range from 0 to 65535.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Packet:&lt;/b&gt; A packet is the basic unit of data transferred over a network. A packet has a header that gives information about the packet (source, destination, etc) and a body or payload containing the actual data being sent.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What happens when you type something into the Google search box and press enter”.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;I analyze URL requests only&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Modern browsers have the capability of knowing if the thing you wrote in the address bar is an actual URL or a search term, and they will use the default search engine if it’s not a valid URL.&lt;/li&gt;&lt;li&gt;I assume you type an actual URL.&lt;/li&gt;&lt;li&gt;When you enter the URL and press enter, the browser first builds the full URL.&lt;/li&gt;&lt;li&gt;If you just entered a domain, like &lt;i&gt;testing.com&lt;/i&gt;, the browser by default will prepend &lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;HTTP://&lt;/span&gt;&lt;/i&gt; to it, defaulting to the HTTP protocol.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;DNS Lookup phase&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The browser starts the DNS lookup to get the server IP address.&lt;/li&gt;&lt;li&gt;The domain name is a handy shortcut for us humans, but the internet is organized in such a way that computers can look up the exact location of a server through its IP address, which is a set of numbers like &lt;span style=&quot;color: red;&quot;&gt;222.324.3.1&lt;/span&gt; (IPv4).&lt;/li&gt;&lt;li&gt;First, it checks the DNS local cache, to see if the domain has already been resolved recently.&lt;/li&gt;&lt;li&gt;Chrome has a handy DNS cache visualizer you can see at chrome://net-internals/#dns&lt;/li&gt;&lt;li&gt;If nothing is found there, the browser uses the DNS resolver, using the gethostbyname POSIX system call to retrieve the host information.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;gethostbyname&lt;/b&gt;&lt;/div&gt;&lt;div&gt;gethostbyname first looks in the local hosts file, which on macOS or Linux is located in &lt;span style=&quot;color: red;&quot;&gt;/etc/hosts&lt;/span&gt;, to see if the system provides the information locally.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If this does not give any information about the domain, the system makes a request to the DNS server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The address of the DNS server is stored in the system preferences.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Those are 2 popular DNS servers:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: red;&quot;&gt;8.8.8.8:&lt;/span&gt; the Google public DNS server&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: red;&quot;&gt;1.1.1.1&lt;/span&gt;: the CloudFlare DNS server&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Most people use the DNS server provided by their internet provider.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The browser performs the DNS request using the UDP protocol.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;TCP and UDP are two of the foundational protocols of computer networking. They sit at the same conceptual level, but TCP is connection-oriented, while UDP is a connectionless protocol, more lightweight, used to send messages with little overhead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;How the UDP request is performed is not in the scope of this tutorial&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The DNS server might have the domain IP in the cache. If not, it will ask the root DNS server. That’s a system (composed of 13 actual servers, distributed across the planet) that drives the entire internet.&lt;/li&gt;&lt;li&gt;The DNS server does not know the address of each and every domain name on the planet.&lt;/li&gt;&lt;li&gt;What it knows is where the top-level DNS resolvers are.&lt;/li&gt;&lt;li&gt;A top-level domain is the domain extension: .com, .it, .pizza and so on.&lt;/li&gt;&lt;li&gt;Once the root DNS server receives the request, it forwards the request to that top-level domain (TLD) DNS server.&lt;/li&gt;&lt;li&gt;Say you are looking for flaviocopes.com. The root domain DNS server returns the IP of the .com TLD server.&lt;/li&gt;&lt;li&gt;Now our DNS resolver will cache the IP of that TLD server, so it does not have to ask the root DNS server again for it.&lt;/li&gt;&lt;li&gt;The TLD DNS server will have the IP addresses of the authoritative Name Servers for the domain we are looking for.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;How? When you buy a domain, the domain registrar sends the appropriate TDL the name servers. When you update the name servers (for example, when you change the hosting provider), this information will be automatically updated by your domain registrar.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Those are the DNS servers of the hosting provider. They are usually more than 1, to serve as backup.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ns1.dreamhost.com&lt;/li&gt;&lt;li&gt;ns2.dreamhost.com&lt;/li&gt;&lt;li&gt;ns3.dreamhost.com&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;The DNS resolver starts with the first, and tries to ask the IP of the domain (with the subdomain, too) you are looking for.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That is the ultimate source of truth for the IP address.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now that we have the IP address, we can go on in our journey.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;b&gt;TCP request handshaking&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;With the server IP address available, now the browser can initiate a TCP connection to that.&lt;/li&gt;&lt;li&gt;A TCP connection requires a bit of handshaking before it can be fully initialized and you can start sending data.&lt;/li&gt;&lt;li&gt;Once the connection is established, we can send the request&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Sending the request&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The request is a plain text document structured in a precise way determined by the communication protocol.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It’s composed of 3 parts:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;the request line&lt;/li&gt;&lt;li&gt;the request header&lt;/li&gt;&lt;li&gt;the request body&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;b&gt;The request line&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The request line sets, on a single line:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;the HTTP method&lt;/li&gt;&lt;li&gt;the resource location&lt;/li&gt;&lt;li&gt;the protocol version&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Example:&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;GET / HTTP/1.1&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;b&gt;The request header&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The request header is a set of field: value pairs that set certain values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are 2 mandatory fields, one of which is Host, and the other is Connection, while all the other fields are optional:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;div&gt;Host: testing.com&lt;/div&gt;&lt;div&gt;Connection: close&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;Host &lt;/span&gt;indicates the domain name which we want to target, while &lt;span style=&quot;color: red;&quot;&gt;Connection&lt;/span&gt; is always set to &lt;span style=&quot;color: red;&quot;&gt;close&lt;/span&gt; unless the connection must be kept open.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some of the most used header fields are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Origin&lt;/li&gt;&lt;li&gt;Accept&lt;/li&gt;&lt;li&gt;Accept-Encoding&lt;/li&gt;&lt;li&gt;Cookie&lt;/li&gt;&lt;li&gt;Cache-Control&lt;/li&gt;&lt;li&gt;Dnt&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;but many more exist.&lt;/div&gt;&lt;div&gt;The header part is terminated by a blank line.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;The request body&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The request body is optional, not used in GET requests but very much used in POST requests and sometimes in other verbs too, and it can contain data in JSON format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since we’re now analyzing a GET request, the body is blank and we’ll not look more into it.&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;The response&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;Once the request is sent, the server processes it and sends back a response.&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;The response starts with the status code and the status message. If the request is successful and returns a 200, it will start with:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;200 OK&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;The request might return a different status code and message, like one of these:&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;404 Not Found&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;403 Forbidden&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;301 Moved Permanently&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;500 Internal Server Error&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;304 Not Modified&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;401 Unauthorized&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;The response then contains a list of HTTP headers and the response body (which, since we’re making the request in the browser, is going to be HTML)&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Parse the HTML&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The browser now has received the HTML and starts to parse it, and will repeat the exact same process we did for all the resources required by the page:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;CSS files&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;images&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;the favicon&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;JavaScript files&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What protocol is used by DNS name servers?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;DNS uses UDP for communication between servers. It is a better choice than TCP because of the improved speed a connectionless protocol offers. Of course, transmission reliability suffers with UDP.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain difference between ARP and RARP&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The address resolution protocol (ARP) is used to associate the 32 bit IP address with the 48 bit physical address, used by a host or a router to find the physical address of another host on its network by sending a ARP query packet that includes the IP address of the receiver. The reverse address resolution protocol (RARP) allows a host to discover its Internet address when it knows only its physical address.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain ICMP&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;ICMP is Internet Control Message Protocol, a network layer protocol of the TCP/IP suite used by hosts and gateways to send notification of datagram problems back to the sender. It uses the echo test / reply to test whether a destination is reachable and responding. It also handles both control and error messages.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the data units at different layers of the TCP / IP protocol suite&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The data unit created at the application layer is called a message, at the transport layer the data unit created is called either a segment or an user datagram, at the network layer the data unit created is called the datagram, at the data link layer the datagram is encapsulated in to a frame and finally transmitted as signals along the transmission media&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is Network Scanning?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Network scanning refers to the process of obtaining additional information and performing a more detailed reconnaissance based on the collected information in the foot printing phase.&lt;/li&gt;&lt;li&gt;In this phase, a number of different procedures are used with the objective to identify hosts, ports, and services in the target network. The whole purpose is to identify vulnerabilities in communication channels and then create an attack plan.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Types of Network Scanning&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Scanning has three types:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Port scanning - used to list open ports and services&lt;/li&gt;&lt;li&gt;Network scanning - used to list IP addresses&lt;/li&gt;&lt;li&gt;Vulnerability scanning - used to discover the presence of known vulnerabilities&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;Scanning Techniques&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Port scanning techniques are extremely useful when it comes to identifying open ports. Scanning techniques represent different categories which are used based on protocol types. They are categorized into three categories:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Scanning ICMP network services&lt;/li&gt;&lt;li&gt;Scanning TCP network services&lt;/li&gt;&lt;li&gt;Scanning UDP network services&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;Scanning ICMP network services&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1) ICMP Scanning&lt;/div&gt;&lt;div&gt;ICMP scanning is used for identifying active devices and determining whether ICMP can pass through a firewall.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Ping Sweep&lt;/div&gt;&lt;div&gt;Ping sweep is used to determine the range of IP addresses that is mapped to active devices. It allows hackers to calculate subnet masks and identify the number of present hosts in the subnet. This in turn enables them to create an inventory of active devices in the subnet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) ICMP Echo Scanning&lt;/div&gt;&lt;div&gt;ICMP Echo Scanning is used to determine which hosts are active in a target network by pinging all the machines in the network.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;Scanning TCP Network Services&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1) TCP Connect&lt;/div&gt;&lt;div&gt;TCP connect scan used for detecting open ports upon the completion of the three-way handshake. It works by establishing a full connection and then dropping it by sending a RST packet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Stealth Scan&lt;/div&gt;&lt;div&gt;Stealth scan is used for bypassing firewall and logging mechanisms. It works by resetting the TCP connection before the three-way handshake is completed, which in turn makes the connection half open.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) Inverse TCP Flag Scanning&lt;/div&gt;&lt;div&gt;Inverse TCP flag scanning works by sending TCP probe packets with or without TCP flags. Based on the response, it is possible to determine whether the port is open or closed. If there is no response, then the port is open. If the response is RST, then the port is closed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4) Xmas Scan&lt;/div&gt;&lt;div&gt;Xmas scan works by sending a TCP frame with FIN, URG, and PUSH flags set to the target device. Based on the response, it is possible to determine whether the port is open or closed. If there is no response, then the port is open. If the response is RST, then the port is closed. It is important to note that this scan works only for UNIX hosts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5) ACK Flag Probe Scanning&lt;/div&gt;&lt;div&gt;ACK flag probe scanning works by sending TCP probe packets with ACK flag set in order to determine whether the port is open or closed. This is done by analyzing the TTL and WINDOW field of the received RST packet’s header. The port is open if the TTL value is less than 64.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Similarly, the port is also considered to be open if the WINDOW value is not 0 (zero). Otherwise, the port is considered to be closed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ACK flag probe is also used to determine the filtering rules of the target network. If there is no response, then that means that a stateful firewall is present. If the response is RST, then the port is not filtered.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;Scanning UDP Network Services&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1) IDLE/IPID Header Scan&lt;/div&gt;&lt;div&gt;IDLE/IPID header scan works by sending a spoofed source address to the target to determine which services are available. In this scan, hackers use IP address of a zombie machine for sending out the packets. Based on the IPID of the packer (fragment identification number), it is possible to determine whether the port is open or closed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) UDP Scanning&lt;/div&gt;&lt;div&gt;UDP scanning uses UDP protocol to test whether the port is open or closed. In this scan there is no flag manipulation. Instead, ICMP is used to determine if the port is open or not. So, if a packet is sent to a port and the ICMP port unreachable packet is returned, then that means that the port is closed. If, however, there is no response, then the port is open.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) SSDP and List Scanning&lt;/div&gt;&lt;div&gt;SSDP, or Simple Service Discovery Protocol, service responds to queries sent over IPv4 and IPv6 broadcast addresses. Attackers use this scan to exploit UPnP vulnerabilities and carry out buffer overflow or DoS attacks. List scanning indirectly discovers hosts. This scan works by listing out IP addresses and names without pinging the hosts and with performing a reverse DNS resolution to identify the names of the hosts.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a port?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;When making network requests, you use an IP address, or a host name, and a port.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://localhost:8080 (port 8080)&lt;/div&gt;&lt;div&gt;ftp://127.0.0.1:29392 (port 29392)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is a port, exactly?&lt;/div&gt;&lt;div&gt;It’s a technique introduced to allow multiple applications to respond on the same computer, on the same protocol.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example we might have a web server running on our machine. A second web server can be started on a different port.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Say the first runs on port 80, which is the default for web servers using the HTTP protocol. The same can run on any other port except port 80. It’s common to use port 8080 or port 81, for example.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HTTPS runs on port 443 by default.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Every protocol has a different default port, but programs are not required to use that. They can use any unused port between 1 and 65535 (16 bits unsigned = 2^16). Here is a list of default port numbers for all protocols based on TCP and UDP.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Historically:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;FTP uses 21&lt;/div&gt;&lt;div&gt;Telnet uses 23&lt;/div&gt;&lt;div&gt;SMTP uses 25&lt;/div&gt;&lt;div&gt;POP3 uses 110&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;HTTP vs HTTPS&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;HTTP (Hyper Text Transfer Protocol) is the protocol that powers the web as we know it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It sits on top of TCP, which sits on top of IP.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Web pages can either use HTTP or HTTPS (Hyper Text Transfer Protocol Secure).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How are they different? And, why is now HTTP being marked as non-secure by Chrome?&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;Security&lt;/b&gt;&lt;/div&gt;&lt;div&gt;When you request an HTTP page from a server, the data goes through many different networks, each controlled by a separate company or entity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Starting from the WiFi router, which might be owned by the coffee shop or by the city public network infrastructure, every single node in the network can see the request and the response, and modify it in any way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;They might inject ads, they might inject malware, they might log any credentials you enter. A server in the middle can play as a man-in-the-middle, sending compromised information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This also applies to any internet protocol that’s not secured.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HTTPS traffic is end-to-end encrypted, and this means there is nothing in between that can read the information exchanged between you and the server at the other side of the network.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;The ports&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;By default, HTTP is served on port 80, while HTTPS is served on port 443. Those are the default ports, but a web server can choose to serve content on a different, random port, in which case you need to specify it in the address bar:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;http://flaviocopes.com&lt;/div&gt;&lt;div&gt;http://flaviocopes.com:80/javascript&lt;/div&gt;&lt;div&gt;https://flaviocopes.com:8081/javascript&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Is HTTPS slower?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;No! It’s the opposite.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a myth around page speed. People think that the TLS handshake required for HTTPS is making page speed slower, but in reality, an HTTPS page can load up way, way faster than HTTP.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why? Because of HTTP/2, the newest version of the HTTP protocol. HTTP/2 can serve requests in parallel, and requires a secure connection, so if your server uses a modern Web Server, which supports HTTP/2, then your web pages are going to have a significant speed bump when using HTTPS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HTTP/2 introduces better parallelism, multiplexing, and compression, and that is an awesome update to HTTP.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Does HTTPS affect SEO?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Yes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In particular, Google says HTTPS is going to give you an advantage in SEO terms.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, Google is going to officially mark HTTP sites as non-secure in its Chrome browser, and this is clearly an indication that if you care what Google wants, and you want to take advantage of that, you should switch to HTTPS, as soon as possible. The best possible time would have been 3 years ago, the next best time is today.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Is HTTPS difficult to implement?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Not at all. Thanks to free SSL certificates provided by Let’s Encrypt, the push for HTTPS had a huge impact and how every decent hosting provider is implementing it for free on all the accounts. Thanks to this, in 2018 HTTPS connections were more than the HTTP connections.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the past having an SSL certificate for your site was a premium option that few were willing to purchase for a regular site, that was not making money or didn’t process user data.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;u&gt;The TCP Protocol&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;TCP means Transfer Control Protocol, and it’s the basis of the Web and other applications like Email.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;TCP sits on top of the Internet Protocol (IP) and builds a base system upon which application-level protocols like HTTP, FTP, IMAP and many others.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;TCP, contrary to IP and UDP, is connection oriented.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Before transmission can happen over TCP, a connection must be established. Data is sent, in form of little packets, and when the communication ends the connection is closed.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;When data is transmitted over TCP, there’s a relatively complex workflow called handshake that must happen.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Handshake allows the end-to-end connection to happen, and this makes sure TCP can provide one of its peculiar features: reliability. Using TCP, we can always know if a packet the sender sent was received correctly by the receiver.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;If a packet gets lost, the protocol is able to handle it and the packet is re-sent.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;On the IP protocol, connections happen from computer to computer. In TCP, a connection happens form process to process, using a the concept of&lt;b&gt; ports.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The port, associated to an IP address, allows to uniquely identify a process on a computer. Like this:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;localhost:8080&lt;/span&gt;&lt;/div&gt;&lt;div&gt;or&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;google.com:1234&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Each application protocol has a default port. For example HTTP has 80, HTTPS has 443 and FTP has 21. This is why you don’t usually have to specify the port, in the browser.&lt;/li&gt;&lt;li&gt;Programs are not required to use the default, this is why especially on your local computer, you might see ports like 1313 or 8080 when you start a new application.&lt;/li&gt;&lt;li&gt;Port numbers range from 1 to 65535 (the port number is a 16 bits unsigned, which corresponds to 2^16 possible values).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;The UDP Protocol&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;UDP, User Datagram Protocol, is a transfer protocol, an alternative to TCP.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Its main difference from TCP is that it’s connectionless.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This implies that it’s faster, each packet sent is more lightweight, as it does not contain all the information needed in TCP, and it does have a lighter handshake process.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The drawback is that UDP is not reliable as TCP.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In TCP, if a packet gets lost, the protocol is able to handle it and the packet is re-sent.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In UDP, this is not built-in into the protocol, and must be handled at a higher level (built on top of it). There is no built-in check to control if a packet was received, and if it is received correctly.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Some of the most notable application protocols that rely on the UDP layer are DNS and DHCP, and more importantly is the base layer of HTTP/3, the next version of HTTP.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The UDP protocol uses ports to allow communication between processes, like with TCP.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;How traceroute (or tracert) works?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;Tracert are both command line utilities that are built into Windows&lt;/div&gt;&lt;div&gt;(traceroute and ping for Linux operating systems) computer systems.&lt;/div&gt;&lt;div&gt;Syntax : tracecert &quot;hostname&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Discover the path&lt;/b&gt;: Tracert sends an ICMP echo packet, but it takes advantage&lt;/div&gt;&lt;div&gt;of the fact that most Internet routers will send back an ICMP ‘TTL expired in&lt;/div&gt;&lt;div&gt;transit’ message if the TTL field is ever decremented to zero by a router. Using&lt;/div&gt;&lt;div&gt;this knowledge, we can discover the path taken by IP Packets.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;How tracert works&lt;/b&gt;: Tracert sends out an ICMP echo packet to the named host,&lt;/div&gt;&lt;div&gt;but with a TTL of 1; then with a TTL of 2; then with a TTL of 3 and so on.&lt;/div&gt;&lt;div&gt;Tracert will then get ‘TTL expired in transit’ message back from routers until the&lt;/div&gt;&lt;div&gt;destination host computer finally is reached and it responds with the standard&lt;/div&gt;&lt;div&gt;ICMP ‘echo reply’ packet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Round Trip Times&lt;/b&gt;: Each millisecond (ms) time in the table is the round-trip&lt;/div&gt;&lt;div&gt;time that it took (to send the ICMP packet and to get the ICMP reply packet).&lt;/div&gt;&lt;div&gt;The faster (smaller) the times the better, ms times of 0 mean that the reply was&lt;/div&gt;&lt;div&gt;faster than the computers timer of 10 milliseconds, so the time is actually&lt;/div&gt;&lt;div&gt;somewhere between 0 and 10 milliseconds&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Packet Loss&lt;/b&gt;: Packet loss kills throughput. So, having no packet loss is critical to&lt;/div&gt;&lt;div&gt;having a connection to the Internet that responds well. A slower connection with&lt;/div&gt;&lt;div&gt;zero packet loss can easily outperform a faster connection with some packet loss.&lt;/div&gt;&lt;div&gt;Also, packet loss on the last hop, the destination, is what is most important.&lt;/div&gt;&lt;div&gt;Sometimes routers in-between will not send ICMP ‘TTL expired in transit’&lt;/div&gt;&lt;div&gt;messages, causing what looks to be high packet loss at a particular hop, but all it&lt;/div&gt;&lt;div&gt;means is that the particular router is not responding to ICMP echo.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Which port number would you open on a firewall to allow access to a Windows&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;remote desktop server on the LAN network.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Windows remote desktop servers work on TCP port 3389, which should be opened on&lt;/div&gt;&lt;div&gt;the firewall for access.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a network / subnet mask? Explain how host A sends a message / packet to&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;host B when: (a) both are on same network and (b) both are on different networks.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain which layer makes the routing decision and how.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;A mask is a bit pattern used to identify the network/subnet address. The IP address consists&lt;/div&gt;&lt;div&gt;of two components: the network address and the host address.&lt;/div&gt;&lt;div&gt;The IP addresses are categorized into different classes which are used to identify the network&lt;/div&gt;&lt;div&gt;address.&lt;/div&gt;&lt;div&gt;Example: Consider IP address 152.210.011.002. This address belongs to Class B, so:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Network Mask: 11111111.11111111.00000000.00000000&lt;/li&gt;&lt;li&gt;Given Address: 10011000.11010101.00001011.00000010&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;By ANDing Network Mask and IP Address, we get the following network address:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;10011000.11010101.00000000.00000000 (152.210.0.0)&lt;/li&gt;&lt;li&gt;Host address: 00001011.00000010&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;Similarly, a network administrator can divide any network into sub-networks by using subnet&lt;/div&gt;&lt;div&gt;mask. To do this, we further divide the host address into two or more subnets.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, if the above network is divided into 18 subnets (requiring a minimum of 5 bits&lt;/div&gt;&lt;div&gt;to represent 18 subnets), the first 5 bits will be used to identify the subnet address.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Subnet Mask: 11111111.11111111.11111000.00000000 (255.255.248.0)&lt;/li&gt;&lt;li&gt;Given Address: 10011000.11010101.00001011.00000010&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;So, by ANDing the subnet mask and the given address, we get the following subnet address:&lt;/div&gt;&lt;div&gt;&lt;div&gt;10011000.11010101.00001000.00000000 (152.210.1.0)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;How Host A sends a message/packet to Host B:&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;When both are on same network: the host address bits are used to identify the host within the network.&lt;/li&gt;&lt;li&gt;Both are on different networks: the router uses the network mask to identify the network and route the packet. The host can be identified using the network host address.&lt;/li&gt;&lt;li&gt;The network layer is responsible for making routing decisions. A routing table is used to store the path information and the cost involved with that path, while a routing algorithm uses the routing table to decide the path on which to route the packets.&lt;/li&gt;&lt;li&gt;Routing is broadly classified into Static and Dynamic Routing based on whether the table is fixed or it changes based on the current network condition.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Name two reasons as to why ping response is not received from the destination&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The ping can fail if the destination is shutdown or it can also be a firewall on the&lt;/div&gt;&lt;div&gt;destination blocking the packet.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain a technique by which web access can be blocked on a network with a&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;firewall.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;An ACL can be configured which would block DNS packets originating from the&lt;/div&gt;&lt;div&gt;network. DNS is used for resolving URL into IP address. If DNS is blocked, web&lt;/div&gt;&lt;div&gt;communication would fail&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Does HTTPS use TLS/SSL protocol at the transport layer&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;HTTPS uses TCP at the transport layer. TCP port 443 is used. TLS/SSL is used by&lt;/div&gt;&lt;div&gt;HTTPS for encrypting the data exchanged.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Can two vlans be assigned with two subnets from the same major network.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Vlans are used for segregating networks. So two subnets irrespective of whether they&lt;/div&gt;&lt;div&gt;are from the same of different major networks can be used with two vlans.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain what happens, step by step, after you type a URL into a browser. Use as much&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;detail as possible.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;There’s no right, or even complete, answer for this question. This question allows you to go&lt;/div&gt;&lt;div&gt;into arbitrary amounts of detail depending on what you’re comfortable with. Here’s a start&lt;/div&gt;&lt;div&gt;though:&lt;/div&gt;&lt;div&gt;1. Browser contacts the DNS server to find the IP address of URL.&lt;/div&gt;&lt;div&gt;2. DNS returns back the IP address of the site.&lt;/div&gt;&lt;div&gt;3. Browser opens TCP connection to the web server at port 80.&lt;/div&gt;&lt;div&gt;4. Browser fetches the html code of the page requested.&lt;/div&gt;&lt;div&gt;5. Browser renders the HTML in the display window.&lt;/div&gt;&lt;div&gt;6. Browser terminates the connection when window is closed&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;One of the most interesting steps is Step 1 and 2 - “Domain Name Resolution.” The web addresses we type are nothing but an alias to an IP address in human readable form. Mapping of domain names and their associated Internet Protocol (IP) addresses is managed by the Domain Name System (DNS), which is a distributed but hierarchical entity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Each domain name server is divided into zones. A single server may only be responsible for&lt;/div&gt;&lt;div&gt;knowing the host names and IP addresses for a small subset of a zone, but DNS servers can&lt;/div&gt;&lt;div&gt;work together to map all domain names to their IP addresses. That means if one domain&lt;/div&gt;&lt;div&gt;name server is unable to find the IP addresses of a requested domain then it requests the&lt;/div&gt;&lt;div&gt;information from other domain name servers.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the differences between TCP and UDP? Explain how TCP handles reliable&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;delivery (explain ACK mechanism), flow control (explain TCP sender’s / receiver’s window) and congestion control.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;TCP (Transmission Control Protocol): TCP is a connection-oriented protocol. A connection can&lt;/div&gt;&lt;div&gt;be made from client to server, and from then on any data can be sent along that connection.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Reliable - when you send a message along a TCP socket, you know it will get there unless the connection fails completely. If it gets lost along the way, the server will re-request the lost part. This means complete integrity; data will not get corrupted.&lt;/li&gt;&lt;li&gt;Ordered - if you send two messages along a connection, one after the other, you know the first message will get there first. You don’t have to worry about data arriving in the wrong order.&lt;/li&gt;&lt;li&gt;Heavyweight - when the low level parts of the TCP “stream” arrive in the wrong order, resend requests have to be sent. All the out of sequence parts must be put back together, which requires a bit of work.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;UDP(User Datagram Protocol): UDP is connectionless protocol. With UDP you send messages&lt;/div&gt;&lt;div&gt;(packets) across the network in chunks.&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Unreliable - When you send a message, you don’t know if it’ll get there; it could get lost on the way.&lt;/li&gt;&lt;li&gt;Not ordered - If you send two messages out, you don’t know what order they’ll arrive in.&lt;/li&gt;&lt;li&gt;Lightweight - No ordering of messages, no tracking connections, etc. It’s just fire and forget! This means it’s a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Which protocol would you block on a firewall for blocking tracert&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Tracert uses ICMP at the network layer. ICMP should be denied on a firewall to block&lt;/div&gt;&lt;div&gt;tracert.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Which is the protocol used by both traceroute and ping&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;ICMP is used by both the protocols at the network layer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Name one technique which can be used for identifying existing IP addresses on a&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;LAN network.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;NMAP which is a scanning tool can be used to perform a scan on the network which&lt;/div&gt;&lt;div&gt;would display the list of available IP addresses on the network. NMAP arp ping scan&lt;/div&gt;&lt;div&gt;can be used for the same.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Can the username and password sent from a HTTP client be viewed in clear text&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;on the server.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;HTTP does not encrypt data. This would cause the username and password to be&lt;/div&gt;&lt;div&gt;viewed in clear text on the server&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Can a FTP server installed on Linux accessed by a FTP client on Windows.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;FTP is a TCP/IP protocol. TCP/IP is a vendor neutral protocol. So a FTP client on&lt;/div&gt;&lt;div&gt;Windows can access the FTP server which is installed on Linux&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How can the number of TCP connections be viewed on a Windows system.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;netstat command can be used for the purpose. The command netstat –p tcp would&lt;/div&gt;&lt;div&gt;display all tcp connections on the system&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain how access to FTP server on a network can be restricted using a firewall.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;An access control list can be configured on the firewall which would block access to&lt;/div&gt;&lt;div&gt;FTP server ports which are TCP port 20 and 21.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How do two computers connected to a switch communicate with each other.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;An IP header with the source and destination IP address as IP1 and IP2 is created. PC1 sends an ARP request frame to find the mac-address of PC2. This is required to construct the ethernet frame to encapsulate the IP packet. After the mac-address of PC2 is received, the frame is constructed and the IP packet encapsulated. The frame is sent to the switch and is&lt;/div&gt;&lt;div&gt;received on port on E0. The switch looks into the destination mac-address in the frame,&lt;/div&gt;&lt;div&gt;which is PC2’s mac-address and checks if the entry is available in it’s mac-address table. If yes, the frame is forwarded to the port on which PC2 is connected. If unavailable, the switch floods the frame to all ports. After PC2, receives the frame, it looks into the destination mac-address to check if the frame is intended for itself. Once verified, the destination IP address is verified with it’s own IP address. As it is a match, the ping packet is processed and the response to the ping packet created. The response packet would contain the source IP address as IP2 and the destination IP address as IP1, and a new frame would be created with the source and destination mac-address as PC2 and PC1 respectively.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How do computers connected to two different switches communicate.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;PC1 and PC2 are connected to respective ports on the switch. The switches are connected to each other using the E1 ports on the respective switches. When PC1 pings PC2, an ARP request packet is generated, for identifying the mac-address of PC2. The ARP request packet is a broadcast packet, which is broadcasted to all ports on SW1. The ARP packet would be sent through the E1 interface on SW1, reach the E1 interface on SW2 and eventually reach PC2. PC2 would respond with it’s mac-address to PC1. Now on SW2, the mac-address of PC1 is added to the E1 interface on SW2, as it had received the ARP request through the interface, which had the source mac-address as that of PC1. This information would be updated in the cam table of SW1. The ARP reply would be sent out through E1 on&lt;/div&gt;&lt;div&gt;SW2 and E1 on SW1 and eventually would reach PC1. The next time PC1 pings PC2, the cam table of the switch would list the mac-address of PC1 on E1 on SW1. All packets would be sent to E1 on SW1, which would then be forwarded out to SW2&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Name two techniques by which a single internet connection can be shared by&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;multiple users on a LAN.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The requirement can be achieved by the use of NAT router (Network address&lt;/div&gt;&lt;div&gt;translation) or a proxy server.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Name two protocols which are vulnerable to brute force attacks.&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Telnet and FTP are two protocols which are vulnerable to brute force attacks.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a Routing Table?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Think of a routing table like a map or a set of directions for your computer or router to figure out where to send data on the internet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Imagine your computer wants to send a message to a friend&#39;s computer. It doesn&#39;t know exactly where your friend&#39;s computer is, but it knows some general areas.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Routing Table Entries:&lt;/b&gt; The routing table is like a list of places or neighborhoods your computer knows about. Each entry in the table represents a place your computer can send data to. These places are either specific locations or general areas on the internet.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Destination Addresses&lt;/b&gt;: Your computer looks at the address of your friend&#39;s computer and compares it to the entries in the routing table. It&#39;s like checking if your friend lives in one of the neighborhoods listed.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Next-Hop Directions: &lt;/b&gt;When your computer finds a match in the routing table, it also sees directions to the next &quot;stop&quot; on the way to your friend&#39;s computer. This next stop is usually a router or gateway device that knows how to get closer to the final destination.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Choosing the Best Route: Y&lt;/b&gt;our computer picks the routing table entry that matches the most digits in your friend&#39;s address. It&#39;s like choosing the neighborhood that&#39;s the closest match. This is called &quot;longest prefix match.&quot;&lt;/li&gt;&lt;li&gt;S&lt;b&gt;ending the Data&lt;/b&gt;: Your computer sends the data to the next-hop router/gateway according to the directions in the routing table entry. The router then looks at its own routing table to figure out where to send the data next.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In a nutshell, a routing table is like a list of places your computer knows about on the internet, along with directions on how to get there. It helps your computer make smart decisions about where to send data, even if it doesn&#39;t know the exact location of the destination.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;A routing table is a data structure used in computer networking to store information about the paths that data packets should take to reach their destination. It is a crucial component of routers and network devices responsible for forwarding data traffic between different networks or subnetworks.&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;where do we keep routing table details&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Routing table details are typically stored in the memory of networking devices like routers and switches. These devices use routing tables to determine how to forward data packets from one network or host to another. Here&#39;s where you&#39;ll find routing table details:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Router&#39;s Memory&lt;/b&gt;: Routers are key networking devices responsible for forwarding data between different networks. Each router maintains its own routing table, which is stored in its memory (RAM). This routing table contains information about routes to various destinations, next-hop routers, and associated metrics.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Switches&lt;/b&gt;: Layer 3 switches, which can perform routing functions in addition to traditional switching, also have routing tables. These routing tables are stored in the device&#39;s memory and are used to make decisions about how to route traffic between different subnets or VLANs.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Operating Systems:&lt;/b&gt; In the case of host devices (computers, servers, etc.), routing tables are managed by the operating system. When you run a command like &quot;route print&quot; (Windows) or &quot;netstat -r&quot; (Unix/Linux) in a command prompt or terminal, you can view the routing table for that specific host. These routing tables help the host determine where to send network traffic.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Networking Equipment Configuration:&lt;/b&gt; Network administrators configure and manage routing tables on routers and switches. They use various protocols and commands to add, modify, or delete routing table entries. These configurations are often stored in the device&#39;s configuration files.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Dynamic Routing Protocols: &lt;/b&gt;In many cases, routing tables are not static but dynamically updated based on the network&#39;s topology and changes. Dynamic routing protocols (e.g., OSPF, BGP, RIP) enable routers to exchange routing information with their neighboring routers, allowing the tables to adapt to network changes automatically.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Routing Table Cache&lt;/b&gt;: Routing devices often maintain a routing table cache to speed up the routing process. This cache stores recently used routing information, allowing routers to make routing decisions more quickly. The cache is kept in memory and is updated as needed.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;However, in most cases, routing table information is stored in the device&#39;s memory and can be accessed and manipulated through the device&#39;s configuration interface or command-line interface.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div&gt;&lt;b&gt;C:\Users\user1&amp;gt;route print&lt;/b&gt;&lt;/div&gt;&lt;div&gt;===========================================================================&lt;/div&gt;&lt;div&gt;Interface List&lt;/div&gt;&lt;div&gt;&amp;nbsp;16...c8 4b d6 43 62 a1 ......Intel(R) Ethernet Connection (16) I219-LM&lt;/div&gt;&lt;div&gt;&amp;nbsp; 8...3c 21 9c e3 8d 1c ......Microsoft Wi-Fi Direct Virtual Adapter&lt;/div&gt;&lt;div&gt;&amp;nbsp;18...3e 21 9c e3 8d 1b ......Microsoft Wi-Fi Direct Virtual Adapter #2&lt;/div&gt;&lt;div&gt;&amp;nbsp; 4...3c 21 9c e3 8d 1b ......Intel(R) Wi-Fi 6E AX211 160MHz&lt;/div&gt;&lt;div&gt;&amp;nbsp;19...3c 21 9c e3 8d 1f ......Bluetooth Device (Personal Area Network)&lt;/div&gt;&lt;div&gt;&amp;nbsp; 1...........................Software Loopback Interface 1&lt;/div&gt;&lt;div&gt;===========================================================================&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;IPv4 Route Table&lt;/div&gt;&lt;div&gt;===========================================================================&lt;/div&gt;&lt;div&gt;Active Routes:&lt;/div&gt;&lt;div&gt;Network Destination&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Netmask&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Gateway&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Interface&amp;nbsp; Metric&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.0.1&amp;nbsp; &amp;nbsp; 192.168.0.104&amp;nbsp; &amp;nbsp; &amp;nbsp;50&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 127.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 255.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;127.0.0.1&amp;nbsp; &amp;nbsp; 331&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 127.0.0.1&amp;nbsp; 255.255.255.255&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;127.0.0.1&amp;nbsp; &amp;nbsp; 331&lt;/div&gt;&lt;div&gt;&amp;nbsp; 127.255.255.255&amp;nbsp; 255.255.255.255&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;127.0.0.1&amp;nbsp; &amp;nbsp; 331&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 192.168.0.0&amp;nbsp; &amp;nbsp; 255.255.255.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.0.104&amp;nbsp; &amp;nbsp; 306&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; 192.168.0.104&amp;nbsp; 255.255.255.255&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.0.104&amp;nbsp; &amp;nbsp; 306&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; 192.168.0.255&amp;nbsp; 255.255.255.255&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.0.104&amp;nbsp; &amp;nbsp; 306&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 224.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 240.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;127.0.0.1&amp;nbsp; &amp;nbsp; 331&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 224.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 240.0.0.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.0.104&amp;nbsp; &amp;nbsp; 306&lt;/div&gt;&lt;div&gt;&amp;nbsp; 255.255.255.255&amp;nbsp; 255.255.255.255&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;127.0.0.1&amp;nbsp; &amp;nbsp; 331&lt;/div&gt;&lt;div&gt;&amp;nbsp; 255.255.255.255&amp;nbsp; 255.255.255.255&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&amp;nbsp; &amp;nbsp; &amp;nbsp;192.168.0.104&amp;nbsp; &amp;nbsp; 306&lt;/div&gt;&lt;div&gt;===========================================================================&lt;/div&gt;&lt;div&gt;Persistent Routes:&lt;/div&gt;&lt;div&gt;&amp;nbsp; None&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;IPv6 Route Table&lt;/div&gt;&lt;div&gt;===========================================================================&lt;/div&gt;&lt;div&gt;Active Routes:&lt;/div&gt;&lt;div&gt;&amp;nbsp;If Metric Network Destination&amp;nbsp; &amp;nbsp; &amp;nbsp; Gateway&lt;/div&gt;&lt;div&gt;&amp;nbsp; 1&amp;nbsp; &amp;nbsp; 331 ::1/128&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; On-link&lt;/div&gt;&lt;div&gt;&amp;nbsp; 4&amp;nbsp; &amp;nbsp; 306 fe80::7b01:698c:f8c2:a4a5/128&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; On-link&lt;/div&gt;&lt;div&gt;&amp;nbsp; 1&amp;nbsp; &amp;nbsp; 331 ff00::/8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&lt;/div&gt;&lt;div&gt;&amp;nbsp; 4&amp;nbsp; &amp;nbsp; 306 ff00::/8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;On-link&lt;/div&gt;&lt;div&gt;===========================================================================&lt;/div&gt;&lt;div&gt;Persistent Routes:&lt;/div&gt;&lt;div&gt;&amp;nbsp; None&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C:\Users\user1&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/6711962843601669262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2021/04/networking-interview-questions-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/6711962843601669262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/6711962843601669262'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2021/04/networking-interview-questions-for.html' title='Networking Interview Questions - for Testers'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-2931586210667557817</id><published>2021-04-15T06:15:00.020-07:00</published><updated>2021-04-17T09:55:20.441-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>SQL for testers</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;color: #660000; font-family: helvetica; font-size: small;&quot;&gt;&lt;u&gt;SQL Queries Set 1&lt;/u&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;post-header&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444;&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-575877003731759285&quot; style=&quot;background-color: white; box-sizing: border-box; margin: 0px 0px 30px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;1.Display the dept information from department table&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from dept;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; color: #444444;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;2.Display the details of all employees&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from emp;&lt;/span&gt;&lt;/span&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;3.Display the name and job for all employees&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename,job from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;4.Display name and salary for all employees&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename,sal from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;5.Display employee number and total salary for each employee&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select empno,sal+comm from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;6.Display employee name and annual salary for all employees&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select empno,ename,12*sal+nvl(comm,0) annualsal from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;7.Display the names of all employees who are working in department number 10&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where deptno = 10;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;8.Display the names of all employees working as clerks and drawing a salary more than 3000&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp wher job = ‘CLERK’ and sal &amp;gt; 3000;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;9.Display employee number and names for employees who earn commission&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select empno,ename from emp where comm is not null and comm &amp;gt; 0;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;10.Display names of employees who do not earn any commission&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select empno,ename from emp where comm is null and comm = 0;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;11.Display the names of employees who are working as clerk , salesman or analyst and drawing a salary more than 3000&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where (job=’CLERK’ or job=’SALESMAN’ or job=’ANALYST’) and sal&amp;gt;3000;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;12.Display the names of employees who are working in the company for the past 5 years&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where sysdate – hiredate &amp;gt; 5*365;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;13.Display the list of employees who have joined the company before 30 th june 90 or after 31 st dec 90&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from emp where hiredate between ’30-jun-1990′ and ’31-dec-1990′;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;14.Display current date&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select sysdate from dual;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;15.Display the list of users in your database (using log table)&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from dba_users;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;16.Display the names of all tables from the current user&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from tab;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;17.Display the name of the current user&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;show user;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;18.Display the names of employees working in department number 10 or 20 or 40 or employees working as clerks , salesman or analyst&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where deptno in (10,20,40) or job in (‘CLERK’,’SALESMAN’,’ANALYST’);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;19.Display the names of employees whose name starts with alphabet S&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where ename like ‘S%’;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;20.Display employee name from employees whose name ends with alphabet S&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where ename like ‘%S’;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;21.Display the names of employees whose names have sencond alphabet A in their names&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where ename like ‘_S%’;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;22.Display the names of employees whose name is exactly five characters in length&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where length(ename)=5;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;or&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select ename from emp where ename like ‘_____’;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;23.Display the names of employees who are not working as managers&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from emp minus (select * from emp where empno in (select mgr from emp));&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;or&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from emp where empno not in (select mgr from emp where mgr is not null);&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;or&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select * from emp e where empno not in (select mgr from emp where e.empno=mgr);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;b&gt;24.Display the names of employees who are not working as SALESMAN or CLERK or&lt;/b&gt; ANALYST&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select job from emp where job not in (‘CLERK’,’ANALYST’,’SALESMAN’);&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;25.Display all rows from emp table. The system should wait after every screen full of information&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;set pause on;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;26.Display the total number of employees working in the company&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select count(*) from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;27.Display the total salary and total commission to all employees&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select sum(sal), sum(nvl(comm,0)) from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;28.Display the maximum salary from emp table&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;select max(sal) from emp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;29.Display the minimum salary from emp table&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select min(sal) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;30.Display the average salary from emp table&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select avg(sal) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;31.Display the maximum salary being paid to CLERK&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select max(sal) from emp where job=’CLERK’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;32.Display the maximum salary being paid in dept no 20&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select max(sal) from emp where deptno=20;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;33.Display the minimum salary being paid to any SALESMAN&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select min(sal) from emp where job=’SALESMAN’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;34.Display the average salary drawn by managers&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select avg(sal) from emp where job=’MANAGER’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;35.Display the total salary drawn by analyst working in dept no 40&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select sum(sal)+sum(nvl(comm,0)) from emp where deptno=40;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;36.Display the names of employees in order of salary i.e. the name of the employee earning lowest salary shoud appear first&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select ename from emp order by sal;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;37.Display the names of employees in descending order of salary&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select ename from emp order by sal desc;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;38.Display the details from emp table in order of emp name&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select ename from emp order by ename;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;39.Display empnno,ename,deptno and sal. Sort the output first based on name and within name by deptno and witdhin deptno by sal;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;select * from emp order by ename,deptno,sal;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;40) Display the name of employees along with their annual salary(sal*12).&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;the name of the employee earning highest annual salary should appear first?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans:select ename,sal,sal*12 “Annual Salary” from emp order by “Annual Salary” desc;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;41) Display name,salary,Hra,pf,da,TotalSalary for each employee.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;The out put should be in the order of total salary ,hra 15% of salary ,DA 10% of salary .pf 5% salary Total Salary&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;will be (salary+hra+da)-pf?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,sal SA,sal*0.15 HRA,sal*0.10 DA,sal*5/100 PF, sal+(sal*0.15)+(sal*0.10)-(sal*.05) TOTALSALARY&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;from emp ORDER BY TOTALSALARY DESC;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;42) Display Department numbers and total number of employees working in each Department?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select deptno,count(*) from tvsemp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;43) Display the various jobs and total number of employees working in each job group?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job,count(*) from tvsemp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;44)Display department numbers and Total Salary for each Department?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select deptno,sum(sal) from tvsemp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;45)Display department numbers and Maximum Salary from each Department?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select deptno,max(Sal) from tvsemp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;46)Display various jobs and Total Salary for each job?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job,sum(sal) from tvsemp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;47)Display each job along with min of salary being paid in each job group?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job ,min(sal) from tvsemp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;48) Display the department Number with more than three employees in each department?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select deptno ,count(*) from tvsemp group by deptno having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;49) Display various jobs along with total salary for each of the job where total salary is greater than 40000?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job,sum(sal) from tvsemp group by job having sum(SAl)&amp;gt;40000;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;50) Display the various jobs along with total number of employees in each&amp;nbsp;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;job.The&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;output should contain only those jobs with more than three employees?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job,count(*) from tvsemp group by job having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;51) Display the name of employees who earn Highest Salary?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename, sal from tvsemp where sal&amp;gt;=(select max(sal) from tvsemp );&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;52) Display the employee Number and name for employee working as clerk and earning highest salary among the clerks?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,empno from tvsemp where sal=(select max(sal) from tvsemp where job=’CLERK’) and job=’CLERK’ ;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;53) Display the names of salesman who earns a salary more than the Highest Salary of the clerk?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,sal from tvsemp where sal&amp;gt;(select max(sal) from tvsemp where job=’CLERK’) AND job=’SALESMAN’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;54) Display the names of clerks who earn a salary more than the lowest Salary of any salesman?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,sal from tvsemp where sal&amp;gt;(select min(sal) from tvsemp where job=’SALESMAN’) and job=’CLERK’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;55) Display the names of employees who earn a salary more than that of jones or that of salary greater than that of scott?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,sal from tvsemp where sal&amp;gt;all(select sal from tvsemp where ename=’JONES’ OR ename=’SCOTT’);&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;56) Display the names of employees who earn Highest salary in their respective departments?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,sal,deptno from tvsemp where sal in (select max(sal) from tvsemp group by deptno);&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;57) Display the names of employees who earn Highest salaries in their respective job Groups?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,job from tvsemp where sal in (select max(sal) from tvsemp group by job);&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;58) Display employee names who are working in Accounting department?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname=’ACCOUNTING’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;59) Display the employee names who are Working in Chicago?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,d.loc from emp e,tvsdept d where e.deptno=d.deptno and d.loc=’CHICAGO’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;60) Display the job groups having Total Salary greater than the maximum salary for Managers?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job ,sum(sal) from tvsemp group by job having sum(sal) &amp;gt;(select max(sal) from tvsemp where job=’MANAGER’);&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;61) Display the names of employees from department number 10 with salary greater than that of ANY employee working in other departments?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,deptno from tvsemp where sal&amp;gt;any(select min(sal) from tvsemp where deptno!=10 group by deptno) and deptno=10 ;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;62) Display the names of employees from department number 10 with salary greater than that of ALL employee working in other departments?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,deptno from tvsemp where sal&amp;gt;all(select max(sal) from tvsemp where deptno!=10 group by deptno) and deptno=10 ;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;63) Display the names of mployees in Upper Case?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select upper(ename) from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;64) Display the names of employees in Lower Case?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select Lower(ename) from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;65) Display the names of employees in Proper case?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select InitCap(ename)from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:66) Find the length of your name using Appropriate Function?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select lentgh(‘RAMA’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;67) Display the length of all the employee names?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select length(ename) from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;68) Display the name of employee Concatinate with Employee Number?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename||’ ‘||empno from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;69) Use appropriate function and extract 3 characters starting from 2 characters from the following string ‘Oracle’ i.e., the out put should be ac?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select substr(‘Oracle’,3,2) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;70) Find the first occurance of character a from the following string Computer Maintenance Corporation?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select lstr(‘Computer Maintenance Corporation’,’a’ ) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;71) Replace every occurance of alphabet A with B in the string .Alliens (Use Translate function)?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select translate(‘Alliens’,’A’,’B’) from Dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;72) Display the information from the employee table . where ever job Manager is found it should be displayed as Boss?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename ,replace(job,’MANAGER’,’BOSS’) from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;73) Display empno,ename,deptno from tvsemp table. Instead of display department numbers&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;display the related department name(Use decode function)?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select empno,ename,deptno,Decode(deptno,10,’ACCOUNTING’&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;,20,’RESEARCH’,30,’SALES’,’OPERATIONS’)DName from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;74) Display your Age in Days?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select sysdate-to_date(’30-jul-1977′) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;75) Display your Age in Months?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select months_between(sysdate,to_date(’30-jul-1977′)) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;76) Display current date as 15th August Friday Nineteen Nienty Seven?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select To_char(sysdate,’ddth Month Day year’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;77) Display the following output for each row from tvsemp table?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: Q:78&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;78) Scott has joined the company on 13th August ninteen ninety?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select empno,ename,to_char(Hiredate,’Day ddth Month year’) from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;79) Find the nearest Saturday after Current date?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select next_day(sysdate,’Saturday’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;80) Display the current time?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select To_Char(sysdate,’HH:MI:SS’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;81) Display the date three months before the Current date?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select Add_months(sysdate,-3) from dual&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;82) Display the common jobs from department number 10 and 20?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job from tvsemp where job in (select job from tvsemp where deptno=20) and deptno=10;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;83) Display the jobs found in department 10 and 20 Eliminate duplicate jobs?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select Distinct job from tvsemp where deptno in(10,20);&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;84) Display the jobs which are unique to department 10?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select job from tvsemp where deptno=10;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;85) Display the details of those employees who do not have any person working under him?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select empno,ename,job from tvsemp where empno not in (select mgr from tvsemp where mgr is not null );&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;86) Display the details of those employees who are in sales department and grade is 3?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,d.dname,grade from emp e,dept d ,salgrade where e.deptno=d.deptno and dname=’SALES’ and grade=3;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;87) Display thoes who are not managers?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename from tvsemp where job!=’MANAGER’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;88) Display those employees whose name contains not less than 4 characters?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename from tvsemp where length(ename)&amp;gt;=4&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;89) Display those department whose name start with”S” while location name ends with “K”?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,d.loc from tvsemp e ,tvsdept d where d.loc like(‘%K’) and ename like(‘S%’)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;90) Display those employees whose manager name is Jones?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename Superior,e1.ename Subordinate from tvsemp e,e1 where e.empno=e1.mgr and e.ename=’JONES’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;91) Display those employees whose salary is more than 3000 after giving 20% increment?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,sal,(sal+(sal*0.20)) from tvsemp where (sal+(sal*0.20))&amp;gt;3000;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;92) Display all employees with their department names?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,d.dname from tvsemp e, tvsdept d where e.deptno=d.deptno&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;93) Display ename who are working in sales department?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname=’SALES’;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;94) Display employee name,dept name,salary,and commission for those sal in between 2000&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;to 5000 while location is Chicago?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: Select e.ename,d.dname,e.sal,e.comm from tvsemp e,dept d where e.deptno=d.deptno and sal between 2000 and 5000;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;95) Display those employees whose salary is greater than his managers salary?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: Select e.ename,e.sal,e1.ename,e1.sal from tvsemp e,e1 where e.mgr=e1.empno and e.sal&amp;gt;e1.sal;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;96) Display those employees who are working in the same dept where his manager is work?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,e.deptno,e1.ename,e1.deptno from tvsemp e,e1 where e.mgr=e1.empno and e.deptno=e1.deptno;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;97) Display those employees who are not working under any Manager?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename from tvsemp where mgr is null;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;98) Display the grade and employees name for the deptno 10 or 30 but grade is not 4 while&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;joined the company before 31-DEC-82?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select ename,grade,deptno,sal from tvsemp ,salgrade where ( grade,sal) in&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;( select grade,sal from salgrade,tvsemp where sal between losal and hisal)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;and grade!=4 and deptno in (10,30) and hiredate&amp;lt;’31-Dec-82&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;99) Update the salary of each employee by 10% increment who are not eligible for commission?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: update tvsemp set sal= (sal+(sal*0.10)) where comm is null;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;100) Delete those employees who joined the company before 31-Dec-82 while their department Location is New York or Chicago?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans: select e.ename,e.hiredate,d.loc from tvsemp e,tvsdept d where&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;e.deptno=d.deptno and hiredate&amp;lt;’31-Dec-82′ and d.loc in(‘NEW YORK’,’CHICAGO’);&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Sql Queries2&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;101) Display employee name ,job,deptname,loc for all who are working as manager?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,e.job,d.dname,d.loc from tvsemp e,tvsdept d where e.deptno=d.deptno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.empno in (select mgr from tvsemp where mgr is not null);102) Display those employees whose manager name is jones and also display their manager&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;name?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename sub,e1.ename from tvsemp e,e1 where e.mgr=e1.empno and e1.ename=’JONES’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;103) Display name and salary of ford if his salary is equal to hisal of his grade?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,grade,hisal,sal from emp,salgrade where ename=’FORD’ and sal=hisal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select grade,sal,hisal from tvsemp,salgrade where ename=’FORD’ and sal between losal and hisal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select ename,sal,hisal,grade from tvsemp,salgrade where ename=’FORD’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and (grade,sal) in (select grade,hisal from salgrade,tvsemp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;sal between losal and hisal);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;104) Display employee name ,job,deptname,his manager name ,his grade and make an&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;under department wise?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename sub,e1.ename sup,e.job,d.dname ,grade from tvsemp e,e1,salgrade,tvsdept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno group by d.deptno,e.ename,e1.ename,e.job,d.dname,grade;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select e.ename sub,e1.ename sup,e.job,d.dname ,grade from tvsemp e,e1,salgrade,tvsdept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;105) List out all the employee names ,job,salary,grade and deptname for every one in a company except ‘CLERK’ . Sort on salary display the highest salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename ,e.job,e.sal,d.dname ,grade from tvsemp e,salgrade,tvsdept d where (e.deptno=d.deptno and e.sal between losal and hisal ) order by e.sal desc&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;106) Display employee name,job abd his manager .Display also employees who are with out&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;managers?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename ,e1.ename,e.job,e.sal,d.dname from tvsemp e,e1,tvsdept d where e.mgr=e1.empno(+) and e.deptno=d.deptno107) Display Top 5 employee of a Company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;108) Display the names of those employees who are getting the highest salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from tvsemp where sal in (select max(sal) from tvsemp)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;109) Display those employees whose salary is equal to average of maximum and minimum?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select * from tvsemp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where sal=(select (max(sal)+min(sal))/2 from tvsemp)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;110) Select count of employees in each department where count &amp;gt;3?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select count(*) from tvsemp group by deptno having count(*)&amp;gt;3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;111) Display dname where atleast three are working and display only deptname?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select d.dname from tvsdept d, tvsemp e where e.deptno=d.deptno group by d.dname having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;112) Display name of those managers name whose salary is more than average salary of&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select distinct e1.ename,e1.sal from tvsemp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal&amp;gt; (select avg(sal) from tvsemp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;113) Display those managers name whose salary is more than average salary salary of his&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;employees?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select distinct e1.ename,e1.sal from tvsemp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal&amp;gt;any (select avg(sal) from tvsemp group by deptno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;114) Display employee name,sal,comm and netpay for those employees whose netpay is&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;greater than or equal to any other employee salary of the company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,NVL(comm,0),sal+NVL(comm,0) from tvsemp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;sal+NVL(comm,0) &amp;gt;any (select e.sal from tvsemp e );&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;115) Display those employees whose salary is less than his manager but more than salary of&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;other managers?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename sub,e.sal from tvsemp e,e1,tvsdept d where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;e.deptno=d.deptno and e.mgr=e1.empno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.sal&amp;lt;e1.sal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.sal &amp;gt;any (select e2.sal from tvsemp e2, e,tvsdept d1 where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;e.mgr=e2.empno and d1.deptno=e.deptno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;116) Display all employees names with total sal of company with each employee name?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;117) Find the last 5(least) employees of company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;118) Find out the number of employees whose salary is greater than their managers salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,e.sal,e1.ename,e1.sal from tvsemp e,e1,tvsdept d where e.deptno=d.deptno and e.mgr=e1.empno and e.sal&amp;gt;e1.sal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;119) Display the manager who are not working under president but they are working under&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;any other manager?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e2.ename from emp e1,emp e2,emp e3 where e1.mgr=e2.empno and e2.mgr=e3.empno and e3.job!=’PRESIDENT’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;120) Delete those department where no employee working?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from tvsemp where empno is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;121) Delete those records from emp table whose deptno not available in dept table?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from tvsemp e where e.deptno not in (select deptno from tvsdept)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;122) Display those enames whose salary is out of grade available in salgrade table?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,sal from tvsemp where sal&amp;lt;(select min(LOSAL) from salgrade )&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR sal&amp;gt;(select max(hisal) from salgrade)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;123) Display employee name,sal,comm and whose netpay is greater than any othere in the&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,comm,sal+comm from tvsemp where sal+comm&amp;gt;any&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(select sal+comm from tvsemp )&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;124) Display name of those employees who are going to retire 31-Dec-99 if maximum job period&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;is 30 years?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno, hiredate,sysdate, to_char(sysdate,’yyyy’) – to_char(hiredate,’yyyy’)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;from tvsemp where to_char(sysdate,’yyyy’) – to_char(hiredate,’yyyy’)=30&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;125) Display those employees whose salary is odd value?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,sal from tvsemp where mod(sal,2)!=0&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;126) Display those employees whose salary contains atleast 3 digits?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from tvsemp where length(sal)=3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;127) Display those employees who joined in the company in the month of Dec?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: Select empno,ename from tvsemp where trim(to_char(hiredate,’Mon’))=trim(‘DEC’)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;128) Display those employees whose name contains A?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename from tvsemp where ename like(‘%A%’)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;129) Display those employees whose deptno is available in salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from tvsemp where deptno in (select distinct sal from tvsemp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;130) Display those employees whose first 2 characters from hiredate – last 2 characters sal?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,hiredate,sal from tvsemp where trim(substr(hiredate,1,2))=trim(substr(sal,-2,2));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;or&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select hiredate,sal from tvsemp where to_Char(hiredate,’dd’)=trim(substr(sal,-2,2))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;131) Display those employeess whose 10% of salary is equal to the year joining?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,sal,0.10*sal from tvsemp where 0.10*sal=trim(to_char(hiredate,’yy’))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;132) Display those employees who are working in sales or research?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename from tvsemp e ,tvsdept d where e.deptno=d.deptno and d.dname in(‘SALES’,’RESEARCH’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;133) Display the grade of jones?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,grade from tvsemp,salgrade where ( grade,sal) =&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(select grade,sal from salgrade,tvsemp where sal between losal and hisal and ename=’JONES’)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;134) Display those employees who joined the company before 15th of the month?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,hiredate from tvsemp where hiredate&amp;lt;’15-Jul-02′ and hiredate &amp;gt;=’01-jul-02′;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;135) Display those employees who has joined before 15th of the month?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,hiredate from tvsemp where hiredate&amp;lt;’15-Jul-02′&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;136) Delete those records where no of employees in particular department is less than 3?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from tvsemp where deptno in (select deptno from tvsemp group by deptno having count(*) ❤&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;137A) Delete those employeewho joined the company 10 years back from today?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from tvsemp where empno in (select empno from tvsemp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where to_char(sysdate,’yyyy’)- to_char(hiredate,’yyyy’)&amp;gt;=10)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;137B) Display the deptname the number of characters of which is equal to no of employee&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;in any other department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;138) Display the deptname where no employee is working?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select deptno from tvsemp where empno is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;139) Display those employees who are working as manager?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e2.ename from tvsemp e1,e2 where e1.mgr=e2.empno and e2.empno is not null&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;140) Count th number of employees who are working as managers (Using set opetrator)?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select d.dname from tvsdept d where length(d.dname) in (select count(*) from tvsemp e where e.deptno!=d.deptno group by e.deptno)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;141) Display the name of the dept those employees who joined the company on the same date?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select a.ename,b.ename from tvsemp a,tvsemp b where a.hiredate=b.hiredate and a.empno!=b.empno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;142) Display those employees whose grade is equal to any number of sal but not equal to first number of sal?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,grade ,substr(sal,grade,1) from tvsemp,salgrade where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;grade!=substr(sal,1,1) and grade = substr(sal,grade,1)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and sal between losal and hisal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;143) Count the no of employees working as manager using set operation?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: Select count(empno) from tvsemp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;empno in (select a.empno from tvsemp a&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;intersect&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select b.mgr from tvsemp b)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;144) Display the name of employees who joined the company on the same date?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select a.ename,b.ename from tvsemp a,tvsemp b where a.hiredate=b.hiredate and a.empno!=b.empno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;145) Display the manager who is having maximum number of employees working under him?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e2.ename,count(*) from tvsemp e1,e2 where e1.mgr=e2.empno group by e2.ename Having count(*)=(select max(count(*)) from tvsemp e1,e2 where e1.mgr=e2.empno group by e2.ename)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;146) List out the employee name and salary increased by 15% and express as whole number of Dollars?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,lpad(translate(sal,sal,((sal +(sal*0.15))/50)),5,’$’) from tvsemp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;147) Produce the output of the emptable “EMPLOYEE_AND JOB” for ename and job ?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename”EMPLOYEE_AND”,job”JOB” FROM TVSEMP;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;148) Lust of employees with hiredate in the format of ‘June 4 1988’?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,to_char(hiredate,’Month dd yyyy’) from tvsemp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;149) print list of employees displaying ‘Just salary’ if more than 1500 if exactly 1500&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;display ‘on taget’ if less than 1500 display below 1500?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;case when sal &amp;lt; 1500 then&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘Below_Target’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;when sal=1500 then&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘On_Target’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;when sal &amp;gt; 1500 then&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘Above_Target’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;else&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘kkkkk’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;from tvsemp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;150) Which query to calculate the length of time any employee has been with the company&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select hiredate,to_char(hiredate,’ HH:MI:SS’) FROM tvsemp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;151) Given a string of the format ‘nn/nn’ . Verify that the first and last 2 characters are numbers .And that the middle character is ‘/’ Print the expressions ‘Yes’ IF valid&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘NO’ of not valid . Use the following values to test your solution’12/54′,01/1a,’99/98′?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;152) Employes hire on OR Before 15th of any month are paid on the last friday of that month&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;those hired after 15th are paid the last friday of th following month .print a list of employees .their hiredate and first pay date sort those who se salary contains first&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;digit of their deptno?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,hiredate, LAST_DAY ( next_day(hiredate,’Friday’)),&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;case when to_char(hiredate,’dd’) &amp;lt;=(’15’) then&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;LAST_DAY ( next_day(hiredate,’Friday’))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;when to_char(hiredate,’dd’)&amp;gt;(’15’) then&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;LAST_DAY( next_day(add_months(hiredate,1),’Friday’))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;end&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;from tvsemp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;153) Display those managers who are getting less than his employees salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select a.empno,a.ename ,a.sal,b.sal,b.empno,b.ename from tvsemp a, tvsemp b where a.mgr=b.empno and a.sal&amp;gt;b.sal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;154) Print the details of employees who are subordinates to BLAKE?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select a.empno,a.ename ,b.ename from tvsemp a, tvsemp b where a.mgr=b.empno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and b.ename=’BLAKE’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;151.Display those who working as manager using co related sub query&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where empno in (select mgr from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;152.Display those employees whose manager name is JONES and also with his manager name&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where mgr=(select empno from emp where ename=’JONES’) union select * from emp where empno =&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(select mgr from emp where ename=’JONES’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;153.Define variable representing the expressions used to calculate on employees total annual renumaration&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;define emp_ann_sal=(sal+nvl(comm,0))*.12;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;154.Use the variable in a statement which finds all employees who can earn 30000 a year or more&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where &amp;amp;emp_ann_sal&amp;gt;30000;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;155.Find out how many managers are there with out listing them&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select count(*) from emp where empno in (select mgr from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;156.Find out the avg sal and avg total remuneration for each job type remember salesman earn commission&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select job,avg(sal+nvl(comm,0)),sum(sal+nvl(comm,0)) from emp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;157.Check whether all employees number are indeed unique&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select count(empno) ,count(distinct(empno)) from emp having count(empno)=(count(distinct(empno));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;158.List out the lowest paid employees working for each manager, exclude any groups where minsal is less than&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;1000 sort the output by sal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select e.ename,e.mgr,e.sal from emp e where sal in (select min(sal) from emp where mgr=e.mgr) and&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;e.sal&amp;gt;1000 order by sal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;159.List ename,job,annual sal,depno,dname and grade who earn 30000 per year and who are not clerks&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select e.ename,e.job,(e.sal+nvl(e.comm,0))*12,e.deptno,d.dname,s.grade from emp e,salgrade s,dept d&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where e.sal between s.losal and s.hisal and e.deptno=d.deptno and (e.sal+nvl(comm,0))*12 &amp;gt; 30000&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.job&amp;lt;&amp;gt;’CLERK’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;160.Find out th job that was falled in the first half of 1983 and the same job that was falled during the&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;same period on 1984&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;161.Find out the all employees who joined the company before their manager&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp e where hiredate &amp;lt;(select hiredate from emp where empno=e.mgr);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;162.List out the all employees by name and number along with their manager’s name and number also display&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘NO MANAGER’ who has no manager&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select e.empno,e.ename,m.empno Manager,m.ename ManagerName from emp e,emp m where e.mgr=m.empno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;union&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select empno,ename,mgr,’NO Manager’ from emp where mgr is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;163.Find out the employees who earned the highest sal in each job typed sort in descending sal order&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp e where sal=(select max(sal) from emp where job=e.job);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;164.Find out the employees who earned the min sal for their job in ascending order&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp e where sal=(select min(sal) from emp where job=e.job) order by sal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;165.Find out the most recently hired employees in each dept order by hire date&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp order by deptno,hiredate desc;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;166.Display ename,sal and deptno for each employee who earn a sal greater than the avg of their department&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;order by deptno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select ename,sal,deptno from emp e where sal&amp;gt;(select avg(sal) from emp where deptno=e.deptno) order by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;167.Display the department where there are no employees&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select deptno,dname from dept where deptno not in (select distinct(deptno) from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;168.Display the dept no with highest annual remuneration bill as compensation&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select deptno,sum(sal) from emp group by deptno having sum(sal)=(select max(sum(sal)) from emp group by deptno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;169.In which year did most people join the company. Display the year and number of employees&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select count(*),to_char(hiredate,’yyyy’) from emp group by to_char(hiredate,’yyyy’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;170.Display avg sal figure for the dept&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select deptno,avg(sal) from emp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;171.Write a query of display against the row of the most recently hierd employee.display ename hire date&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and column max date showing&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select empno,hiredate from emp wher hiredate=(select max(hiredate) from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;172.Display employees who can earn more than lowest sal in dept no 30&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where sal &amp;gt; (select min(sal) from emp where deptno=30);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;173.Find employees who can earn more than every employees in dept no 30&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where sal&amp;gt;(select max(sal) from emp where deptno=30);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where sal&amp;gt;all(select sal from emp where deptno=30);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;174.select dept name and deptno and sum of sal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;break on deptno on dname;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select e.deptno,d.dname,sal from emp e,dept d where e.deptno=d.deptno order by e.deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;175.Find out avg sal and avg total remainders for each job type&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;176.Find all dept’s which have more than 3 employees&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select deptno from emp group by deptno having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;177.If the pay day is next Friday after 15th and 30th of every month. What is the next pay day from&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;their hire date for employee in emp table&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;178.If an employee is taken by you today in your organization and is a policy in your company to have a&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;review after 9 months the joined date (and of 1st of next month after 9 months) how many days from today&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;your employee has to wait for a review&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;179.Display employee name and his sal whose sal is greater than highest avg of deptno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;180.Display the 10 th record of emp table (without using rowid)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;181.Display the half of the enames in upper case and remaining lower case&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select concat(upper(substr(ename,0,length(ename)/2),lower(substr(ename,length(ename)/2+1,length(ename)))) from&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;182.Display the 10th record of emp table without using group by and rowid&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;183.Delete the 10th record of emp table&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;184.Create a copy of emp table&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;create table emp1 as select * from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;185.select ename if ename exists more than once&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select distinct(ename) from emp e where ename in (select ename from emp where e.empno&amp;lt;&amp;gt;empno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;186.Display all enames in reverse order&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select ename from emp order by ename desc;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;187.Display those employee whose joining of month and grade is equal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select empno,ename from emp e,salgrade s where e.sal between s.losal and s.hisal and to_char(hiredate,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;‘mm’)=grade;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;188.Display those employee whose joining date is available in deptno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select * from emp where to_char(hiredate,’dd’) =deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;189.Display those employee name as follows A ALLEN, B BLAKE&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select substr(ename,1,1)||”||ename from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;190.List out the employees ename,sal,pf from emp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select ename,sal,sal*15/100 pf from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;191.Display RSPS from emp without using updating,inserting&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;192.Create table emp with only one column empno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;create table emp (empno number(5));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;193.Add this column to emp table ename varchar2(20)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp add ename varchar2(20) not null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;194.OOPSI i forget to give the primary key constraint. Add it now&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp add constraint emp_empno primary key (empno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;195.Now increase the length of ename column to 30 characters&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp modify ename varchar2(30);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;196.Add salary column to emp table&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp add sal number(7,2);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;197.I want to give a validation saying that sal can not be greater 10000(note give a name to this column)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp add constraint emp_sal_check check(sal&amp;lt;10000);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;198.For the time being i have decided that i will not impose this validation. My boss has agreed to pay&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;more than 10000&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp disable constraint emp_sal_check;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;199.My boss has changed his mind. Now he doesn’t want to pay more than 10000 So revoke that salary constraint&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp enable constraint emp_sal_check;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;200.Add column called as mgr to your emp table&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;alter table emp add mgr number(5);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Sql Queries3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:1) Display the name of employees along with their annual salary(sal*12).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;the name of the employee earning highest annual salary should appear first?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,sal*12 “Annual Salary” from emp order by “Annual Salary” desc;Q:2)Display name,salary,Hra,pf,da,TotalSalary for each employee.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The out put should be in the order of total salary ,hra 15% of salary ,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DA 10% of salary .pf 5% salary Total Salary will be (salary+hra+da)-pf?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal SA,sal*0.15 HRA,sal*0.10 DA,sal*5/100 PF,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;sal+(sal*0.15)+(sal*0.10)-(sal*.05) TOTALSALARY from emp ORDER BY TOTALSALARY DESC;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:3) Display Department numbers and total number of employees working in each Department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select deptno,count(*) from emp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:4) Display the various jobs and total number of employees working in each job group?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job,count(*) from emp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:5) Display department numbers and Total Salary for each Department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select deptno,sum(sal) from emp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:6) Display department numbers and Maximum Salary from each Department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select deptno,max(sal) from emp group by deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:7) Display various jobs and Total Salary for each job?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job,sum(sal) from emp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:8) Display each job along with min of salary being paid in each job group?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job ,min(sal) from emp group by job;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:9) Display the department Number with more than three employees in each department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select deptno ,count(*) from emp group by deptno having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:10) Display various jobs along with total salary for each of the job&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where total salary is greater than 40000?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job,sum(sal) from emp group by job having sum(sal)&amp;gt;40000;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:11) Display the various jobs along with total number of employees in each job.The output should contain only those jobs with more than three employees?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job,count(*) from emp group by job having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:12) Display the name of employee who earn Highest Salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename, sal from emp where sal&amp;gt;=(select max(sal) from emp );&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:13) Display the employee Number and name for employee working as clerk and earning highest salary among the clerks?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,empno from emp where sal=(select max(sal) from emp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;job=’CLERK’) and job=’CLERK’ ;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:14) Display the names of salesman who earns a salary more than the Highest Salary of the Clerk?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from emp where sal&amp;gt;(select max(sal) from emp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where job=’CLERK’) AND job=’SALESMAN’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:15) Display the names of clerks who earn a salary more than the lowest Salary of any Salesman?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from emp where sal&amp;gt;(select min(sal) from emp where job=’SALESMAN’) and job=’CLERK’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:16) Display the names of employees who earn a salary more than that of jones or that of salary greater than that of scott?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from emp where sal&amp;gt;all(select sal from emp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ename=’JONES’ OR ename=’SCOTT’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:17) Display the names of employees who earn Highest salary in their respective departments?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,deptno from emp where sal in (select max(sal) from emp group by deptno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:18) Display the names of employees who earn Highest salaries in their respective job Groups?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,job from emp where sal in (select max(sal) from emp group by job);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:19) Display employee names who are working in Accounting department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname=’ACCOUNTING’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:20) Display the employee names who are Working in Chicago?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,d.loc from emp e,dept d where e.deptno=d.deptno and d.loc=’CHICAGO’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:21) Display the job groups having Total Salary greater than the maximum salary for Managers?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job ,sum(sal) from emp group by job having sum(sal) &amp;gt;(select max(sal) from emp where job=’MANAGER’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:22) Display the names of employees from department number 10 with salary greater than that of ANY employee working in other departments?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,deptno from emp where sal&amp;gt;any(select min(sal) from emp where deptno!=10 group by deptno) and deptno=10 ;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:23) Display the names of employees from department number 10 with salary greater than that of ALL employee working in other departments?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,deptno from emp where sal&amp;gt;all(select max(sal) from emp where deptno!=10 group by deptno) and deptno=10 ;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:24) Display the names of employees in Upper Case?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select upper(ename) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:25) Display the names of employees in Lower Case?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select Lower(ename) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:26) Display the names of employees in Proper case?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select InitCap(ename)from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:27) Find the length of your name using Appropriate Function?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select lentgh(‘SRINIVASARAO’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:28) Display the length of all the employee names?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select length(ename) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:29) Display the name of employee Concatinate with Employee Number?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename||’ ‘||empno from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:30) Use appropriate function and extract 3 characters starting from 2 characters from the following string ‘Oracle’ i.e., the out put should be ac?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select substr(‘Oracle’,3,2) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:31) Find the first occurance of character a from the following string Computer Maintenance Corporation?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select lstr(‘Computer Maintenance Corporation’,’a’ ) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:32) Replace every occurance of alphabet A with B in the string .Alliens (Use Translate function)?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select translate(‘Alliens’,’A’,’B’) from Dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:33) Display the information from the employee table . where ever job Manager is found it should be displayed as Boss?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,replace(job,’MANAGER’,’BOSS’) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:34) Display empno,ename,deptno from emp table. Instead of display department numbers display the related department name(Use decode function)?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,ename,deptno,Decode(deptno,10,’ACCOUNTING’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;,20,’RESEARCH’,30,’SALES’,’OPERATIONS’)DName from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:35) Display your Age in Days?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select sysdate-to_date(’30-jul-1977′) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:36) Display your Age in Months?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select months_between(sysdate,to_date(’30-jul-1977′)) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:37) Display current date as 15th August Friday Nineteen Nienty Seven?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select To_char(sysdate,’ddth Month Day year’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:38) Display the following output for each row from emp table?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: Q:39&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:39) Scott has joined the company on 13th August ninteen ninety?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,ename,to_char(Hiredate,’Day ddth Month year’) from emp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:40) Find the nearest Saturday after Current date?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select next_day(sysdate,’Saturday’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:41) Display the current time?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select To_Char(sysdate,’HH:MI:SS’) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:42) Display the date three months before the Current date?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select Add_months(sysdate,-3) from dual;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:43) Display the common jobs from department number 10 and 20?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job from emp where job in (select job from emp where deptno=20) and deptno=10;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:44) Display the jobs found in department 10 and 20 Eliminate duplicate jobs?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select Distinct job from emp where deptno in(10,20);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:45) Display the jobs which are unique to department 10?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select job from emp where deptno=10;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:46) Display the details of those employees who do not have any person working under him?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,ename,job from emp where empno not in (select mgr from emp where mgr is not null );&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:47)Display the details of those employees who are in sales department and grade is 3?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,d.dname,grade from emp e,dept d ,salgrade where e.deptno=d.deptno and dname=’SALES’ and grade=3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:48) Display those who are not managers?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename from emp where job!=’MANAGER’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:49) Display those employees whose name contains not less than 4 characters?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename from emp where length(ename)&amp;gt;=4;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:50) Display those department whose name start with”S” while location name ends with “K”?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,d.loc from emp e ,dept d where d.loc like(‘%K’) and ename like(‘S%’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:51) Display those employees whose manager name is Jones?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename Superior,e1.ename Subordinate from emp e,e1 where e.empno=e1.mgr and e.ename=’JONES’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:52) Display those employees whose salary is more than 3000 after giving 20% increment?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,(sal+(sal*0.20)) from emp where (sal+(sal*0.20))&amp;gt;3000;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:53) Display all employees with their department names?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,d.dname from emp e, dept d where e.deptno=d.deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:54) Display ename who are working in sales department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname=’SALES’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:56) Display employee name,dept name,salary,and commission for those sal in between 2000 to 5000 while location is Chicago?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: Select e.ename,d.dname,e.sal,e.comm from emp e,dept d where e.deptno=d.deptno and sal between 2000 and 5000;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:57) Display those employees whose salary is greater than his managers salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: Select e.ename,e.sal,e1.ename,e1.sal from emp e,e1 where e.mgr=e1.empno and e.sal&amp;gt;e1.sal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:58) Display those employees who are working in the same dept where his manager is work?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,e.deptno,e1.ename,e1.deptno from emp e,e1 where e.mgr=e1.empno and e.deptno=e1.deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:59) Display those employees who are not working under any Manager?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename from emp where mgr is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:60) Display the grade and employees name for the deptno 10 or 30 but grade is not 4 while joined the company before 31-DEC-82?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,grade,deptno,sal from emp ,salgrade where ( grade,sal) in&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;( select grade,sal from salgrade,emp where sal between losal and hisal)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and grade!=4 and deptno in (10,30) and hiredate&amp;lt;’31-Dec-82′;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:61) Update the salary of each employee by 10% increment who are not eligible for commission?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: update emp set sal= (sal+(sal*0.10)) where comm is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:62) Delete those employees who joined the company before 31-Dec-82 while their department Location is New York or Chicago?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,e.hiredate,d.loc from emp e,dept d where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;e.deptno=d.deptno and hiredate&amp;lt;’31-Dec-82′ and d.loc in(‘NEW YORK’,’CHICAGO’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:63) Display employee name ,job,deptname,loc for all who are working as manager?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,e.job,d.dname,d.loc from emp e,dept d where e.deptno=d.deptno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.empno in (select mgr from emp where mgr is not null);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:64) Display those employees whose manager name is jones and also display their manager name?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename sub,e1.ename from emp e,e1 where e.mgr=e1.empno and e1.ename=’JONES’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:65) Display name and salary of ford if his salary is equal to hisal of his grade?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,grade,hisal,sal from emp,salgrade where ename=’FORD’ and sal=hisal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select grade,sal,hisal from emp,salgrade where ename=’FORD’ and sal between losal and hisal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select ename,sal,hisal,grade from emp,salgrade where ename=’FORD’&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and (grade,sal) in (select grade,hisal from salgrade,emp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;sal between losal and hisal);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q66) Display employee name ,job,deptname,his manager name ,his grade and make an under department wise?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename sub,e1.ename sup,e.job,d.dname ,grade from emp e,e1,salgrade,dept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno group by d.deptno,e.ename,e1.ename,e.job,d.dname,grade;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select e.ename sub,e1.ename sup,e.job,d.dname ,grade from emp e,e1,salgrade,tvsdept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:67) List out all the employee names ,job,salary,grade and deptname for every one in a company except ‘CLERK’ . Sort on salary display the highest salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename ,e.job,e.sal,d.dname ,grade from emp e,salgrade,dept d where (e.deptno=d.deptno and e.sal between losal and hisal ) order by e.sal desc;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:68) Display employee name,job abd his manager .Display also employees who are with out managers?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename ,e1.ename,e.job,e.sal,d.dname from emp e,e1,dept d where e.mgr=e1.empno(+) and e.deptno=d.deptno;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:69) Display Top 5 employee of a Company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:70) Display the names of those employees who are getting the highest salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from emp where sal in (select max(sal) from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:71) Display those employees whose salary is equal to average of maximum and minimum?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select * from emp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where sal=(select (max(sal)+min(sal))/2 from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:72) Select count of employees in each department where count &amp;gt;3?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select count(*) from emp group by deptno having count(*)&amp;gt;3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:73) Display dname where atleast three are working and display only deptname?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select d.dname from dept d, emp e where e.deptno=d.deptno group by d.dname having count(*)&amp;gt;3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:74) Display name of those managers name whose salary is more than average salary of Company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select distinct e1.ename,e1.sal from emp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal&amp;gt; (select avg(sal) from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:75) Display those managers name whose salary is more than average salary salary of his employees?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select distinct e1.ename,e1.sal from emp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal&amp;gt;any (select avg(sal) from emp group by deptno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:76) Display employee name,sal,comm and netpay for those employees whose netpay is greater than or equal to any other employee salary of the company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,NVL(comm,0),sal+NVL(comm,0) from emp where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;sal+NVL(comm,0) &amp;gt;any (select e.sal from emp e );&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:77) Display those employees whose salary is less than his manager but more than salary of other managers?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename sub,e.sal from emp e,e1,dept d where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;e.deptno=d.deptno and e.mgr=e1.empno&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.sal&amp;lt;e1.sal&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;and e.sal &amp;gt;any (select e2.sal from emp e2, e,dept d1 where&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;e.mgr=e2.empno and d1.deptno=e.deptno);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:78) Display all employees names with total sal of company with each employee name?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:79) Find the last 5(least) employees of company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:80) Find out the number of employees whose salary is greater than their&amp;nbsp; managers salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename,e.sal,e1.ename,e1.sal from emp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e.sal&amp;gt;e1.sal;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:81) Display the manager who are not working under president but they are working under any other manager?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e2.ename from emp e1,emp e2,emp e3 where e1.mgr=e2.empno and e2.mgr=e3.empno and e3.job!=’PRESIDENT’;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:82) Delete those department where no employee working?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from emp where empno is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:83) Delete those records from emp table whose deptno not available in dept table?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from emp e where e.deptno not in (select deptno from dept);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:84) Display those enames whose salary is out of grade available in salgrade table?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,sal from emp where sal&amp;lt;(select min(LOSAL) from salgrade )&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;OR sal&amp;gt;(select max(hisal) from salgrade);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:85) Display employee name,sal,comm and whose netpay is greater than any other in the company?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal,comm,sal+comm from emp where sal+comm&amp;gt;any&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(select sal+comm from emp );&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:86) Display name of those employees who are going to retire 31-Dec-99 if maximum job period is 30 years?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno, hiredate,sysdate, to_char(sysdate,’yyyy’) – to_char(hiredate,’yyyy’)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;from emp where to_char(sysdate,’yyyy’) – to_char(hiredate,’yyyy’)=30;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:87) Display those employees whose salary is odd value?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,sal from emp where mod(sal,2)!=0;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:88) Display those employees whose salary contains atleast 3 digits?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from emp where length(sal)=3;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:89) Display those employees who joined in the company in the month of Dec?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: Select empno,ename from emp where trim(to_char(hiredate,’Mon’))=trim(‘DEC’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:90) Display those employees whose name contains A?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename from emp where ename like(‘%A%’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:91) Display those employees whose deptno is available in salary?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,sal from emp where deptno in (select distinct sal from emp);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:92) Display those employees whose first 2 characters from hiredate – last 2 characters sal?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select empno,hiredate,sal from emp where trim(substr(hiredate,1,2))=trim(substr(sal,-2,2));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;or&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;select hiredate,sal from emp where to_Char(hiredate,’dd’)=trim(substr(sal,-2,2));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:93) Display those employeess whose 10% of salary is equal to the year joining?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,sal,0.10*sal from emp where 0.10*sal=trim(to_char(hiredate,’yy’));&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:94) Display those employees who are working in sales or research?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select e.ename from emp e ,dept d where e.deptno=d.deptno and d.dname in(‘SALES’,’RESEARCH’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:95) Display the grade of jones?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename,grade from emp,salgrade where ( grade,sal) =&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(select grade,sal from salgrade,emp where sal between losal and hisal and ename=’JONES’);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:96) Display those employees who joined the company before 15th of the month?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,hiredate from emp where hiredate&amp;lt;’15-Jul-02′ and hiredate &amp;gt;=’01-jul-02′;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:97) Display those employees who has joined before 15th of the month?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select ename ,hiredate from emp where hiredate&amp;lt;’15-Jul-02′&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:98) Delete those records where no of employees in particular department is less than 3?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from emp where deptno in (select deptno from emp group by deptno having count(*)&amp;nbsp; ;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:99A) Delete those employeewho joined the company 10 years back from today?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: delete from emp where empno in (select empno from emp&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;where to_char(sysdate,’yyyy’)- to_char(hiredate,’yyyy’)&amp;gt;=10);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q:99B) Display the deptname the number of characters of which is equal to no of employee in any other department?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;Q:100) Display the deptname where no employee is working?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ans: select deptno from emp where empno is null;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #cc0000; font-family: helvetica; font-size: small;&quot;&gt;&lt;u&gt;&lt;i&gt;Most Common SQL Commands&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SQL statements can be grouped in different categories:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Data Definition Language(DDL) Commands&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;CREATE: creates a new database object, such as a table.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ALTER: used to modify the database object&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP: used to delete the objects.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Data Manipulation Language(DML) Commands&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;INSERT: used to insert a new data row record in a table.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;UPDATE: used to modify an existing record in a table.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;DELETE: used delete a record from the table.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Data Query Language(DQL) Commands&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT: it is the DQL command to select data from the database.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Data Control Language(DCL) Commands&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;GRANT: used to assign permission to users to access database objects.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;REVOKE: used to deny permission to users to access database objects.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Data Transfer Language(DTL) Commands&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;COMMIT: used to save any transaction into the database permanently.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ROLLBACK: restores the database to the last committed state.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;color: #cc0000; font-family: helvetica;&quot;&gt;CREATE DATABASE&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The first thing we need to do to work with SQL is to create a database. The CREATE DATABASE statement does exactly that.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;CREATE DATABASE testDB&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;CREATE TABLE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The CREATE TABLE statement creates a new table in a database.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;CREATE TABLE Employees (&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp; &amp;nbsp; EmployeeID int,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp; &amp;nbsp; FirstName varchar(255),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp; &amp;nbsp; LastName varchar(255),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp; &amp;nbsp; Department varchar(255)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;INSERT INTO&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The INSERT INTO statement inserts new rows of data into a table&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;INSERT INTO Employees (FirstName, LastName, Department)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;VALUES (&#39;Sam&#39;, &#39;Burger&#39;, &#39;IT&#39;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;SELECT&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT is one of the main and most used SQL command. It selects data from a database and returns the table of results, called the result-set.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT firstName, lastName&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Employees;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;SELECT *&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The SELECT command when used with an asterisk * operator, selects all records from a specified table.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT * FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;SELECT DISTINCT&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT DISTINCT returns only the data that is distinct; i.e. does not include duplicate entries.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT DISTINCT Department FROM Employees;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;SELECT INTO&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The SELECT INTO statement selects specified data from a table and copies it to another table.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT firstName, entryGraduated INTO StudentAlumni&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Students;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;SELECT TOP&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT TOP specifies the maximum number or percentage of data entries to return in a result-set.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT TOP 50 PERCENT * FROM Customers;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;WHERE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The WHERE clause is used to filter results based on a specified condition.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT * FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE department = &#39;IT&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;GROUP BY&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The GROUP BY command arranges identical data from different rows into groups, thus creating summarizing rows.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT COUNT(Department), Department&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;GROUP BY Department;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;HAVING&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The HAVING clause performs the same as the WHERE clause, but the difference is that HAVING only works with aggregate functions. Likewise, WHERE clause doesn’t work with aggregate functions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT COUNT(Department), Department&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;GROUP BY Department&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;HAVING COUNT(Department) &amp;gt; 2;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;IN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The IN operator includes multiple values into the WHERE clause.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT * FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE Department IN (&#39;IT&#39;, &#39;Graphics&#39;, &#39;Marketing&#39;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;BETWEEN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;BETWEEN operator filters the results and returns only the ones that fit the specified range.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT * FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE JoiningDate BETWEEN &#39;01-01-2015&#39; AND `01-01-2020`;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;AND / OR&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The AND and OR are conditional statements. In AND, all conditions must meet a specified criteria. In OR any of the conditions that satisfy a given criteria returns a result.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example AND:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT * FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE Department = &#39;IT&#39; AND JoiningDate &amp;gt; &#39;01-01-2015&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example OR:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT * FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE Department =&#39;IT&#39; OR Department = &#39;Graphics&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;AS (Alias)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;AS works as an alias. With AS, we can rename a column to something more meaningful or shorter in the query, without having to change the name in the database.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT FirstName AS fname, LastName AS lname&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Employees;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;INNER JOIN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;INNER JOIN combines rows from different tables.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT Orders.ID, Customers.Name&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Orders&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;INNER JOIN Customers ON Orders.ID = Customers.ID;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;LEFT JOIN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;LEFT JOIN retrieves records from the left table that match records in the right table.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT Customers.CustomerName, Orders.OrderID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Customers&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ORDER BY Customers.CustomerName;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;RIGHT JOIN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Opposite of the LEFT JOIN, the RIGHT JOIN retrieves records from the right table that match records in the left table.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT Orders.OrderID, Employees.LastName&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Orders&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;RIGHT JOIN Employees ON Orders.EmployeeID = Employees.EmployeeID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ORDER BY Orders.OrderID;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;FULL JOIN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FULL JOIN returns all the records that match either in left or right tables.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SELECT Customers.Name, CustomerOrders.ID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FROM Customers&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FULL OUTER JOIN Orders ON Customers.ID = CustomerOrders.customerID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ORDER BY Customers.Name;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;DELETE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The DELETE statement removes certain rows from the table that meet a specified condition.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DELETE FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE FirstName = &#39;Sam&#39; AND LastName = &#39;Burger&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;ALTER TABLE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;We use ALTER TABLE to add or remove columns from a table.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ALTER TABLE Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ADD JoiningDate date;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;TRUNCATE TABLE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;TRUNCATE TABLE removes data entries from a table in a database, but keeps the table structure.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;TRUNCATE TABLE temp_table&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;DROP TABLE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP TABLE statement deletes the whole table with its column parameters and datatype settings.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP TABLE temp_table&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;DROP DATABASE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP DATABASE deletes the whole specified database together with all its parameters and data.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Be extra cautious when using this command.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP DATABASE temp_db&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;How to use the SQL Drop, Truncate and Delete Statements&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The SQL DELETE statement is used to delete records from a table whereas the DROP statement is used to delete a table or a database.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The TRUNCATE TABLE statement can also be used to delete records from a table.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;Deleting Records From a Table&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The DELETE statement in SQL is used to delete records from a database table. We can remove all records from a table or delete specific records using the WHERE clause.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DELETE FROM table_name&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE condition;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;SQL DELETE Statement Examples&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Let’s assume we have a table called “Employees” with the following records:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;+------------+-----------+----------+------------+&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;| EmployeeID | FirstName | LastName | Department |&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;+------------+-----------+----------+------------+&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;| 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Mark&amp;nbsp; &amp;nbsp; &amp;nbsp; | Otto&amp;nbsp; &amp;nbsp; &amp;nbsp;| Finance&amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;| 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Jacob&amp;nbsp; &amp;nbsp; &amp;nbsp;| Thornton | IT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;| 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Su&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Bird&amp;nbsp; &amp;nbsp; &amp;nbsp;| Marketing&amp;nbsp; |&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;| 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Sam&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| Burger&amp;nbsp; &amp;nbsp;| IT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;+------------+-----------+----------+------------+&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;b&gt;Delete a Single Record&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The following code removes “Jacob Thornton” from the “Employees” table:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DELETE FROM Employees&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;WHERE FirstName = &#39;Jacob&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;AND LastName = &#39;Thornton&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Note: In the above example, we use two conditions, WHERE and AND, i.e. by first name and last name. This is to ensure we delete the correct record, in case there is another employee with the same first name.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;b&gt;Delete All Records From a Table&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The following code deletes all records from the “Employees” table:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DELETE * FROM Employees;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Note: The DELETE statement removes the records from a table, but does not delete the table itself.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;b&gt;SQL TRUNCATE TABLE Statement&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The TRUNCATE TABLE statement can also be used to delete records from a table, but not the table instead.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;TRUNCATE TABLE table_name;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;SQL Drop Statement&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The DROP statement in SQL is used to delete a table or a database.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;b&gt;How to Drop a Table in SQL&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The following code drops a table called “Employees”:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP TABLE &quot;Employees&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Note: Take extra care when using the DROP statement. When dropping a table, it will delete all records inside the table as well.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: red; font-family: helvetica;&quot;&gt;&lt;b&gt;How to Drop a Database in SQL&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The following code drops a database called “EmployeesDB”:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DROP DATABASE &quot;EmployeesDB&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Note: Take extra care when using the DROP statement. When dropping a database, it will delete all tables inside the database.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;SQL Queries Set 4&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;Q:1) Display the name of employees along with their annual salary(sal*12). the name of the employee earning highest annual salary should appear first?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,sal*12 “Annual Salary” from emp order by “Annual Salary” desc;Q:2)Display name,salary,Hra,pf,da,TotalSalary for each employee. The out put should be in the order of total salary ,hra 15% of salary , DA 10% of salary .pf 5% salary Total Salary will be (salary+hra+da)-pf?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal SA,sal*0.15 HRA,sal*0.10 DA,sal*5/100 PF,sal+(sal*0.15)+(sal*0.10)-(sal*.05) TOTALSALARY from emp ORDER BY TOTALSALARY DESC;&lt;/div&gt;&lt;div&gt;Q:3) Display Department numbers and total number of employees working in each Department?&lt;/div&gt;&lt;div&gt;Ans: select deptno,count(*) from emp group by deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:4) Display the various jobs and total number of employees working in each job group?&lt;/div&gt;&lt;div&gt;Ans: select job,count(*) from emp group by job;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:5) Display department numbers and Total Salary for each Department?&lt;/div&gt;&lt;div&gt;Ans: select deptno,sum(sal) from emp group by deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:6) Display department numbers and Maximum Salary from each Department?&lt;/div&gt;&lt;div&gt;Ans: select deptno,max(sal) from emp group by deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:7) Display various jobs and Total Salary for each job?&lt;/div&gt;&lt;div&gt;Ans: select job,sum(sal) from emp group by job;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:8) Display each job along with min of salary being paid in each job group?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:9) Display the department Number with more than three employees in each department?&lt;/div&gt;&lt;div&gt;Ans: select deptno ,count(*) from emp group by deptno having count(*)&amp;gt;3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:10) Display various jobs along with total salary for each of the job&lt;/div&gt;&lt;div&gt;where total salary is greater than 40000?&lt;/div&gt;&lt;div&gt;Ans: select job,sum(sal) from emp group by job having sum(sal)&amp;gt;40000;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:11) Display the various jobs along with total number of employees in each job.The output should contain only those jobs with more than three employees?&lt;/div&gt;&lt;div&gt;Ans: select job,count(*) from emp group by job having count(*)&amp;gt;3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:12) Display the name of employee who earn Highest Salary?&lt;/div&gt;&lt;div&gt;Ans: select ename, sal from emp where sal&amp;gt;=(select max(sal) from emp );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:13) Display the employee Number and name for employee working as clerk and earning highest salary among the clerks?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,empno from emp where sal=(select max(sal) from emp where&lt;/div&gt;&lt;div&gt;job=’CLERK’) and job=’CLERK’ ;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:14) Display the names of salesman who earns a salary more than the Highest Salary of the Clerk?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal from emp where sal&amp;gt;(select max(sal) from emp&lt;/div&gt;&lt;div&gt;where job=’CLERK’) AND job=’SALESMAN’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:15) Display the names of clerks who earn a salary more than the lowest Salary of any Salesman?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal from emp where sal&amp;gt;(select min(sal) from emp where job=’SALESMAN’) and job=’CLERK’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:16) Display the names of employees who earn a salary more than that of jones or that of salary greater than that of scott?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal from emp where sal&amp;gt;all(select sal from emp where&lt;/div&gt;&lt;div&gt;ename=’JONES’ OR ename=’SCOTT’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:17) Display the names of employees who earn Highest salary in their respective departments?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,deptno from emp where sal in (select max(sal) from emp group by deptno);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:18) Display the names of employees who earn Highest salaries in their respective job Groups?&lt;/div&gt;&lt;div&gt;Ans: select ename,job from emp where sal in (select max(sal) from emp group by job);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:19) Display employee names who are working in Accounting department?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname=’ACCOUNTING’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:20) Display the employee names who are Working in Chicago?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,d.loc from emp e,dept d where e.deptno=d.deptno and d.loc=’CHICAGO’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:21) Display the job groups having Total Salary greater than the maximum salary for Managers?&lt;/div&gt;&lt;div&gt;Ans: select job ,sum(sal) from emp group by job having sum(sal) &amp;gt;(select max(sal) from emp where job=’MANAGER’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:22) Display the names of employees from department number 10 with salary greater than that of ANY employee working in other departments?&lt;/div&gt;&lt;div&gt;Ans: select ename,deptno from emp where sal&amp;gt;any(select min(sal) from emp where deptno!=10 group by deptno) and deptno=10 ;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:23) Display the names of employees from department number 10 with salary greater than that of ALL employee working in other departments?&lt;/div&gt;&lt;div&gt;Ans: select ename,deptno from emp where sal&amp;gt;all(select max(sal) from emp where deptno!=10 group by deptno) and deptno=10 ;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:24) Display the names of employees in Upper Case?&lt;/div&gt;&lt;div&gt;Ans: select upper(ename) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:25) Display the names of employees in Lower Case?&lt;/div&gt;&lt;div&gt;Ans: select Lower(ename) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:26) Display the names of employees in Proper case?&lt;/div&gt;&lt;div&gt;Ans: select InitCap(ename)from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:27) Find the length of your name using Appropriate Function?&lt;/div&gt;&lt;div&gt;Ans: select lentgh(‘SRINIVASARAO’) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:28) Display the length of all the employee names?&lt;/div&gt;&lt;div&gt;Ans: select length(ename) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:29) Display the name of employee Concatinate with Employee Number?&lt;/div&gt;&lt;div&gt;Ans: select ename||’ ‘||empno from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:30) Use appropriate function and extract 3 characters starting from 2 characters from the following string ‘Oracle’ i.e., the out put should be ac?&lt;/div&gt;&lt;div&gt;Ans: select substr(‘Oracle’,3,2) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:31) Find the first occurance of character a from the following string Computer Maintenance Corporation?&lt;/div&gt;&lt;div&gt;Ans: select lstr(‘Computer Maintenance Corporation’,’a’ ) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:32) Replace every occurance of alphabet A with B in the string .Alliens (Use Translate function)?&lt;/div&gt;&lt;div&gt;Ans: select translate(‘Alliens’,’A’,’B’) from Dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:33) Display the information from the employee table . where ever job Manager is found it should be displayed as Boss?&lt;/div&gt;&lt;div&gt;Ans: select ename ,replace(job,’MANAGER’,’BOSS’) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:34) Display empno,ename,deptno from emp table. Instead of display department numbers display the related department name(Use decode function)?&lt;/div&gt;&lt;div&gt;Ans: select empno,ename,deptno,Decode(deptno,10,’ACCOUNTING’&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;,20,’RESEARCH’,30,’SALES’,’OPERATIONS’)DName from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:35) Display your Age in Days?&lt;/div&gt;&lt;div&gt;Ans: select sysdate-to_date(’30-jul-1977′) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:36) Display your Age in Months?&lt;/div&gt;&lt;div&gt;Ans: select months_between(sysdate,to_date(’30-jul-1977′)) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:37) Display current date as 15th August Friday Nineteen Nienty Seven?&lt;/div&gt;&lt;div&gt;Ans: select To_char(sysdate,’ddth Month Day year’) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:38) Display the following output for each row from emp table?&lt;/div&gt;&lt;div&gt;Ans: Q:39&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:39) Scott has joined the company on 13th August ninteen ninety?&lt;/div&gt;&lt;div&gt;Ans: select empno,ename,to_char(Hiredate,’Day ddth Month year’) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:40) Find the nearest Saturday after Current date?&lt;/div&gt;&lt;div&gt;Ans: select next_day(sysdate,’Saturday’) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:41) Display the current time?&lt;/div&gt;&lt;div&gt;Ans: select To_Char(sysdate,’HH:MI:SS’) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:42) Display the date three months before the Current date?&lt;/div&gt;&lt;div&gt;Ans: select Add_months(sysdate,-3) from dual;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:43) Display the common jobs from department number 10 and 20?&lt;/div&gt;&lt;div&gt;Ans: select job from emp where job in (select job from emp where deptno=20) and deptno=10;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:44) Display the jobs found in department 10 and 20 Eliminate duplicate jobs?&lt;/div&gt;&lt;div&gt;Ans: select Distinct job from emp where deptno in(10,20);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:45) Display the jobs which are unique to department 10?&lt;/div&gt;&lt;div&gt;Ans: select job from emp where deptno=10;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:46) Display the details of those employees who do not have any person working under him?&lt;/div&gt;&lt;div&gt;Ans: select empno,ename,job from emp where empno not in (select mgr from emp where mgr is not null );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:47)Display the details of those employees who are in sales department and grade is 3?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,d.dname,grade from emp e,dept d ,salgrade where e.deptno=d.deptno and dname=’SALES’ and grade=3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:48) Display those who are not managers?&lt;/div&gt;&lt;div&gt;Ans: select ename from emp where job!=’MANAGER’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:49) Display those employees whose name contains not less than 4 characters?&lt;/div&gt;&lt;div&gt;Ans: select ename from emp where length(ename)&amp;gt;=4;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:50) Display those department whose name start with”S” while location name ends with “K”?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,d.loc from emp e ,dept d where d.loc like(‘%K’) and ename like(‘S%’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:51) Display those employees whose manager name is Jones?&lt;/div&gt;&lt;div&gt;Ans: select e.ename Superior,e1.ename Subordinate from emp e,e1 where e.empno=e1.mgr and e.ename=’JONES’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:52) Display those employees whose salary is more than 3000 after giving 20% increment?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,(sal+(sal*0.20)) from emp where (sal+(sal*0.20))&amp;gt;3000;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:53) Display all employees with their department names?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,d.dname from emp e, dept d where e.deptno=d.deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:54) Display ename who are working in sales department?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,d.dname from emp e,dept d where e.deptno=d.deptno and d.dname=’SALES’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:56) Display employee name,dept name,salary,and commission for those sal in between 2000 to 5000 while location is Chicago?&lt;/div&gt;&lt;div&gt;Ans: Select e.ename,d.dname,e.sal,e.comm from emp e,dept d where e.deptno=d.deptno and sal between 2000 and 5000;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:57) Display those employees whose salary is greater than his managers salary?&lt;/div&gt;&lt;div&gt;Ans: Select e.ename,e.sal,e1.ename,e1.sal from emp e,e1 where e.mgr=e1.empno and e.sal&amp;gt;e1.sal;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:58) Display those employees who are working in the same dept where his manager is work?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,e.deptno,e1.ename,e1.deptno from emp e,e1 where e.mgr=e1.empno and e.deptno=e1.deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:59) Display those employees who are not working under any Manager?&lt;/div&gt;&lt;div&gt;Ans: select ename from emp where mgr is null;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:60) Display the grade and employees name for the deptno 10 or 30 but grade is not 4 while joined the company before 31-DEC-82?&lt;/div&gt;&lt;div&gt;Ans: select ename,grade,deptno,sal from emp ,salgrade where ( grade,sal) in&lt;/div&gt;&lt;div&gt;( select grade,sal from salgrade,emp where sal between losal and hisal)&lt;/div&gt;&lt;div&gt;and grade!=4 and deptno in (10,30) and hiredate&amp;lt;’31-Dec-82′;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:61) Update the salary of each employee by 10% increment who are not eligible for commission?&lt;/div&gt;&lt;div&gt;Ans: update emp set sal= (sal+(sal*0.10)) where comm is null;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:62) Delete those employees who joined the company before 31-Dec-82 while their department Location is New York or Chicago?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,e.hiredate,d.loc from emp e,dept d where&lt;/div&gt;&lt;div&gt;e.deptno=d.deptno and hiredate&amp;lt;’31-Dec-82′ and d.loc in(‘NEW YORK’,’CHICAGO’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:63) Display employee name ,job,deptname,loc for all who are working as manager?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,e.job,d.dname,d.loc from emp e,dept d where e.deptno=d.deptno&lt;/div&gt;&lt;div&gt;and e.empno in (select mgr from emp where mgr is not null);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:64) Display those employees whose manager name is jones and also display their manager name?&lt;/div&gt;&lt;div&gt;Ans: select e.ename sub,e1.ename from emp e,e1 where e.mgr=e1.empno and e1.ename=’JONES’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:65) Display name and salary of ford if his salary is equal to hisal of his grade?&lt;/div&gt;&lt;div&gt;Ans: select ename,grade,hisal,sal from emp,salgrade where ename=’FORD’ and sal=hisal;&lt;/div&gt;&lt;div&gt;OR&lt;/div&gt;&lt;div&gt;select grade,sal,hisal from emp,salgrade where ename=’FORD’ and sal between losal and hisal;&lt;/div&gt;&lt;div&gt;OR&lt;/div&gt;&lt;div&gt;select ename,sal,hisal,grade from emp,salgrade where ename=’FORD’&lt;/div&gt;&lt;div&gt;and (grade,sal) in (select grade,hisal from salgrade,emp where&lt;/div&gt;&lt;div&gt;sal between losal and hisal);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q66) Display employee name ,job,deptname,his manager name ,his grade and make an under department wise?&lt;/div&gt;&lt;div&gt;Ans: select e.ename sub,e1.ename sup,e.job,d.dname ,grade from emp e,e1,salgrade,dept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno group by d.deptno,e.ename,e1.ename,e.job,d.dname,grade;&lt;/div&gt;&lt;div&gt;OR&lt;/div&gt;&lt;div&gt;select e.ename sub,e1.ename sup,e.job,d.dname ,grade from emp e,e1,salgrade,tvsdept d where e.mgr=e1.empno and e.sal between losal and hisal and e.deptno=d.deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:67) List out all the employee names ,job,salary,grade and deptname for every one in a company except ‘CLERK’ . Sort on salary display the highest salary?&lt;/div&gt;&lt;div&gt;Ans: select e.ename ,e.job,e.sal,d.dname ,grade from emp e,salgrade,dept d where (e.deptno=d.deptno and e.sal between losal and hisal ) order by e.sal desc;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:68) Display employee name,job abd his manager .Display also employees who are with out managers?&lt;/div&gt;&lt;div&gt;Ans: select e.ename ,e1.ename,e.job,e.sal,d.dname from emp e,e1,dept d where e.mgr=e1.empno(+) and e.deptno=d.deptno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:69) Display Top 5 employee of a Company?&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:70) Display the names of those employees who are getting the highest salary?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal from emp where sal in (select max(sal) from emp);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:71) Display those employees who are working as manager?&lt;/div&gt;&lt;div&gt;Ans: select e2.ename from emp e1,e2 where e1.mgr=e2.empno and e2.empno is not null;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:72) Count th number of employees who are working as managers (Using set opetrator)?&lt;/div&gt;&lt;div&gt;Ans: select d.dname from dept d where length(d.dname) in (select count(*) from emp e where e.deptno!=d.deptno group by e.deptno);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:73) Display the name of the dept those employees who joined the company on the same date?&lt;/div&gt;&lt;div&gt;Ans: select a.ename,b.ename from emp a,emp b where a.hiredate=b.hiredate and a.empno!=b.empno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:74) Display those employees whose grade is equal to any number of sal but not equal to first number of sal?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,grade ,substr(sal,grade,1) from emp,salgrade where&lt;/div&gt;&lt;div&gt;grade!=substr(sal,1,1) and grade = substr(sal,grade,1)&lt;/div&gt;&lt;div&gt;and sal between losal and hisal;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:75) Count the no of employees working as manager using set operation?&lt;/div&gt;&lt;div&gt;Ans: Select count(empno) from emp where&lt;/div&gt;&lt;div&gt;empno in (select a.empno from emp a&lt;/div&gt;&lt;div&gt;intersect&lt;/div&gt;&lt;div&gt;select b.mgr from emp b);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:76) Display the name of employees who joined the company on the same date?&lt;/div&gt;&lt;div&gt;Ans: select a.ename,b.ename from emp a,emp b where a.hiredate=b.hiredate and a.empno!=b.empno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:77) Display the manager who is having maximum number of employees working under him?&lt;/div&gt;&lt;div&gt;Ans: select e2.ename,count(*) from emp e1,e2 where e1.mgr=e2.empno group by e2.ename Having count(*)=(select max(count(*)) from emp e1,e2 where e1.mgr=e2.empno group by e2.ename);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:78) List out the employee name and salary increased by 15% and express as whole number of Dollars?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,lpad(translate(sal,sal,((sal +(sal*0.15))/50)),5,’$’) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:79) Produce the output of the emptable “EMPLOYEE_AND JOB” for ename and job ?&lt;/div&gt;&lt;div&gt;Ans: select ename”EMPLOYEE_AND”,job”JOB” FROM EMP;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:80) Lust of employees with hiredate in the format of ‘June 4 1988′?&lt;/div&gt;&lt;div&gt;Ans: select ename,to_char(hiredate,’Month dd yyyy’) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:81) print list of employees displaying ‘Just salary’ if more than 1500 if exactly 1500 display ‘on taget’ if less than 1500 display below 1500?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,&lt;/div&gt;&lt;div&gt;(&lt;/div&gt;&lt;div&gt;case when sal &amp;lt; 1500 then&lt;/div&gt;&lt;div&gt;‘Below_Target’&lt;/div&gt;&lt;div&gt;when sal=1500 then&lt;/div&gt;&lt;div&gt;‘On_Target’&lt;/div&gt;&lt;div&gt;when sal &amp;gt; 1500 then&lt;/div&gt;&lt;div&gt;‘Above_Target’&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;‘kkkkk’&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;)&lt;/div&gt;&lt;div&gt;from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:82) Which query to calculate the length of time any employee has been with the company&lt;/div&gt;&lt;div&gt;Ans: select hiredate,to_char(hiredate,’ HH:MI:SS’) FROM emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:83) Given a string of the format ‘nn/nn’ . Verify that the first and last 2 characters are numbers .And that the middle character is ‘/’ Print the expressions ‘Yes’ IF valid ‘NO’ of not valid . Use the following values to test your solution’12/54′,01/1a,’99/98′?&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:84) Employes hire on OR Before 15th of any month are paid on the last friday of that month those hired after 15th are paid the last friday of th following month .print a list of employees .their hiredate and first pay date sort those who se salary contains first digit of their deptno?&lt;/div&gt;&lt;div&gt;Ans: select ename,hiredate, LAST_DAY ( next_day(hiredate,’Friday’)),&lt;/div&gt;&lt;div&gt;(&lt;/div&gt;&lt;div&gt;case when to_char(hiredate,’dd’) &amp;lt;=(’15’) then&lt;/div&gt;&lt;div&gt;LAST_DAY ( next_day(hiredate,’Friday’))&lt;/div&gt;&lt;div&gt;when to_char(hiredate,’dd’)&amp;gt;(’15’) then&lt;/div&gt;&lt;div&gt;LAST_DAY( next_day(add_months(hiredate,1),’Friday’))&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;)&lt;/div&gt;&lt;div&gt;from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:85) Display those managers who are getting less than his employees salary?&lt;/div&gt;&lt;div&gt;Ans: select a.empno,a.ename ,a.sal,b.sal,b.empno,b.ename from emp a, emp b where a.mgr=b.empno and a.sal&amp;gt;b.sal;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:86) Print the details of employees who are subordinates to BLAKE?&lt;/div&gt;&lt;div&gt;Ans: select a.empno,a.ename ,b.ename from emp a, emp b where a.mgr=b.empno&lt;/div&gt;&lt;div&gt;and b.ename=’BLAKE’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:87) Display those employees whose salary is equal to average of maximum and minimum?&lt;/div&gt;&lt;div&gt;Ans: select * from emp&lt;/div&gt;&lt;div&gt;where sal=(select (max(sal)+min(sal))/2 from emp);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:89) Select count of employees in each department where count &amp;gt;3?&lt;/div&gt;&lt;div&gt;Ans: select count(*) from emp group by deptno having count(*)&amp;gt;3&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:90) Display dname where atleast three are working and display only deptname?&lt;/div&gt;&lt;div&gt;Ans: select d.dname from dept d, emp e where e.deptno=d.deptno group by d.dname having count(*)&amp;gt;3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:91) Display name of those managers name whose salary is more than average salary of Company?&lt;/div&gt;&lt;div&gt;Ans: select distinct e1.ename,e1.sal from emp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal&amp;gt; (select avg(sal) from emp);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:92) Display those managers name whose salary is more than average salary salary of his employees?&lt;/div&gt;&lt;div&gt;Ans: select distinct e1.ename,e1.sal from emp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e1.sal&amp;gt;any (select avg(sal) from emp group by deptno);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:93) Display employee name,sal,comm and netpay for those employees whose netpay is greater than or equal to any other employee salary of the company?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,NVL(comm,0),sal+NVL(comm,0) from emp where&lt;/div&gt;&lt;div&gt;sal+NVL(comm,0) &amp;gt;any (select e.sal from emp e );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:94) Display those employees whose salary is less than his manager but more than salary of other managers?&lt;/div&gt;&lt;div&gt;Ans: select e.ename sub,e.sal from emp e,e1,dept d where&lt;/div&gt;&lt;div&gt;e.deptno=d.deptno and e.mgr=e1.empno&lt;/div&gt;&lt;div&gt;and e.sal&amp;lt;e1.sal&lt;/div&gt;&lt;div&gt;and e.sal &amp;gt;any (select e2.sal from emp e2, e,dept d1 where&lt;/div&gt;&lt;div&gt;e.mgr=e2.empno and d1.deptno=e.deptno);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:95) Display all employees names with total sal of company with each employee name?&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:96) Find the last 5(least) employees of company?&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:97) Find out the number of employees whose salary is greater than their managers salary?&lt;/div&gt;&lt;div&gt;Ans: select e.ename,e.sal,e1.ename,e1.sal from emp e,e1,dept d where e.deptno=d.deptno and e.mgr=e1.empno and e.sal&amp;gt;e1.sal;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:98) Display the manager who are not working under president but they are working under any other manager?&lt;/div&gt;&lt;div&gt;Ans: select e2.ename from emp e1,emp e2,emp e3 where e1.mgr=e2.empno and e2.mgr=e3.empno and e3.job!=’PRESIDENT’;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:99) Delete those department where no employee working?&lt;/div&gt;&lt;div&gt;Ans: delete from emp where empno is null;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Q:100) Delete those records from emp table whose deptno not available in dept table?&lt;/div&gt;&lt;div&gt;Ans: delete from emp e where e.deptno not in (select deptno from dept);&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #ffa400;&quot;&gt;SQL Queries Set 5&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/h3&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:1) Display those enames whose salary is out of grade available in salgrade table?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select empno,sal from emp where sal&amp;lt;(select min(LOSAL) from salgrade )&lt;/div&gt;&lt;div&gt;OR sal&amp;gt;(select max(hisal) from salgrade);Q:2) Display employee name,sal,comm and whose netpay is greater than any other in the company?&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,comm,sal+comm from emp where sal+comm&amp;gt;any&lt;/div&gt;&lt;div&gt;(select sal+comm from emp );&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:3) Display name of those employees who are going to retire 31-Dec-99 if maximum job period is 30 years?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select empno, hiredate,sysdate, to_char(sysdate,’yyyy’) -to_char(hiredate,’yyyy’) from emp where to_char(sysdate,’yyyy’) – to_char(hiredate,’yyyy’)=30;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:4) Display those employees whose salary is odd value?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename ,sal from emp where mod(sal,2)!=0;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:5) Display those employees whose salary contains atleast 3 digits?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,sal from emp where length(sal)=3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:6) Display those employees who joined in the company in the month of Dec?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: Select empno,ename from emp where trim(to_char(hiredate,’Mon’))=trim(‘DEC’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:7) Display those employees whose name contains A?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename from emp where ename like(‘%A%’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:8) Display those employees whose deptno is available in salary?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,sal from emp where deptno in (select distinct sal from emp);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:9) Display those employees whose first 2 characters from hiredate – last 2 characters sal?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select empno,hiredate,sal from emp where trim(substr(hiredate,1,2))=trim(substr(sal,-2,2));&lt;/div&gt;&lt;div&gt;or&lt;/div&gt;&lt;div&gt;select hiredate,sal from emp where to_Char(hiredate,’dd’)=trim(substr(sal,-2,2));&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:10) Display those employeess whose 10% of salary is equal to the year joining?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename ,sal,0.10*sal from emp where 0.10*sal=trim(to_char(hiredate,’yy’));&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:11) Display those employees who are working in sales or research?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select e.ename from emp e ,dept d where e.deptno=d.deptno and d.dname in(‘SALES’,’RESEARCH’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:12) Display the grade of jones?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,grade from emp,salgrade where ( grade,sal) =&lt;/div&gt;&lt;div&gt;(select grade,sal from salgrade,emp where sal between losal and hisal and ename=’JONES’);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:13) Display those employees who joined the company before 15th of the month?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename ,hiredate from emp where hiredate&amp;lt;’15-Jul-02′ and hiredate &amp;gt;=’01-jul-02′;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:14) Display those employees who has joined before 15th of the month?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename ,hiredate from emp where hiredate&amp;lt;’15-Jul-02′&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:15) Delete those records where no of employees in particular department is less than 3?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: delete from emp where deptno in (select deptno from emp group by deptno having count(*)&amp;nbsp; ;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:16) Delete those employeewho joined the company 10 years back from today?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: delete from emp where empno in (select empno from emp&lt;/div&gt;&lt;div&gt;where to_char(sysdate,’yyyy’)- to_char(hiredate,’yyyy’)&amp;gt;=10);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:16B) Display the deptname the number of characters of which is equal to no of employee in any other department?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:17) Display the deptname where no employee is working?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select deptno from emp where empno is null;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:18) Display those employees who are working as manager?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select e2.ename from emp e1,e2 where e1.mgr=e2.empno and e2.empno is not null;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:19) Count th number of employees who are working as managers (Using set opetrator)?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select d.dname from dept d where length(d.dname) in (select count(*) from emp e where e.deptno!=d.deptno group by e.deptno);&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:20) Display the name of the dept those employees who joined the company on the same date?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select a.ename,b.ename from emp a,emp b where a.hiredate=b.hiredate and a.empno!=b.empno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:21) Display those employees whose grade is equal to any number of sal but not equal to first number of sal?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,grade ,substr(sal,grade,1) from emp,salgrade where&lt;/div&gt;&lt;div&gt;grade!=substr(sal,1,1) and grade = substr(sal,grade,1)&lt;/div&gt;&lt;div&gt;and sal between losal and hisal;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:22) Count the no of employees working as manager using set operation?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: Select count(empno) from emp where&lt;/div&gt;&lt;div&gt;empno in (select a.empno from emp a&lt;/div&gt;&lt;div&gt;intersect&lt;/div&gt;&lt;div&gt;select b.mgr from emp b);&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:23) Display the name of employees who joined the company on the same date?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select a.ename,b.ename from emp a,emp b where a.hiredate=b.hiredate and a.empno!=b.empno;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:24) Display the manager who is having maximum number of employees working under him?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select e2.ename,count(*) from emp e1,e2 where e1.mgr=e2.empno group by e2.ename Having count(*)=(select max(count(*)) from emp e1,e2 where e1.mgr=e2.empno group by e2.ename);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:25) List out the employee name and salary increased by 15% and express as whole number of Dollars?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,lpad(translate(sal,sal,((sal +(sal*0.15))/50)),5,’$’) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:26) Produce the output of the emptable “EMPLOYEE_AND JOB” for ename and job ?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename”EMPLOYEE_AND”,job”JOB” FROM EMP;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:27) Lust of employees with hiredate in the format of ‘June 4 1988′?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,to_char(hiredate,’Month dd yyyy’) from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:28) print list of employees displaying ‘Just salary’ if more than 1500 if exactly 1500 display ‘on taget’ if less than 1500 display below 1500?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,sal,&lt;/div&gt;&lt;div&gt;(&lt;/div&gt;&lt;div&gt;case when sal &amp;lt; 1500 then&lt;/div&gt;&lt;div&gt;‘Below_Target’&lt;/div&gt;&lt;div&gt;when sal=1500 then&lt;/div&gt;&lt;div&gt;‘On_Target’&lt;/div&gt;&lt;div&gt;when sal &amp;gt; 1500 then&lt;/div&gt;&lt;div&gt;‘Above_Target’&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;‘kkkkk’&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;)&lt;/div&gt;&lt;div&gt;from emp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:29) Which query to calculate the length of time any employee has been with the company&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select hiredate,to_char(hiredate,’ HH:MI:SS’) FROM emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:30) Given a string of the format ‘nn/nn’ . Verify that the first and last 2 characters are numbers .And that the middle character is ‘/’ Print the expressions ‘Yes’ IF valid ‘NO’ of not valid . Use the following values to test your solution’12/54′,01/1a,’99/98′?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:31) Employes hire on OR Before 15th of any month are paid on the last friday of that month those hired after 15th are paid the last friday of th following month .print a list of employees .their hiredate and first pay date sort those who se salary contains first digit of their deptno?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select ename,hiredate, LAST_DAY ( next_day(hiredate,’Friday’)),&lt;/div&gt;&lt;div&gt;(&lt;/div&gt;&lt;div&gt;case when to_char(hiredate,’dd’) &amp;lt;=(’15’) then&lt;/div&gt;&lt;div&gt;LAST_DAY ( next_day(hiredate,’Friday’))&lt;/div&gt;&lt;div&gt;when to_char(hiredate,’dd’)&amp;gt;(’15’) then&lt;/div&gt;&lt;div&gt;LAST_DAY( next_day(add_months(hiredate,1),’Friday’))&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;)&lt;/div&gt;&lt;div&gt;from emp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:32) Display those managers who are getting less than his employees salary?&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select a.empno,a.ename ,a.sal,b.sal,b.empno,b.ename from emp a, emp b where a.mgr=b.empno and a.sal&amp;gt;b.sal;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Q:33) Print the details of employees who are subordinates to BLAKE?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ans: select a.empno,a.ename ,b.ename from emp a, emp b where a.mgr=b.empno&lt;/div&gt;&lt;div&gt;and b.ename=’BLAKE&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;******************************************************************************&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;What is DBMS ?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;The database management system is a collection of programs that enables user to store, retrieve, update and delete information from a database.&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;2. What is RDBMS ?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Relational Database Management system (RDBMS) is a database management system (DBMS) that is based on the relational model. Data from relational database can be accessed or reassembled in many different ways without having to reorganize the database tables. Data from relational database can be accessed using an API , Structured Query Language (SQL).&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;3. What is SQL ?&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Structured Query Language(SQL) is a language designed specifically for communicating with databases. SQL is an ANSI (American National Standards Institute) standard.&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;4. What are the different type of SQL’s statements ?&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;This is one of the most frequently asked SQL Interview Questions for freshers. SQL statements are broadly classified into three. They are&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;1. DDL – Data Definition Language&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;DDL is used to define the structure that holds the data. For example, Create, Alter, Drop and Truncate table.&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;2. DML– Data Manipulation Language&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;DML is used for manipulation of the data itself. Typical operations are Insert, Delete, Update and retrieving the data from the table. The Select statement is considered as a limited version of the DML, since it can’t change the data in the database. But it can perform operations on data retrieved from the DBMS, before the results are returned to the calling function.&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;3. DCL– Data Control Language&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;DCL is used to control the visibility of data like granting database access and set privileges to create tables, etc. Example – Grant, Revoke access permission to the user to access data in the database.&lt;/p&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-0&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;5. What are the Advantages of SQL ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;1. SQL is not a proprietary language used by specific database vendors. Almost every major DBMS supports SQL, so learning this one language will enable programmers to interact with any database like ORACLE, SQL ,MYSQL etc.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;2. SQL is easy to learn. The statements are all made up of descriptive English words, and there aren’t that many of them.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;3. SQL is actually a very powerful language and by using its language elements you can perform very complex and sophisticated database operations.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;6. what is a field in a database ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A field is an area within a record reserved for a specific piece of data.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Examples: Employee Name, Employee ID, etc.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Must Read – Top 100+ SQL Query Interview Questions and Answers and SQL Tutorial&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7. What is a Record in a database ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A record is the collection of values / fields of a specific entity: i.e. an Employee, Salary etc.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8. What is a Table in a database ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A table is a collection of records of a specific type. For example, employee table, salary table etc.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;9. What is a database transaction?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Database transaction takes database from one consistent state to another. At the end of the transaction the system must be in the prior state if the transaction fails or the status of the system should reflect the successful completion if the transaction goes through.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;10. What are properties of a transaction?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Expect this SQL Interview Questions as a part of an any interview, irrespective of your experience. Properties of the transaction can be summarized as ACID Properties.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;1. Atomicity&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;A transaction consists of many steps. When all the steps in a transaction get completed, it will get reflected in DB or if any step fails, all the transactions are rolled back.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;2. Consistency&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;The database will move from one consistent state to another, if the transaction succeeds and remain in the original state, if the transaction fails.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;3. Isolation&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Every transaction should operate as if it is the only transaction in the system.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;4. Durability&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Once a transaction has completed successfully, the updated rows/records must be available for all other transactions on a permanent basis.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;11. What is a Database Lock ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Database lock tells a transaction, if the data item in questions is currently being used by other transactions.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;12. What are the type of locks ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;1. Shared Lock&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;When a shared lock is applied on data item, other transactions can only read the item, but can’t write into it.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;2. Exclusive Lock&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;When an exclusive lock is applied on data item, other transactions can’t read or write into the data item.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Database Normalization Interview Questions&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;13. What are the different type of normalization?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;In database design, we start with one single table, with all possible columns. A lot of redundant data would be present since it’s a single table. The process of removing the redundant data, by splitting up the table in a well defined fashion is called normalization.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;1. First Normal Form (1NF)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;A relation is said to be in first normal form if and only if all underlying domains contain atomic values only. After 1NF, we can still have redundant data.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;2. Second Normal Form (2NF)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;A relation is said to be in 2NF if and only if it is in 1NF and every non key attribute is fully dependent on the primary key. After 2NF, we can still have redundant data.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;3. Third Normal Form (3NF)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;A relation is said to be in 3NF, if and only if it is in 2NF and every non key attribute is non-transitively dependent on the primary key.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Database Keys and Constraints SQL Interview Questions&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;14. What is a primary key?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A primary key is a column whose values uniquely identify every row in a table. Primary key values can never be reused. If a row is deleted from the table, its primary key may not be assigned to any new rows in the future. To define a field as primary key, following conditions had to be met :&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;1. No two rows can have the same primary key value.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Every row must have a primary key value.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. The primary key field cannot be null.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Value in a primary key column can never be modified or updated, if any foreign key refers to that primary key.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;15. What is a Composite Key ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A Composite primary key is a type of candidate key, which represents a set of columns whose values uniquely identify every row in a table.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;For example – if “Employee_ID” and “Employee Name” in a table is combined to uniquely identify a row its called a Composite Key.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;16. What is a Composite Primary Key ?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;A Composite primary key is a set of columns whose values uniquely identify every row in a table. What it means is that, a table which contains composite primary key will be indexed based on the columns specified in the primary key. This key will be referred in Foreign Key tables.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;For example – if the combined effect of columns, “Employee_ID” and “Employee Name” in a table is required to uniquely identify a row, its called a Composite Primary Key. In this case, both the columns will be represented as primary key.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;17. What is a Foreign Key ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;When a “one” table’s primary key field is added to a related “many” table in order to create the common field which relates the two tables, it is called a foreign key in the “many” table.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;For example, the salary of an employee is stored in salary table. The relation is established via foreign key column “Employee_ID_Ref” which refers “Employee_ID” field in the Employee table.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;18. What is a Unique Key ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Unique key is same as primary with the difference being the existence of null. Unique key field allows one value as NULL value.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;SQL Insert, Update and Delete Commands Interview Questions&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;19. Define SQL Insert Statement ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;SQL INSERT statement is used to add rows to a table. For a full row insert, SQL Query should start with “insert into “ statement followed by table name and values command, followed by the values that need to be inserted into the table. The insert can be used in several ways:&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;1. To insert a single complete row.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. To insert a single partial row.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;20. Define SQL Update Statement ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;SQL Update is used to update data in a row or set of rows specified in the filter condition.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;The basic format of an SQL UPDATE statement is, Update command followed by table to be updated and SET command followed by column names and their new values followed by filter condition that determines which rows should be updated.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;21. Define SQL Delete Statement ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;SQL Delete is used to delete a row or set of rows specified in the filter condition.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;The basic format of an SQL DELETE statement is, DELETE FROM command followed by table name followed by filter condition that determines which rows should be updated.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;22. What are wild cards used in database for Pattern Matching ?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;SQL Like operator is used for pattern matching. SQL ‘Like’ command takes more time to process. So before using “like” operator, consider suggestions given below on when and where to use wild card search.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;1) Don’t overuse wild cards. If another search operator will do, use it instead.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) When you do use wild cards, try not to use them at the beginning of the search pattern, unless absolutely necessary. Search patterns that begin with wild cards are the slowest to process.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3) Pay careful attention to the placement of the wild card symbols. If they are misplaced, you might not return the data you intended.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;23. Define Join and explain different type of joins?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Another frequently asked SQL Interview Questions on Joins. In order to avoid data duplication, data is stored in related tables. Join keyword is used to fetch data from related tables. “Join” return rows when there is at least one match in both table. Type of joins are&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Right Join&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Return all rows from the right table, even if there are no matches in the left table.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Outer Join&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Left Join&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Return all rows from the left table, even if there are no matches in the right table.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Full Join&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Return rows when there is a match in one of the tables.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;24. What is Self-Join?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Self-join is query used to join a table to itself. Aliases should be used for the same table comparison.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;25. What is Cross Join?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Cross Join will return all records where each row from the first table is combined with each row from the second table.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Database Views Interview Questions&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;26. What is a view?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;The views are virtual tables. Unlike tables that contain data, views simply contain queries that dynamically retrieve data when used.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;27. What is a materialized view?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Materialized views are also a view but are disk based. Materialized views get updates on specific duration, base upon the interval specified in the query definition. We can index materialized view.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;28. What are the advantages and disadvantages of views in a database?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Advantages:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;1. Views don’t store data in a physical location.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. The view can be used to hide some of the columns from the table.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Views can provide Access Restriction, since data insertion, update and deletion is not possible with the view.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Disadvantages:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;1. When a table is dropped, associated view become irrelevant.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Since the view is created when a query requesting data from view is triggered, its a bit slow.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. When views are created for large tables, it occupies more memory.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;29. What is a stored procedure?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Stored Procedure is a function which contains a collection of SQL Queries. The procedure can take inputs , process them and send back output.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;30. What are the advantages of a stored procedure?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Stored Procedures are precomplied and stored in the database. This enables the database to execute the queries much faster. Since many queries can be included in a stored procedure, round trip time to execute multiple queries from source code to database and back is avoided.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;31. What is a trigger?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Database triggers are sets of commands that get executed when an event(Before Insert, After Insert, On Update, On delete of a row) occurs on a table, views.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;32. Explain the difference between DELETE , TRUNCATE and DROP commands?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Once delete operation is performed, Commit and Rollback can be performed to retrieve data.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Once the truncate statement is executed, Commit and Rollback statement cannot be performed. Where condition can be used along with delete statement but it can’t be used with truncate statement.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;Drop command is used to drop the table or keys like primary,foreign from a table.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;33. What is the difference between Cluster and Non cluster Index?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A clustered index reorders the way records in the table are physically stored. There can be only one clustered index per table. It makes data retrieval faster.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;A non clustered index does not alter the way it was stored but creates a completely separate object within the table. As a result insert and update command will be faster.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;34. What is Union, minus and Interact commands?&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;MINUS operator is used to return rows from the first query but not from the second query. INTERSECT operator is used to return rows returned by both the queries.&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;—————————————————————————————————————————————————-&lt;/p&gt;&lt;header class=&quot;grid-row has-top_border page_title-wrapper&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444;&quot;&gt;&lt;div class=&quot;grid-row-inner has-big_padding is-first page_title for-interview_questions&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/header&gt;&lt;div class=&quot;grid-row has-top_border is-gray&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444;&quot;&gt;&lt;div class=&quot;grid-row-inner has-big_padding&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestions_list&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-28&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What does&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;do? What is the difference between&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;merges the contents of two structurally-compatible tables into a single combined table. The difference between&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;and&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;is that&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;will omit duplicate records whereas&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;will include duplicate records.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;It is important to note that the performance of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;will typically be better than&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;, since&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;requires the server to do the additional work of removing any duplicates. So, in cases where is is certain that there will not be any duplicates, or where having duplicates is not a problem, use of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;would be recommended for performance reasons.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-29&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;List and explain the different types of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;clauses supported in ANSI-standard SQL.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;ANSI-standard SQL specifies five types of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;clauses as follows:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;INNER JOIN&lt;/code&gt;&amp;nbsp;(a.k.a. “simple join”): Returns all rows for which there is at least one match in BOTH tables.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;This is the default type of join if no specific&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;type is specified.&lt;/em&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;LEFT JOIN&lt;/code&gt;&amp;nbsp;(or&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;LEFT OUTER JOIN&lt;/code&gt;): Returns all rows from the left table, and the matched rows from the right table; i.e., the results will contain&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;all&lt;/em&gt;&amp;nbsp;records from the left table, even if the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;condition doesn’t find any matching records in the right table. This means that if the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;ON&lt;/code&gt;&amp;nbsp;clause doesn’t match any records in the right table, the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;will still return a row in the result for that record in the left table, but with NULL in each column from the right table.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RIGHT JOIN&lt;/code&gt;&amp;nbsp;(or&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RIGHT OUTER JOIN&lt;/code&gt;): Returns all rows from the right table, and the matched rows from the left table. This is the exact opposite of a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;LEFT JOIN&lt;/code&gt;; i.e., the results will contain&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;all&lt;/em&gt;&amp;nbsp;records from the right table, even if the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;condition doesn’t find any matching records in the left table. This means that if the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;ON&lt;/code&gt;&amp;nbsp;clause doesn’t match any records in the left table, the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/code&gt;&amp;nbsp;will still return a row in the result for that record in the right table, but with NULL in each column from the left table.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;FULL JOIN&lt;/code&gt;&amp;nbsp;(or&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;FULL OUTER JOIN&lt;/code&gt;): Returns all rows for which there is a match in EITHER of the tables. Conceptually, a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;FULL JOIN&lt;/code&gt;&amp;nbsp;combines the effect of applying both a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;LEFT JOIN&lt;/code&gt;&amp;nbsp;and a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RIGHT JOIN&lt;/code&gt;; i.e., its result set is equivalent to performing a&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;of the results of left and right outer queries.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;CROSS JOIN&lt;/code&gt;: Returns all records where each row from the first table is combined with each row from the second table (i.e., returns the Cartesian product of the sets of rows from the joined tables). Note that a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;CROSS JOIN&lt;/code&gt;&amp;nbsp;can either be specified using the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;CROSS JOIN&lt;/code&gt;&amp;nbsp;syntax (“explicit join notation”) or (b) listing the tables in the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;FROM&lt;/code&gt;&amp;nbsp;clause separated by commas without using a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;clause to supply join criteria (“implicit join notation”).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-30&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Consider the following two query results:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT count(*) AS total FROM orders;

+-------+
| total |
+-------+
|  100  |
+-------+

SELECT count(*) AS cust_123_total FROM orders WHERE customer_id = &#39;123&#39;;

+----------------+
| cust_123_total |
+----------------+
|       15       |
+----------------+
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given the above query results, what will be the result of the query below?&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;SELECT count(*) AS cust_not_123_total FROM orders WHERE customer&lt;/span&gt;_id &amp;lt;&amp;gt; &#39;123&#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;a class=&quot;iquestion-answer_link&quot; rel=&quot;noopener noreferrer&quot; style=&quot;box-sizing: border-box; color: #1185d7; transition: all 0.3s ease-in-out 0s;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;answer&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The obvious answer is 85 (i.e, 100 – 15). However, that is not necessarily correct. Specifically, any records with a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;customer_id&lt;/code&gt;&amp;nbsp;of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NULL&lt;/code&gt;&amp;nbsp;will&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;not&lt;/em&gt;&amp;nbsp;be included in&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;either&lt;/em&gt;&amp;nbsp;count (i.e., they won’t be included in&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;cust_123_total&lt;/code&gt;, nor will they be included in&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;cust_not_123_total&lt;/code&gt;). For example, if exactly one of the 100 customers has a&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NULL&lt;/code&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;customer_id&lt;/code&gt;, the result of the last query will be:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;+--------- ----------+
| cust_not_123_total |
+--------------------+
|         84         |
+--------------------+
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-31&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What will be the result of the query below? Explain your answer and provide a version that behaves correctly.&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;select case when null = null then &#39;Yup&#39; else &#39;Nope&#39; end as Result;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This query will actually yield “Nope”, seeming to imply that&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;null&lt;/code&gt;&amp;nbsp;is not equal to itself! The reason for this is that the proper way to compare a value to&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;null&lt;/code&gt;&amp;nbsp;in SQL is with the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;is&lt;/code&gt;&amp;nbsp;operator, not with&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;=&lt;/code&gt;.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Accordingly, the correct version of the above query that yields the expected result (i.e., “Yup”) would be as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;select case when null is null then &#39;Yup&#39; else &#39;Nope&#39; end as Result;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-32&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given the following tables:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;sql&amp;gt; SELECT * FROM runners;
+----+--------------+
| id | name         |
+----+--------------+
|  1 | John Doe     |
|  2 | Jane Doe     |
|  3 | Alice Jones  |
|  4 | Bobby Louis  |
|  5 | Lisa Romero  |
+----+--------------+

sql&amp;gt; SELECT * FROM races;
+----+----------------+-----------+
| id | event          | winner_id |
+----+----------------+-----------+
|  1 | 100 meter dash |  2        |
|  2 | 500 meter dash |  3        |
|  3 | cross-country  |  2        |
|  4 | triathalon     |  NULL     |
+----+----------------+-----------+
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What will be the result of the query below?&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT * FROM runners WHERE id NOT IN (SELECT winner_id FROM races)
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Explain your answer and also provide an alternative version of this query that will avoid the issue that it exposes.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;a class=&quot;iquestion-answer_link&quot; rel=&quot;noopener noreferrer&quot; style=&quot;box-sizing: border-box; color: #1185d7; transition: all 0.3s ease-in-out 0s;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Surprisingly, given the sample data provided, the result of this query will be an empty set. The reason for this is as follows: If the set being evaluated by the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SQL NOT IN&lt;/code&gt;&amp;nbsp;condition contains&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;any&lt;/em&gt;&amp;nbsp;values that are null, then the outer query here will return an empty set, even if there are many runner ids that match winner_ids in the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;races&lt;/code&gt;&amp;nbsp;table.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Knowing this, a query that avoids this issue would be as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT * FROM runners WHERE id NOT IN (SELECT winner_id FROM races WHERE winner_id IS NOT null)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-224&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given two tables created and populated as follows:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;CREATE TABLE dbo.envelope(id int, user_id int);
CREATE TABLE dbo.docs(idnum int, pageseq int, doctext varchar(100));

INSERT INTO dbo.envelope VALUES
  (1,1),
  (2,2),
  (3,3);

INSERT INTO dbo.docs(idnum,pageseq) VALUES
  (1,5),
  (2,6),
  (null,0);
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What will the result be from the following query:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UPDATE docs SET doctext=pageseq FROM docs INNER JOIN envelope ON envelope.id=docs.idnum
WHERE EXISTS (
  SELECT 1 FROM dbo.docs
  WHERE id=envelope.id
);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Answer:-&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The result of the query will be as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;idnum  pageseq  doctext
1      5        5
2      6        6
NULL   0        NULL
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;EXISTS&lt;/code&gt;&amp;nbsp;clause in the above query is a red herring. It will&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;always&lt;/em&gt;&amp;nbsp;be true since&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;ID&lt;/code&gt;&amp;nbsp;is&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;not&lt;/em&gt;&amp;nbsp;a member of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;dbo.docs&lt;/code&gt;. As such, it will refer to the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;envelope&lt;/code&gt;&amp;nbsp;table comparing itself to itself!&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;idnum&lt;/code&gt;&amp;nbsp;value of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NULL&lt;/code&gt;&amp;nbsp;will not be set since the join of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NULL&lt;/code&gt;&amp;nbsp;will not return a result when attempting a match with any value of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;envelope&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-232&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is wrong with this SQL query? Correct it so it executes properly.&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT Id, YEAR(BillingDate) AS BillingYear 
FROM Invoices
WHERE BillingYear &amp;gt;= 2010;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The expression BillingYear in the WHERE clause is invalid. Even though it is defined as an alias in the SELECT phrase, which appears before the WHERE phrase, the logical processing order of the phrases of the statement is different from the written order. Most programmers are accustomed to code statements being processed generally top-to-bottom or left-to-right, but T-SQL processes phrases in a different order.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The correct query should be:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT Id, YEAR(BillingDate) AS BillingYear
FROM Invoices
WHERE YEAR(BillingDate) &amp;gt;= 2010;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-235&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given these contents of the Customers table:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Id	Name			ReferredBy
1	John Doe		NULL
2	Jane Smith		NULL
3	Anne Jenkins		2
4	Eric Branford		NULL
5	Pat Richards		1
6	Alice Barnes		2
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Here is a query written to return the list of customers not referred by Jane Smith:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT Name FROM Customers WHERE ReferredBy &amp;lt;&amp;gt; 2;
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What will be the result of the query? Why? What would be a better way to write it?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Answer:-&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Although there are 4 customers not referred by Jane Smith (including Jane Smith herself), the query will only return one: Pat Richards. All the customers who were referred by nobody at all (and therefore have NULL in their ReferredBy column) don’t show up. But certainly those customers weren’t referred by Jane Smith, and certainly NULL is not equal to 2, so why didn’t they show up?&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;SQL Server uses three-valued logic, which can be troublesome for programmers accustomed to the more satisfying two-valued logic (TRUE or FALSE) most programming languages use. In most languages, if you were presented with two predicates: ReferredBy = 2 and ReferredBy &amp;lt;&amp;gt; 2, you would expect one of them to be true and one of them to be false, given the same value of ReferredBy. In SQL Server, however, if ReferredBy is NULL, neither of them are true and neither of them are false. Anything compared to NULL evaluates to the third value in three-valued logic: UNKNOWN.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The query should be written:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT Name FROM Customers WHERE ReferredBy IS NULL OR ReferredBy &amp;lt;&amp;gt; 2
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Watch out for the following, though!&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT Name FROM Customers WHERE ReferredBy = NULL OR ReferredBy &amp;lt;&amp;gt; 2
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This will return the same faulty set as the original. Why? We already covered that: Anything compared to NULL evaluates to the third value in the three-valued logic: UNKNOWN. That “anything” includes NULL itself! That’s why SQL Server provides the IS NULL and IS NOT NULL operators to specifically check for NULL. Those particular operators will always evaluate to true or false.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Even if a candidate doesn’t have a great amount of experience with SQL Server, diving into the intricacies of three-valued logic in general can give a good indication of whether they have the ability learn it quickly or whether they will struggle with it.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-236&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Considering the database schema displayed in the SQLServer-style diagram below, write a SQL query to return a list of all the invoices. For each invoice, show the Invoice ID, the billing date, the customer’s name, and the name of the customer who referred that customer (if any). The list should be ordered by billing date.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;&quot; scale=&quot;0&quot; src=&quot;https://assets.toptal.io/uploads/blog/image/669/toptal-blog-image-1416228086286.png&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT i.Id, i.BillingDate, c.Name, r.Name AS ReferredByName
FROM Invoices i
 JOIN Customers c ON i.CustomerId = c.Id
 LEFT JOIN Customers r ON c.ReferredBy = r.Id
ORDER BY i.BillingDate;
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This question simply tests the candidate’s ability take a plain-English requirement and write a corresponding SQL query. There is nothing tricky in this one, it just covers the basics:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Did the candidate remember to use a LEFT JOIN instead of an inner JOIN when joining the customer table for the referring customer name? If not, any invoices by customers not referred by somebody will be left out altogether.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Did the candidate alias the tables in the JOIN? Most experienced T-SQL programmers always do this, because repeating the full table name each time it needs to be referenced gets tedious quickly. In this case, the query would actually break if at least the Customer table wasn’t aliased, because it is referenced twice in different contexts (once as the table which contains the name of the invoiced customer, and once as the table which contains the name of the referring customer).&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Did the candidate disambiguate the Id and Name columns in the SELECT? Again, this is something most experienced programmers do automatically, whether or not there would be a conflict. And again, in this case there would be a conflict, so the query would break if the candidate neglected to do so.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Note that this query will not return Invoices that do not have an associated Customer. This may be the correct behavior for most cases (e.g., it is guaranteed that every Invoice is associated with a Customer, or unmatched Invoices are not of interest). However, in order to guarantee that all Invoices are returned no matter what, the Invoices table should be joined with Customers using LEFT JOIN:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT i.Id, i.BillingDate, c.Name, r.Name AS ReferredByName
FROM Invoices i
 LEFT JOIN Customers c ON i.CustomerId = c.Id
 LEFT JOIN Customers r ON c.ReferredBy = r.Id
ORDER BY i.BillingDate;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-239&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Assume a schema of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Emp ( Id, Name, DeptId ) , Dept ( Id, Name)&lt;/code&gt;.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;If there are 10 records in the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Emp&lt;/code&gt;&amp;nbsp;table and 5 records in the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Dept&lt;/code&gt;&amp;nbsp;table, how many rows will be displayed in the result of the following SQL query:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Select * From Emp, Dept
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Explain your answer.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The query will result in 50 rows as a “cartesian product” or “cross join”, which is the default whenever the ‘where’ clause is omitted.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-333&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given a table SALARIES, such as the one below, that has&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;m = male&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;f = female&lt;/code&gt;values. Swap all&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;f&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;m&lt;/code&gt;&amp;nbsp;values (i.e., change all&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;f&lt;/code&gt;&amp;nbsp;values to&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;m&lt;/code&gt;&amp;nbsp;and vice versa) with a single update query and no intermediate temp table.&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Id  Name  Sex  Salary
1   A     m    2500
2   B     f    1500
3   C     m    5500
4   D     f    500
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UPDATE SALARIES SET sex = CASE sex WHEN &#39;m&#39; THEN &#39;f&#39; ELSE &#39;m&#39; END
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90597&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given two tables created as follows&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql&quot; style=&quot;box-sizing: border-box;&quot;&gt;create table test_a(id numeric);

create table test_b(id numeric);

insert into test_a(id) values
  (10),
  (20),
  (30),
  (40),
  (50);

insert into test_b(id) values
  (10),
  (30),
  (50);
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Write a query to fetch values in table&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;test_a&lt;/code&gt;&amp;nbsp;that are and not in&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;test_b&lt;/code&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;without&lt;/span&gt;&amp;nbsp;using the NOT keyword.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In SQL Server, PostgreSQL, and SQLite, this can be done using the&amp;nbsp;&lt;a href=&quot;https://en.wikipedia.org/wiki/Set_operations_(SQL)#EXCEPT_operator&quot; rel=&quot;noopener noreferrer&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot; target=&quot;_blank&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;except&lt;/code&gt;&lt;/a&gt;&amp;nbsp;keyword as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql hljs&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-operator&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;select&lt;/span&gt; * &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;from&lt;/span&gt; test_a
&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;except&lt;/span&gt;
&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;select&lt;/span&gt; * &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;from&lt;/span&gt; test_b;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In Oracle, the&amp;nbsp;&lt;a href=&quot;http://www.techonthenet.com/sql/minus.php&quot; rel=&quot;noopener noreferrer&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot; target=&quot;_blank&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;minus&lt;/code&gt;&lt;/a&gt;&amp;nbsp;keyword is used instead.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;MySQL does not support the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;except&lt;/code&gt;&amp;nbsp;function, so it is necessary to use&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;not in&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90649&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given a table&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;TBL&lt;/code&gt;&amp;nbsp;with a field&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Nmbr&lt;/code&gt;&amp;nbsp;that has rows with the following values:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1&lt;/code&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Write a query to add 2 where&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Nmbr&lt;/code&gt;&amp;nbsp;is 0 and add 3 where&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Nmbr&lt;/code&gt;&amp;nbsp;is 1.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90649&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This can be done as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql hljs&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-operator&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;update&lt;/span&gt; TBL &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;set&lt;/span&gt; Nmbr = &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;when&lt;/span&gt; Nmbr &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;then&lt;/span&gt; Nmbr+&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;else&lt;/span&gt; Nmbr+&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;end&lt;/span&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90665&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Write a SQL query to find the 10th highest employee salary from an&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Employee&lt;/code&gt;&amp;nbsp;table. Explain your answer.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;(Note: You may assume that there are at least 10 records in the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Employee&lt;/code&gt;&amp;nbsp;table.)&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This can be done as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql hljs&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-operator&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;SELECT&lt;/span&gt; TOP (&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;1&lt;/span&gt;) Salary &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;FROM&lt;/span&gt;
(
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;DISTINCT&lt;/span&gt; TOP (&lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;10&lt;/span&gt;) Salary &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;FROM&lt;/span&gt; Employee &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;BY&lt;/span&gt; Salary &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;DESC&lt;/span&gt;
) &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;AS&lt;/span&gt; Emp &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;BY&lt;/span&gt; Salary
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This works as follows:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;First, the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT DISTINCT TOP (10) Salary FROM Employee ORDER BY Salary DESC&lt;/code&gt;&amp;nbsp;query will select the top 10 salaried employees in the table. However, those salaries will be listed in&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;descending&lt;/em&gt;&amp;nbsp;order. That was necessary for the first query to work, but now picking the top 1 from that list will give you the&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;highest&lt;/em&gt;&amp;nbsp;salary not the the&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;10th highest&lt;/em&gt;&amp;nbsp;salary.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Therefore, the second query reorders the 10 records in&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;ascending&lt;/em&gt;&amp;nbsp;order (which the default sort order) and&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;then&lt;/em&gt;&amp;nbsp;selects the top record (which will now be the lowest of those 10 salaries).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Not all databases support the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;TOP&lt;/code&gt;&amp;nbsp;keyword. For example, MySQL and PostreSQL use the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;LIMIT&lt;/code&gt;&amp;nbsp;keyword, as follows:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql hljs&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-operator&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;SELECT&lt;/span&gt; Salary &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;FROM&lt;/span&gt;
(
    &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;DISTINCT&lt;/span&gt; Salary &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;FROM&lt;/span&gt; Employee &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;BY&lt;/span&gt; Salary &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;DESC&lt;/span&gt; LIMIT &lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;10&lt;/span&gt;
) &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;AS&lt;/span&gt; Emp &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;BY&lt;/span&gt; Salary LIMIT &lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90761&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Write a SQL query using&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;(not&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;) that uses the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;clause to eliminate duplicates. Why might you want to do this?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;You can avoid duplicates using&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION ALL&lt;/code&gt;&amp;nbsp;and still run much faster than&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION DISTINCT&lt;/code&gt;&amp;nbsp;(which is actually same as UNION) by running a query like this:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT * FROM mytable WHERE a=X UNION ALL SELECT * FROM mytable WHERE b=Y AND a!=X
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The key is the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;AND a!=X&lt;/code&gt;&amp;nbsp;part. This gives you the benefits of the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION&lt;/code&gt;&amp;nbsp;(a.k.a.,&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;UNION DISTINCT&lt;/code&gt;) command, while avoiding much of its performance hit.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90762&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given the following tables:&lt;/span&gt;&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql&quot; style=&quot;box-sizing: border-box;&quot;&gt;SELECT * FROM users;

user_id  username
1        John Doe                                                                                            
2        Jane Don                                                                                            
3        Alice Jones                                                                                         
4        Lisa Romero

SELECT * FROM training_details;

user_training_id  user_id  training_id  training_date
1                 1        1            &quot;2015-08-02&quot;
2                 2        1            &quot;2015-08-03&quot;
3                 3        2            &quot;2015-08-02&quot;
4                 4        2            &quot;2015-08-04&quot;
5                 2        2            &quot;2015-08-03&quot;
6                 1        1            &quot;2015-08-02&quot;
7                 3        2            &quot;2015-08-04&quot;
8                 4        3            &quot;2015-08-03&quot;
9                 1        4            &quot;2015-08-03&quot;
10                3        1            &quot;2015-08-02&quot;
11                4        2            &quot;2015-08-04&quot;
12                3        2            &quot;2015-08-02&quot;
13                1        1            &quot;2015-08-02&quot;
14                4        3            &quot;2015-08-03&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Write a query to to get the list of users who took the a training lesson more than once in the same day, grouped by user and training lesson, each ordered from the most recent lesson date to oldest date.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;language-sql hljs&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-operator&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;SELECT&lt;/span&gt;
      u.user_id,
      username,
      training_id,
      training_date,
      &lt;span class=&quot;hljs-aggregate&quot; style=&quot;box-sizing: border-box;&quot;&gt;count&lt;/span&gt;( user_training_id ) &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;AS&lt;/span&gt; &lt;span class=&quot;hljs-aggregate&quot; style=&quot;box-sizing: border-box;&quot;&gt;count&lt;/span&gt;
  &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;FROM&lt;/span&gt; users u &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;JOIN&lt;/span&gt; training_details t &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;ON&lt;/span&gt; t.user_id = u.user_id
  &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;GROUP&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;BY&lt;/span&gt; user_id,
           training_id,
           training_date
  &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;HAVING&lt;/span&gt; &lt;span class=&quot;hljs-aggregate&quot; style=&quot;box-sizing: border-box;&quot;&gt;count&lt;/span&gt;( user_training_id ) &amp;gt; &lt;span class=&quot;hljs-number&quot; style=&quot;box-sizing: border-box;&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;ORDER&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;BY&lt;/span&gt; training_date &lt;span class=&quot;hljs-keyword&quot; style=&quot;box-sizing: border-box;&quot;&gt;DESC&lt;/span&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;user_id  username      training_id  training_date             count
4        Lisa Romero   2            August, 04 2015 00:00:00  2
4        Lisa Romero   3            August, 03 2015 00:00:00  2
1        John Doe      1            August, 02 2015 00:00:00  3
3        Alice Jones   2            August, 02 2015 00:00:00  2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90789&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is an execution plan? When would you use it? How would you view the execution plan?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Answer:-&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;An execution plan is basically a road map that graphically or textually shows the data retrieval methods chosen by the SQL server’s query optimizer for a stored procedure or ad hoc query. Execution plans are very useful for helping a developer understand and analyze the performance characteristics of a query or stored procedure, since the plan is used to execute the query or stored procedure.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In many SQL systems, a textual execution plan can be obtained using a keyword such as&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;EXPLAIN&lt;/code&gt;, and visual representations can often be obtained as well. In Microsoft SQL Server, the Query Analyzer has an option called “Show Execution Plan” (located on the Query drop down menu). If this option is turned on, it will display query execution plans in a separate window when a query is run.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90844&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-icon&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;List and explain each of the ACID properties that collectively guarantee that database transactions are processed reliably.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;ACID (Atomicity, Consistency, Isolation, Durability)&lt;/span&gt;&amp;nbsp;is a set of properties that guarantee that database transactions are processed reliably. They are defined as follows:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Atomicity.&lt;/span&gt;&amp;nbsp;Atomicity requires that each transaction be “all or nothing”: if one part of the transaction fails, the entire transaction fails, and the database state is left unchanged. An atomic system must guarantee atomicity in each and every situation, including power failures, errors, and crashes.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Consistency.&lt;/span&gt;&amp;nbsp;The consistency property ensures that any transaction will bring the database from one valid state to another. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Isolation.&lt;/span&gt;&amp;nbsp;The isolation property ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed serially, i.e., one after the other. Providing isolation is the main goal of concurrency control. Depending on concurrency control method (i.e. if it uses strict – as opposed to relaxed – serializability), the effects of an incomplete transaction might not even be visible to another transaction.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Durability.&lt;/span&gt;&amp;nbsp;Durability means that once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors. In a relational database, for instance, once a group of SQL statements execute, the results need to be stored permanently (even if the database crashes immediately thereafter). To defend against power loss, transactions (or their effects) must be recorded in a non-volatile memory.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90880&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is a key difference between Truncate and Delete?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;iquestions_list&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90880&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Truncate is used to delete table content and the action can&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;not&lt;/span&gt;&amp;nbsp;be rolled back, whereas Delete is used to delete one or more rows in the table and&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;can&lt;/span&gt;&amp;nbsp;be rolled back.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-90955&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Given a table&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;dbo.users&lt;/code&gt;&amp;nbsp;where the column&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;user_id&lt;/code&gt;&amp;nbsp;is a unique identifier, how can you efficiently select the first 100 odd&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;user_id&lt;/code&gt;&amp;nbsp;values from the table?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;(Assume the table contains well over 100 records with odd&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;user_id&lt;/code&gt;&amp;nbsp;values.)&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;SELECT TOP 100 user_id FROM dbo.users WHERE user_id % 2 = 1 ORDER BY user_id&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-91150&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How can you select all the even number records from a table? All the odd number records?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;To select all the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;even&lt;/span&gt;&amp;nbsp;number records from a table:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Select * from table where id % 2 = 0 
&lt;/code&gt;&lt;/pre&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;To select all the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;odd&lt;/span&gt;&amp;nbsp;number records from a table:&lt;/p&gt;&lt;pre style=&quot;box-sizing: border-box; margin-bottom: 1em; margin-top: 1em; overflow-wrap: break-word; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;Select * from table where id % 2 != 0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-91190&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What are the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NVL&lt;/code&gt;&amp;nbsp;and the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NVL2&lt;/code&gt;&amp;nbsp;functions in SQL? How do they differ?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Both the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NVL(exp1, exp2)&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NVL2(exp1, exp2, exp3)&lt;/code&gt;&amp;nbsp;functions check the value&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp1&lt;/code&gt;&amp;nbsp;to see if it is null.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;With the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NVL(exp1, exp2)&lt;/code&gt;&amp;nbsp;function, if&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp1&lt;/code&gt;&amp;nbsp;is&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;not&lt;/em&gt;&amp;nbsp;null, then the value of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp1&lt;/code&gt;&amp;nbsp;is returned; otherwise, the value of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp2&lt;/code&gt;&amp;nbsp;is returned, but case to the same data type as that of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp1&lt;/code&gt;.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;With the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;NVL2(exp1, exp2, exp3)&lt;/code&gt;&amp;nbsp;function, if&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp1&lt;/code&gt;&amp;nbsp;is&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;not&lt;/em&gt;&amp;nbsp;null, then&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp2&lt;/code&gt;&amp;nbsp;is returned; otherwise, the value of&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;exp3&lt;/code&gt;&amp;nbsp;is returned.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-91228&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the difference between the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RANK()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;DENSE_RANK()&lt;/code&gt;&amp;nbsp;functions? Provide an example.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;only&lt;/em&gt;&amp;nbsp;difference between the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RANK()&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;DENSE_RANK()&lt;/code&gt;&amp;nbsp;functions is in cases where there is a “tie”; i.e., in cases where multiple values in a set have the same ranking. In such cases,&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RANK()&lt;/code&gt;&amp;nbsp;will assign non-consecutive “ranks” to the values in the set (resulting in gaps between the integer ranking values when there is a tie), whereas&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;DENSE_RANK()&lt;/code&gt;&amp;nbsp;will assign consecutive ranks to the values in the set (so there will be no gaps between the integer ranking values in the case of a tie).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;For example, consider the set&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;{25, 25, 50, 75, 75, 100}&lt;/code&gt;. For such a set,&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;RANK()&lt;/code&gt;&amp;nbsp;will return&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;{1, 1, 3, 4, 4, 6}&lt;/code&gt;&amp;nbsp;(note that the values 2 and 5 are skipped), whereas&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;DENSE_RANK()&lt;/code&gt;&amp;nbsp;will return&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;{1,1,2,3,3,4}&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-wrapper is-active&quot; id=&quot;iquestion-91242&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner_border&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion-info_body&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the difference between the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;HAVING&lt;/code&gt;&amp;nbsp;clauses?&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion-footer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span class=&quot;iquestion-answer_text&quot; style=&quot;box-sizing: border-box;&quot;&gt;Answer:-&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;iquestion_answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-wrapper iquestion_answer-animation&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-inner&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;iquestion_answer-body content_body is-small&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;GROUP BY&lt;/code&gt;&amp;nbsp;is not used, the&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;HAVING&lt;/code&gt;&amp;nbsp;clauses are essentially equivalent.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;However, when&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;GROUP BY&lt;/code&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;is&lt;/span&gt;&amp;nbsp;used:&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;WHERE&lt;/code&gt;&amp;nbsp;clause is used to filter records from a result. The filtering occurs before any groupings are made.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;box-sizing: border-box;&quot;&gt;HAVING&lt;/code&gt;&amp;nbsp;clause is used to filter values from a group (i.e., to check conditions after aggregation into groups has been performed).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;**********************************8**********&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;1)&amp;nbsp;What is data-base&amp;nbsp;&lt;a href=&quot;http://career.guru99.com/category/testing/&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot; title=&quot;testing&quot;&gt;testing&lt;/a&gt;?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Data base testing is segmented into four different categories.&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Testing of Data Integrity&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Testing of Data Validity&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Data base related performance&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Testing of functions, procedure and triggers&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;2)&amp;nbsp;In&amp;nbsp;&lt;a href=&quot;http://career.guru99.com/category/database/&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot; title=&quot;database&quot;&gt;database&lt;/a&gt;&amp;nbsp;testing, what do we need to check normally?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Normally, the things that we check in database testing are:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Constraint Check&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Validation of a Field size&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Stored procedure&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Matching application field size to database&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Indexes for performance based issues&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;3)&amp;nbsp;Explain what is data driven test?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In a data-table, to test the multi numbers of data, data-driven test is used.&amp;nbsp; By using this it can easily replace the parameters at the same time from different locations.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;4)&amp;nbsp;What are joins and mention different types of joins?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Join is used to display two or more than two table and the types of joins are:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Natural Join&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Inner Join&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Outer Join&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Cross Join&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The outer join is divided again in two:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Left outer join&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Right outer join&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;5)&amp;nbsp;What are indexes and mention different types of indexes?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Indexes are database objects and they are created on columns. To fetch data quickly they are frequently accessed. Different types of indexes are:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;B-Tree index&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Bitmap index&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Clustered index&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Covering index&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Non-unique index&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unique index&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;a class=&quot;lightbox-added size-medium wp-image-2502&quot; href=&quot;http://career.guru99.com/wp-content/uploads/2013/10/DatabaseTesting.jpg&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: small;&quot;&gt;&lt;img alt=&quot;Database Testing&quot; height=&quot;116&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/cdn.career.guru99.com/wp-content/uploads/2013/10/DatabaseTesting-300x116.jpg&quot; srcset=&quot;https://i2.wp.com/cdn.career.guru99.com/wp-content/uploads/2013/10/DatabaseTesting-300x116.jpg?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; title=&quot;Database Testing&quot; width=&quot;300&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;6)&amp;nbsp;While testing stored procedures what are the steps does a tester takes?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The tester will check the standard format of the stored procedures and also it checks the fields are correct like updates, joins, indexes, deletions as mentioned in the stored procedure.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;7)&amp;nbsp;How would you know for database testing, whether trigger is fired or not?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;On querying the common audit log you would know, whether, a trigger is fired or not. It is in audit log where you can see the triggers fired.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;8)&amp;nbsp;In data base testing, what are the steps to test data loading?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Following steps need to follow to test data loading&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Source data should be known&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Target data should be known&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Compatibility of source and target should be checked&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In SQL Enterprise manager, run the DTS package after opening the corresponding DTS package&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;You have to compare the columns &amp;nbsp;of target and data source&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Number of rows of target and source should be checked&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;After updating data in the source, check whether the changes appears in the target or not.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Check NULLs and junk characters&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;9)&amp;nbsp;Without using Database Checkpoints, how you test a SQL Query in QTP?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;By writing scripting procedure in VBScript, we can connect to database and can test the queries and database.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;10)&amp;nbsp;Explain how to use SQL queries in QTP ?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In QTP using output database check point and database check, you have to select the SQL manual queries option. After selecting the manual queries option, enter the “select” queries to fetch the data in the database and then compare the expected and actual.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;11)&amp;nbsp;What is the way of writing testcases for database testing?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Writing a testcases is like functional testing. First you have to know the functional requirement of the application. Then you have to decide the parameters for writing testcases like&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Objective: Write the objective that you would like to test&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Input method: Write the method of action or input you want to execute&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Expected: how it should appear in the database&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;12)&amp;nbsp;To manage and manipulate the test table what are the SQL statements that you have used in Database testing?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The statements like SELECT, INSERT, UPDATE, DELETE are used to manipulate the table, while ALTER TABLE, CREATE TABLE and DELETE TABLE are used to manage table.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;13)&amp;nbsp;How to test database procedures and triggers?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #444444;&quot;&gt;&lt;/div&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;To test database procedures and triggers, input and output parameters must be known. EXEC statement can be used to run the procedure and examine the behaviour of the tables.&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Open the database project in solution explorer&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Now in View menu, click the database schema&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Open the project folder from schema View menu&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Right click on the object that has to be tested, and then click on the dialog box that says Create Unit Tests&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;After that create a new language test project&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Select either a) Insert the unit test or b) Create a new test and then click OK&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Project that has to be configured will be done by clicking on the Project Configuration dialog box.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Once it configured click on OK&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;14)&amp;nbsp;How you can write testcases from requirements and do the requirements represents exact functionality of AUT (Application Under Test)?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;To write a testcases from requirements, you need to analyse the requirements thoroughly in terms of functionality. Thereafter you think about the appropriate testcases design techniques like Equivalence partitioning, Black box design, Cause effect graphing etc. for writing the testcases.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Yes, the requirements represent exact functionality of AUT.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;15)&amp;nbsp;What is DBMS?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DBMS stand for Database management system, there are different types of DBMS&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Network Model&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Hierarchical Model&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Relational Model&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;16)&amp;nbsp;What is DML?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DML stands for Data Manipulation Language, It is used to manage data with schema objects. It is a subset of SQL.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;17)&amp;nbsp;What are DCL commands? What are the two types of commands used by DCL?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;DCL stands for Data Control Language, it is used to control data.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The two types of DCL Commands are:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Grant: By using this command user can access privilege to database&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Revoke: By using this command user cannot access the database&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;18)&amp;nbsp;What is white box testing and black box testing?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Black box testing means testing the software for the outputs on giving particular inputs.&amp;nbsp; This testing is usually performed to see if the software meets the user’s requirements.&amp;nbsp; There is no specific functional output expected for running this test.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The white box testing is done to check the accuracy of code and logic of the program.&amp;nbsp; This testing is done by the programmer who knows the logical flow of the system.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;19)&amp;nbsp;How does QTP evaluate test results?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Once the testing is done, QTP will generate a report.&amp;nbsp; This report will show the checkpoints, system message and error that were detected while testing.&amp;nbsp; The test results window will show any mismatches encountered at the checkpoints.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;20)&amp;nbsp;Explain the QTP testing process?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;QTP testing process is based on following steps:&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Creating GUI (Graphical User Interface) Map files : Identifies the GUI object which has to be tested&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Creating test scripts:&amp;nbsp; Test scripts are recorded&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Debug tests: Test should be debugged&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Run tests: Testcases should be run.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;View results: The results reflects the success or failure of the tests&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Report detects: If the test is failed, the reasons will be recorded in the report detect file&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;21)&amp;nbsp;What is load testing and give some examples of it?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;To measure the system response, load testing is done.&amp;nbsp; If the load exceeds the users pattern it is known as stress testing.&amp;nbsp; Examples of load testing are downloading the set of large files, executing multiple applications on a single computer, subjecting a server to large number of e-mails and allotting many tasks to a printer one after another.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;22)&amp;nbsp;How to test database manually?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Testing the database manually involves checking the data at the back end and to see whether the addition of data in front end is affecting the back end or not, and same for delete, update, insert etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;23)&amp;nbsp;What RDBMS stands for and what are the important RDMBS that SQL use?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;RDBMS stands for Relational Database Management Systems that use SQL, and the important RDBMS that SQL uses are Sybase, Oracle, Access ,Ingres,&amp;nbsp;&lt;a href=&quot;http://career.guru99.com/category/microsoft/&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot; title=&quot;Microsoft&quot;&gt;Microsoft&lt;/a&gt;&amp;nbsp;SQL server etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;24)&amp;nbsp;What is performance testing and what are the bottlenecks of performance testing?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Performance testing determines the speed of the computer system performance. It includes the quantitative tests like response time measurement. The problem in performance testing is that you always need a well-trained and experienced man power also the tools you use are expensive.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;25)&amp;nbsp;What is DDL and what are their commands?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; box-sizing: border-box; color: #444444; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;To define database structure, DDL is used.&amp;nbsp; DDL stands for Data Definition Language.&amp;nbsp; The various DDL commands include Create, Truncate, Drop, Alter, Comment and Rename.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Different Types of SQL JOINs&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Here are the different types of the JOINs in SQL:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;(INNER) JOIN: Returns records that have matching values in both tables&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;LEFT (OUTER) JOIN: Returns all records from the left table, and the matched records from the right table&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;RIGHT (OUTER) JOIN: Returns all records from the right table, and the matched records from the left table&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FULL (OUTER) JOIN: Returns all records when there is a match in either left or right table&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyfRhWonIi7WDgv8Rsum_D7GOjPmIOUKMHh8PKJ-b0q6MNOAGbiO0YAFQTSuVFWCDYIFwNTqh-cHI6oa9xqyKqsK7TujKd_j_C_1RkD9Yd-71JI1q7LShjR3bgcDjstlv8loRVN9nQSvYD/s1145/j.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;219&quot; data-original-width=&quot;1145&quot; height=&quot;122&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyfRhWonIi7WDgv8Rsum_D7GOjPmIOUKMHh8PKJ-b0q6MNOAGbiO0YAFQTSuVFWCDYIFwNTqh-cHI6oa9xqyKqsK7TujKd_j_C_1RkD9Yd-71JI1q7LShjR3bgcDjstlv8loRVN9nQSvYD/w640-h122/j.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/2931586210667557817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2021/04/sql-for-testers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/2931586210667557817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/2931586210667557817'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2021/04/sql-for-testers.html' title='SQL for testers'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyfRhWonIi7WDgv8Rsum_D7GOjPmIOUKMHh8PKJ-b0q6MNOAGbiO0YAFQTSuVFWCDYIFwNTqh-cHI6oa9xqyKqsK7TujKd_j_C_1RkD9Yd-71JI1q7LShjR3bgcDjstlv8loRVN9nQSvYD/s72-w640-h122-c/j.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-8818394500121971928</id><published>2021-04-15T02:23:00.001-07:00</published><updated>2022-02-15T01:57:35.887-08:00</updated><title type='text'>Testing Interview Questions and Answers-Freshers</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-family: &amp;quot;Gentium Basic&amp;quot;, Georgia, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px;&quot;&gt;Can you explain the PDCA cycle and where testing fits in?&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;background-color: white; box-sizing: border-box; color: #444444; font-family: &amp;quot;Gentium Basic&amp;quot;, Georgia, &amp;quot;Times New Roman&amp;quot;, Times, serif; font-size: 20px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Software testing is an important part of the software development process. In normal software development there are four important steps, also referred to, in short, as the PDCA (Plan, Do, Check, Act) cycle.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;241&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/27-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/27-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;333&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Let’s review the four steps in detail.&lt;/p&gt;&lt;ol class=&quot;tech-ol-123&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Plan:&lt;/span&gt;&amp;nbsp;Define the goal and the plan for achieving that goal.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Do/Execute:&lt;/span&gt;&amp;nbsp;Depending on the plan strategy decided during the plan stage we do execution accordingly in this phase.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Check:&lt;/span&gt;&amp;nbsp;Check/Test to ensure that we are moving according to plan and are getting the desired results.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Act:&lt;/span&gt;&amp;nbsp;During the check cycle, if any issues are there, then we take appropriate action accordingly and revise our plan again.&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;So developers and other stakeholders of the project do the “planning and building,” while testers do the check part of the cycle. Therefore, software testing is done in check part of the PDCA cyle.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2. What is the difference between white box, black box, and gray box testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Black box&lt;/span&gt;&amp;nbsp;testing is a testing strategy based solely on requirements and specifications. Black box testing requires no knowledge of internal paths, structures, or implementation of the software being tested.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;White box&lt;/span&gt;&amp;nbsp;testing is a testing strategy based on internal paths, code structures, and implementation of the software being tested. White box testing generally requires detailed programming skills.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;There is one more type of testing called&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;gray box&lt;/span&gt;&amp;nbsp;testing. In this we look into the “box” being tested just long enough to understand how it has been implemented. Then we close up the box and use our knowledge to choose more effective black box tests.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;257&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/29-1.png&quot; srcset=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/29-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;404&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The above figure shows how both types of testers view an accounting application during testing. Black box testers view the basic accounting application. While during white box testing the tester knows the internal structure of the application. In most scenarios white box testing is done by developers as they know the internals of the application. In black box testing we check the overall functionality of the application while in white box testing we do code reviews, view the architecture, remove bad code practices, and do component level testing.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3. Can you explain usability testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Usability testing is a testing methodology where the end customer is asked to use the software to see if the product is easy to use, to see the customer’s perception and task time. The best way to finalize the customer point of view for usability is by using prototype or mock-up software during the initial stages. By giving the customer the prototype before the development start-up we confirm that we are not missing anything from the user point of view.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;63&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/44-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/44-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;267&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4. What are the categories of defects?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;There are three main categories of defects:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;170&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/30-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/30-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;362&quot; /&gt;&lt;/p&gt;&lt;ol class=&quot;tech-ol-123&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Wrong:&lt;/span&gt;&amp;nbsp;The requirements have been implemented incorrectly. This defect is a variance from the given specification.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Missing:&lt;/span&gt;&amp;nbsp;There was a requirement given by the customer and it was not done. This is a variance from the specifications, an indication that a specification was not implemented, or a requirement of the customer was not noted properly.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Extra:&lt;/span&gt;&amp;nbsp;A requirement incorporated into the product that was not given by the end customer. This is always a variance from the specification, but may be an attribute desired by the user of the product. However, it is considered a defect because it’s a variance from the existing requirements.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5. How do you define a testing policy?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The following are the important steps used to define a testing policy in general. But it can change according to your organization. Let’s discuss in detail the steps of implementing a testing policy in an organization.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;288&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/33-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/33-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;257&quot; /&gt;&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Definition:&lt;/span&gt;&amp;nbsp;The first step any organization needs to do is define one unique definition for testing within the organization so that everyone is of the same mindset.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How to achieve:&lt;/span&gt;&amp;nbsp;How are we going to achieve our objective? Is there going to be a testing committee, will there be compulsory test plans which need to be executed, etc?.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Evaluate:&lt;/span&gt;&amp;nbsp;After testing is implemented in a project how do we evaluate it? Are we going to derive metrics of defects per phase, per programmer, etc. Finally, it’s important to let everyone know how testing has added value to the project?.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Standards:&lt;/span&gt;&amp;nbsp;Finally, what are the standards we want to achieve by testing? For instance, we can say that more than 20 defects per KLOC will be considered below standard and code review should be done for it.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;6. On what basis is the acceptance plan prepared?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In any project the acceptance document is normally prepared using the following inputs. This can vary from company to company and from project to project.&lt;/p&gt;&lt;ol class=&quot;tech-ol-123&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Requirement document:&lt;/span&gt;&amp;nbsp;This document specifies what exactly is needed in the project from the customers perspective.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Input from customer:&lt;/span&gt;&amp;nbsp;This can be discussions, informal talks, emails, etc.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Project plan:&lt;/span&gt;&amp;nbsp;The project plan prepared by the project manager also serves as good input to finalize your acceptance test.&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The following diagram shows the most common inputs used to prepare acceptance test plans.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;215&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/52-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/52-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;421&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;7. What is configuration management?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Configuration management is the detailed recording and updating of information for hardware and software components. When we say components we not only mean source code. It can be tracking of changes for software documents such as requirement, design, test cases, etc.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When changes are done in adhoc and in an uncontrolled manner chaotic situations can arise and more defects injected. So whenever changes are done it should be done in a controlled fashion and with proper versioning. At any moment of time we should be able to revert back to the old version. The main intention of configuration management is to track our changes if we have issues with the current system. Configuration management is done using baselines.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;8. How does a coverage tool work?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;While doing testing on the actual product, the code coverage testing tool is run simultaneously. While the testing is going on, the code coverage tool monitors the executed statements of the source code. When the final testing is completed we get a complete report of the pending statements and also get the coverage percentage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;152&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/56-1.png&quot; srcset=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/56-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;375&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;9. Which is the best testing model?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In real projects, tailored models are proven to be the best, because they share features from The Waterfall, Iterative, Evolutionary models, etc., and can fit into real life time projects. Tailored models are most productive and beneficial for many organizations. If it’s a pure testing project, then the V model is the best.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;10. What is the difference between a defect and a failure?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When a defect reaches the end customer it is called a failure and if the defect is detected internally and resolved it’s called a defect.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;258&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/29-2.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/29-2.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;265&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;11. Should testing be done only after the build and execution phases are complete?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In traditional testing methodology testing is always done after the build and execution phases.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;But that’s a wrong way of thinking because the earlier we catch a defect, the more cost effective it is. For instance, fixing a defect in maintenance is ten times more costly than fixing it during execution.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In the requirement phase we can verify if the requirements are met according to the customer needs. During design we can check whether the design document covers all the requirements. In this stage we can also generate rough functional data. We can also review the design document from the architecture and the correctness perspectives. In the build and execution phase we can execute unit test cases and generate structural and functional data. And finally comes the testing phase done in the traditional way. i.e., run the system test cases and see if the system works according to the requirements. During installation we need to see if the system is compatible with the software. Finally, during the maintenance phase when any fixes are made we can retest the fixes and follow the regression testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Therefore, Testing should occur in conjunction with each phase of the software development.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;12. Are there more defects in the design phase or in the coding phase?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The design phase is more error prone than the execution phase. One of the most frequent defects which occur during design is that the product does not cover the complete requirements of the customer. Second is wrong or bad architecture and technical decisions make the next phase, execution, more prone to defects. Because the design phase drives the execution phase it’s the most critical phase to test. The testing of the design phase can be done by good review. On average, 60% of defects occur during design and 40% during the execution phase.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;219&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/36-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/36-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;221&quot; /&gt;&lt;/p&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;13. What group of teams can do software testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When it comes to testing everyone in the world can be involved right from the developer to the project manager to the customer. But below are different types of team groups which can be present in a project.&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Isolated test team&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Outsource – we can hire external testing resources and do testing for our project.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Inside test team&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Developers as testers&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;QA/QC team.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;14. What impact ratings have you used in your projects?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Normally, the impact ratings for defects are classified into three types:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;136&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/64-1.png&quot; srcset=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/64-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;286&quot; /&gt;&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Minor:&lt;/span&gt;&amp;nbsp;Very low impact but does not affect operations on a large scale.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Major:&lt;/span&gt;&amp;nbsp;Affects operations on a very large scale.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Critical:&lt;/span&gt;&amp;nbsp;Brings the system to a halt and stops the show.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;15. Does an increase in testing always improve the project?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;No an increase in testing does not always mean improvement of the product, company, or project. In real test scenarios only 20% of test plans are critical from a business angle. Running those critical test plans will assure that the testing is properly done. The following graph explains the impact of under testing and over testing. If you under test a system the number of defects will increase, but if you over test a system your cost of testing will increase. Even if your defects come down your cost of testing has gone up.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;16. What’s the relationship between environment reality and test phases?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Environment reality becomes more important as test phases start moving ahead. For instance, during unit testing you need the environment to be partly real, but at the acceptance phase you should have a 100% real environment, or we can say it should be the actual real environment. The following graph shows how with every phase the environment reality should also increase and finally during acceptance it should be 100% real.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;289&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/53-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/53-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;359&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;17. What are different types of verifications?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Verification is static type of s/w testing. It means code is not executed. The product is evaluated by going through the code. Types of verification are:&lt;/p&gt;&lt;ol class=&quot;tech-ol-123&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Walkthrough:&lt;/span&gt;&amp;nbsp;Walkthroughs are informal, initiated by the author of the s/w product to a colleague for assistance in locating defects or suggestions for improvements. They are usually unplanned. Author explains the product; colleague comes out with observations and author notes down relevant points and takes corrective actions.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Inspection:&lt;/span&gt;&amp;nbsp;Inspection is a thorough word-by-word checking of a software product with the intention of Locating defects, Confirming traceability of relevant requirements etc.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;18. How do test documents in a project span across the software development lifecycle?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The following figure shows pictorially how test documents span across the software development lifecycle. The following discusses the specific testing documents in the lifecycle:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;233&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/59-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/59-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;392&quot; /&gt;&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Central/Project test plan:&lt;/span&gt;&amp;nbsp;This is the main test plan which outlines the complete test strategy of the software project. This document should be prepared before the start of the project and is used until the end of the software development lifecycle.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Acceptance test plan:&lt;/span&gt;&amp;nbsp;This test plan is normally prepared with the end customer. This document commences during the requirement phase and is completed at final delivery.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;System test plan:&lt;/span&gt;&amp;nbsp;This test plan starts during the design phase and proceeds until the end of the project.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Integration and unit test plan:&lt;/span&gt;&amp;nbsp;Both of these test plans start during the execution phase and continue until the final delivery.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;19. Which test cases are written first: white boxes or black boxes?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Normally black box test cases are written first and white box test cases later. In order to write black box test cases we need the requirement document and, design or project plan. All these documents are easily available at the initial start of the project. White box test cases cannot be started in the initial phase of the project because they need more architecture clarity which is not available at the start of the project. So normally white box test cases are written after black box test cases are written.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Black box test cases do not require system understanding but white box testing needs more structural understanding. And structural understanding is clearer i00n the later part of project, i.e., while executing or designing. For black box testing you need to only analyze from the functional perspective which is easily available from a simple requirement document.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;199&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/63-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/63-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;273&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;20. Explain Unit Testing, Integration Tests, System Testing and Acceptance Testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Unit testing – Testing performed on a single, stand-alone module or unit of code.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Integration Tests – Testing performed on groups of modules to ensure that data and control are passed properly between modules.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;System testing – Testing a predetermined combination of tests that, when executed successfully meets requirements.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Acceptance testing – Testing to ensure that the system meets the needs of the organization and the end user or customer (i.e., validates that the right system was built).&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;21. What is a test log?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The IEEE Std. 829-1998 defines a test log as a chronological record of relevant details about the execution of test cases. It’s a detailed view of activity and events given in chronological manner.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The following figure shows a test log and is followed by a sample test log.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;172&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/64-2.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/64-2.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;93&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;22. Can you explain requirement traceability and its importance?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In most organizations testing only starts after the execution/coding phase of the project. But if the organization wants to really benefit from testing, then testers should get involved right from the requirement phase.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;If the tester gets involved right from the requirement phase then requirement traceability is one of the important reports that can detail what kind of test coverage the test cases have.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;23. What does entry and exit criteria mean in a project?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Entry and exit criteria are a must for the success of any project. If you do not know where to start and where to finish then your goals are not clear. By defining exit and entry criteria you define your boundaries.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;For instance, you can define entry criteria that the customer should provide the requirement document or acceptance plan. If this entry criteria is not met then you will not start the project. On the other end, you can also define exit criteria for your project. For instance, one of the common exit criteria in projects is that the customer has successfully executed the acceptance test plan.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;122&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/51-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/51-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;347&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;24. What is the difference between verification and validation?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Verification is a review without actually executing the process while validation is checking the product with actual execution. For instance, code review and syntax check is verification while actually running the product and checking the results is validation.&lt;/p&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;25. What is the difference between latent and masked defects?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A latent defect is an existing defect that has not yet caused a failure because the sets of conditions were never met.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A masked defect is an existing defect that hasn’t yet caused a failure just because another defect has prevented that part of the code from being executed.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;26. Can you explain calibration?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;It includes tracing the accuracy of the devices used in the production, development and testing. Devices used must be maintained and calibrated to ensure that it is working in good order.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;27. What’s the difference between alpha and beta testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;97&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/42-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/42-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;274&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Alpha and beta testing has different meanings to different people. Alpha testing is the acceptance testing done at the development site. Some organizations have a different visualization of alpha testing. They consider alpha testing as testing which is conducted on early, unstable versions of software. On the contrary beta testing is acceptance testing conducted at the customer end.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In short, the difference between beta testing and alpha testing is the location where the tests are done.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;28. How does testing affect risk?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A risk is a condition that can result in a loss. Risk can only be controlled in different scenarios but not eliminated completely. A defect normally converts to a risk.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;159&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/31-1.png&quot; srcset=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/31-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;294&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;29. What is coverage and what are the different types of coverage techniques?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Coverage is a measurement used in software testing to describe the degree to which the source code is tested. There are three basic types of coverage techniques as shown in the following figure:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;167&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/55-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/55-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;358&quot; /&gt;&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Statement coverage:&lt;/span&gt;&amp;nbsp;This coverage ensures that each line of source code has been executed and tested.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Decision coverage:&lt;/span&gt;&amp;nbsp;This coverage ensures that every decision (true/false) in the source code has been executed and tested.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Path coverage:&lt;/span&gt;&amp;nbsp;In this coverage we ensure that every possible route through a given part of code is executed and tested.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;30. A defect which could have been removed during the initial stage is removed in a later stage. How does this affect cost?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;If a defect is known at the initial stage then it should be removed during that stage/phase itself rather than at some later stage. It’s a recorded fact that if a defect is delayed for later phases it proves more costly. The following figure shows how a defect is costly as the phases move forward. A defect if identified and removed during the requirement and design phase is the most cost effective, while a defect removed during maintenance is 20 times costlier than during the requirement and design phases.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;316&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/39-1.png&quot; srcset=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/39-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;464&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;For instance, if a defect is identified during requirement and design we only need to change the documentation, but if identified during the maintenance phase we not only need to fix the defect, but also change our test plans, do regression testing, and change all documentation. This is why a defect should be identified/removed in earlier phases and the testing department should be involved right from the requirement phase and not after the execution phase.&lt;/p&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;31. What kind of input do we need from the end user to begin proper testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The product has to be used by the user. He is the most important person as he has more interest than anyone else in the project.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;283&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/37-1.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/37-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;311&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;From the user we need the following data:&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The first thing we need is the acceptance test plan from the end user. The acceptance test defines the entire test which the product has to pass so that it can go into production.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;We also need the requirement document from the customer. In normal scenarios the customer never writes a formal document until he is really sure of his requirements. But at some point the customer should sign saying yes this is what he wants.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The customer should also define the risky sections of the project. For instance, in a normal accounting project if a voucher entry screen does not work that will stop the accounting functionality completely. But if reports are not derived the accounting department can use it for some time. The customer is the right person to say which section will affect him the most. With this feedback the testers can prepare a proper test plan for those areas and test it thoroughly.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The customer should also provide proper data for testing. Feeding proper data during testing is very important. In many scenarios testers key in wrong data and expect results which are of no interest to the customer.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;32. Can you explain the workbench concept?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;In order to understand testing methodology we need to understand the workbench concept. A Workbench is a way of documenting how a specific activity has to be performed. A workbench is referred to as phases, steps, and tasks as shown in the following figure.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;143&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/39-2.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/39-2.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;220&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;There are five tasks for every workbench:&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Input:&lt;/span&gt;&amp;nbsp;Every task needs some defined input and entrance criteria. So for every workbench we need defined inputs. Input forms the first steps of the workbench.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Execute:&lt;/span&gt;&amp;nbsp;This is the main task of the workbench which will transform the input into the expected output.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Check:&lt;/span&gt;&amp;nbsp;Check steps assure that the output after execution meets the desired result.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Production output:&lt;/span&gt;&amp;nbsp;If the check is right the production output forms the exit criteria of the workbench.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Rework:&lt;/span&gt;&amp;nbsp;During the check step if the output is not as desired then we need to again start from the execute step.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;442&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/40-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/40-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;223&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;33. Can you explain the concept of defect cascading?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Defect cascading is a defect which is caused by another defect. One defect triggers the other defect. For instance, in the accounting application shown here there is a defect which leads to negative taxation. So the negative taxation defect affects the ledger which in turn affects four other modules.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;275&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/43-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/43-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;348&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;34. Can you explain cohabiting software?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When we install the application at the end client it is very possible that on the same PC other applications also exist. It is also very possible that those applications share common DLLs, resources etc., with your application. There is a huge chance in such situations that your changes can affect the cohabiting software. So the best practice is after you install your application or after any changes, tell other application owners to run a test cycle on their application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;220&quot; scale=&quot;1.5&quot; src=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/63-2.png&quot; srcset=&quot;https://i0.wp.com/www.indiabix.com/_files/images/software-testing/63-2.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;296&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;35. What is the difference between pilot and beta testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The difference between pilot and beta testing is that pilot testing is nothing but actually using the product (limited to some users) and in beta testing we do not input real data, but it’s installed at the end customer to validate if the product can be used in production.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;127&quot; scale=&quot;1.5&quot; src=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/47-1.png&quot; srcset=&quot;https://i2.wp.com/www.indiabix.com/_files/images/software-testing/47-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;283&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;36. What are the different strategies for rollout to end users?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;There are four major ways of rolling out any project:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;202&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/45-1.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/45-1.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;268&quot; /&gt;&lt;/p&gt;&lt;ul class=&quot;tech-ul-disc&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Pilot:&lt;/span&gt;&amp;nbsp;The actual production system is installed at a single or limited number of users. Pilot basically means that the product is actually rolled out to limited users for real work.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Gradual Implementation:&lt;/span&gt;&amp;nbsp;In this implementation we ship the entire product to the limited users or all users at the customer end. Here, the developers get instant feedback from the recipients which allow them to make changes before the product is available. But the downside is that developers and testers maintain more than one version at one time.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Phased Implementation:&lt;/span&gt;&amp;nbsp;In this implementation the product is rolled out to all users in incrementally. That means each successive rollout has some added functionality. So as new functionality comes in, new installations occur and the customer tests them progressively. The benefit of this kind of rollout is that customers can start using the functionality and provide valuable feedback progressively. The only issue here is that with each rollout and added functionality the integration becomes more complicated.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Parallel Implementation:&lt;/span&gt;&amp;nbsp;In these types of rollouts the existing application is run side by side with the new application. If there are any issues with the new application we again move back to the old application. One of the biggest problems with parallel implementation is we need extra hardware, software, and resources.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;37. What’s the difference between System testing and Acceptance testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;i class=&quot;softtest-code&quot; style=&quot;box-sizing: border-box;&quot;&gt;Acceptance testing&lt;/i&gt;&amp;nbsp;checks the system against the “Requirements.” It is similar to System testing in that the whole system is checked but the important difference is the change in focus:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;i class=&quot;softtest-code&quot; style=&quot;box-sizing: border-box;&quot;&gt;System testing&lt;/i&gt;&amp;nbsp;checks that the system that was specified has been delivered.&amp;nbsp;&lt;i class=&quot;softtest-code&quot; style=&quot;box-sizing: border-box;&quot;&gt;Acceptance testing&lt;/i&gt;&amp;nbsp;checks that the system will deliver what was requested. The customer should always do Acceptance testing and not the developer.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The customer knows what is required from the system to achieve value in the business and is the only person qualified to make that judgement. This testing is more about ensuring that the software is delivered as defined by the customer. It’s like getting a green light from the customer that the software meets expectations and is ready to be used.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;tech-div&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;tech-question ib-green&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;38. Can you explain regression testing and confirmation testing?&lt;/p&gt;&lt;div class=&quot;tech-answer&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Regression testing is used for regression defects. Regression defects are defects occur when the functionality which was once working normally has stopped working. This is probably because of changes made in the program or the environment. To uncover such kind of defect regression testing is conducted.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The following figure shows the difference between regression and confirmation testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;img alt=&quot;Software Testing Image&quot; height=&quot;181&quot; scale=&quot;1.5&quot; src=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/54-2.png&quot; srcset=&quot;https://i1.wp.com/www.indiabix.com/_files/images/software-testing/54-2.png?zoom=2 1.5x&quot; style=&quot;border: 0px; box-sizing: border-box; height: auto; max-width: 100%; vertical-align: middle;&quot; width=&quot;328&quot; /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;If we fix a defect in an existing application we use confirmation testing to test if the defect is removed. It’s very possible because of this defect or changes to the application that other sections of the application are affected. So to ensure that no other section is affected we can use regression testing to confirm this.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Endurance Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Endurance testing:&lt;/span&gt;&amp;nbsp;in this testing we test application behavior against the load and stress applies over application for a long duration of time. The goal of this testing are:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– To determine the how the application is going to responds for high load and stress conditions in the real scenario.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– To ensure that the response times in highly load and stress conditions are within the user’s requirement of response time.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Checks for memory leaks or other problems that may occur with prolonged execution.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Gorilla Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A test technique that involves testing with various ranges of valid and invalid inputs a particular module or component functionality extensively. In Gorilla testing test case and test data are not required. It uses random data and test cases to perform testing of application. The purpose of Gorilla testing is to examine the capability of single module functionality by applying heavy load and stress to it. And determine how much load and stress it can tolerate without getting crashed.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Why we need Localization Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Localization testing mainly deals with the functionality of application and GUI of the application. The purposes of using Localization testing are following:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Mainly deal with internationalization and localization aspects of software.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Evaluate how successfully the language is interpreted into a specific language.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Translate GUI of application so that it can adapt to a particular region language and interface.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Metric?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Metric is a standard of measurement. Software metrics uses the statistical method for explaining the structure of the application. The software metric tells us the measurable things like number of bugs per lines of code. We can take the help of software metrics to make the decision regarding the application development. The test metrics is derived from raw test data because what cannot be measured cannot be managed. Software metric also helps the Project Management team to manage the project like schedule for development of each phase.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain Monkey testing.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Monkey testing&lt;/span&gt;&amp;nbsp;is a type of Black Box Testing used mostly at the Unit Level. In this tester enter the data in any format and check the software is not crashing. In this testing we use Smart monkey and Dumb monkey.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Smart monkeys are used for load and stress testing, they will help in finding the bugs. They are very expensive to develop.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Dumb monkey are important for basic testing. They help in finding those bugs which are having high severity. Dumb monkey are less expensive as compare to Smart monkeys.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Example: In phone number filed Symbols are entered.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Negative Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Negative Testing is performed to find the situation when the software crashed. It is a negative approach, in this tester try to put efforts to find the negative aspects of the application. Negative testing ensures that application can handle the invalid input, incorrect data and incorrect user response. For example, when user enters the alphabetical data in a numeric field, then error message should be display saying “Incorrect data type, please enter a number”.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Path Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Path testing is a testing in which tester ensure that every path of the application should be executed at least once. In this testing, all paths in the program source code are tested at least once. Tester can use the control flow graph to perform this type of testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Performance Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Performance Testing is focused on verifying the system performance requirements like response time, Transactional throughput and number of concurrent users. It is used to accurately measure the End-to-End performance of a system. It identifies the loop holes in Architectural Design which helps to tune the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;It includes the following:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Emulating ‘n’ number of users interacting with the system using minimal hardware.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Measuring End-User’s Response time.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Repeating the load consistently.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Monitoring the system components under controlled load.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Providing robust analysis and reporting engines.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the difference between baseline and benchmark testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The difference between baseline and benchmark testing are:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Baseline testing is the process of running a set of tests to capture performance information whereas Benchmarking is the process of comparing application performance with respect to industry standard that is given by some other organization.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Baseline testing use the information collected to made the change in the application to improve performance and capabilities of the application whereas benchmark information where our application stands with respect to others.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Baseline compares present performance of application with its own previous performance where as benchmark compares our application performance with other companies application’s performance.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is test driver and test stub?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– The Stub is called from the software component to be tested. It is used in top down approach.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– The driver calls a component to be tested. It is used in bottom up approach.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Both test stub and test driver are dummy software components.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;We need test stub and test driver because of following reason:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Suppose we want to test the interface between modules A and B and we have developed only module A. So we cannot test module A but if a dummy module is prepare, using that we can test module A.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Now module B cannot send or receive data from module A directly so, in these cases we have to transfer data from one module to another module by some external features. This external feature used is called Driver.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Agile Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Agile Testing means to quickly validation of the client’s requirements and make the application of high quality user interface. When the build is released to the testing team, testing of the application is started to find the bugs. As a Tester, we need to focus on the customer or end user requirements. We put the efforts to deliver the quality product in spite of short time frame which will further help in reducing the cost of development and test feedbacks will be implemented in the code which will avoid the defects coming from the end user.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain bug life cycle.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Bug Life Cycle:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– When a tester finds a bug .The bug is assigned NEW or OPEN with status,&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– The bug is assigned to development project manager who will analyze the bug .He will check whether it is a valid defect. If not valid bus is rejected, now status is REJECTED.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– If not, next the defect is checked whether it is in scope. When bug is not part of the current release .Such defects are POSTPONED&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Now, Tester checks whether similar defect was raised earlier. If yes defect is assigned a status DUPLICATE&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– When bug is assigned to developer. During this stage bug is assigned a status IN-PROGRESS&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Once bug is fixed. Defect is assigned a status FIXED&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Next the tester will re-test the code. In case the test case passes the defect is CLOSED&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– If test case fails again the bug is RE-OPENED and assigned to the developer. That’s all to Bug Life Cycle.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Matching Defects?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Matching Defects helps us to remove the locking of same defect in the bug in the application. While using QC, every time we lock a bug, QC saves the list of keywords from the Summary and Description Fields of the bug. When we search for similar defects in QC, keywords in these fields are matched with other defects which are locked previously. Keywords are more than two characters and they are not case sensitive. We have two methods to conduct search of similar defects.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Finding Similar Defects:&lt;/span&gt;&amp;nbsp;compare a selected defect with all other existing defects in project.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Finding similar Text:&lt;/span&gt;&amp;nbsp;compare a specific test string against all other existing defects in project.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Recovery Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Recovery testing is done to check how fast and better the application can recover against any type of crash or hardware failure. Type or extent of recovery is specified in the requirement specifications. Recovery testing will enable customer to avoid any inconvenience that are generally associated with the loss of data and performance of the application. We can perform regular recovery testing in order to take backup of all necessary and important data.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Test Case?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A test case is a set of conditions which is used by tester to perform the testing of application to make sure that application is working as per the requirement of the user.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– A Test Case contains information like test steps, verification steps, prerequisites, outputs, test environment, etc&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– The process of developing test cases can also enable us to determine the issues related to the requirement and designing process of the application.&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;In Test First Design what step you will follow to add new functionality into the project?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When we have to add new functionality our project, we perform the following steps:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Quickly add a developer test: we need to create a test that ensures that new added functionality will not crash our project.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Run your tests. Execute that test, to ensure that new add functionality does not crash our application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Update your production code. In this we update our code with few more functionality so that the code passes the new test. Like adding of error message in field where field can take only numeric data.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Run your test suite again. If test fails, we have to do change in the code and perform retesting of the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Validation and Verification?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Verification:&lt;/span&gt;&amp;nbsp;process of evaluating work-products of a development phase to determine whether they fulfill the specified requirements for that phase.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Validation:&lt;/span&gt;&amp;nbsp;process of evaluating software during or at the end of the development process to determine whether it specified requirements.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Difference between Verification and Validation:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verification is Static testing where as Validations is Dynamic Testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verification takes place before validation.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verification evaluates plans, document, requirements and specification, where as Validation evaluates product.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verification inputs are checklist, issues list, walkthroughs and inspection where as in Validation testing of actual product.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verification output is set of document, plans, specification and requirement documents where as in Validation actual product is output.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are different approaches to do Integration Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Integration testing is black box testing. Integration testing focuses on the interfaces between units, to ensure that units work together to complete a specify task. The purpose of integration testing is to confirm that different components of the application interact with each other. Integration testing is considered complete, when actual results and expected results are same. There are mainly three approaches to do integration testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Top-down Approach:&lt;/span&gt;&amp;nbsp;Tests the components by integrating from top to bottom.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Bottom-up approach:&lt;/span&gt;&amp;nbsp;It takes place from the bottom of the control flow to the higher level components&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Big bang approach:&lt;/span&gt;&amp;nbsp;In this are different module are joined together to form a complete system and then testing is performed on it.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Can you explain the elementary process?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Software applications are made up by the help of several elementary processes. There are two types of elementary processes:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Dynamic elementary Process: The dynamic elementary involves process of moving data from one location to another location. The location can be within the application and outside the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Static elementary Process: Static elementary involves maintaining the data of the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain the PDCA cycle.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Software testing is an important part of the software development process. In normal software development there are four important steps PDCA (Plan, Do, Check, Act) cycle. The four steps are discussed below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Plan:&lt;/span&gt;&amp;nbsp;Define the goal and the plan for achieving that goal.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Do:&lt;/span&gt;&amp;nbsp;execute those plan strategy which is planned in plan phase&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Check:&lt;/span&gt;&amp;nbsp;Check to make sure that everything is going according to the plan and gets the expected results.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Act:&lt;/span&gt;&amp;nbsp;Act according to that issue.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are the categories of defects?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;There are three main categories of defects:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Wrong:&lt;/span&gt;&amp;nbsp;The requirements are implemented incorrectly in the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Missing:&lt;/span&gt;&amp;nbsp;When requirement given by the customer and application is unable to meet those application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Extra:&lt;/span&gt;&amp;nbsp;A requirement incorporated into the product that was not given by the end customer. This is always a variance from the specification, but may be an attribute desired by the user of the product.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are different types of verifications?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Verification is static type of software testing which is started in earlier phase of development of software. In this approach we don’t execute the software that the reason it comes in static testing. The product is evaluated by going through the code. Types of verification are:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Walkthrough:&lt;/span&gt;&amp;nbsp;Walkthroughs are informal technique. Where the Developer leader organizing a meeting with team member to take feedback regarding the software. This can be used for the improvement of the software quality. Walkthrough are unplanned in the SDLC cycle.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Inspection:&lt;/span&gt;&amp;nbsp;Inspection is a done by checking of a software product thoroughly with the intention to find out defect and ensuring that software is meeting the user requirements.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Which test cases are written first: white boxes or black boxes?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Generally, black box test cases are written first and white box test cases later. To write black box test cases we need the requirement documents and design or project plan. All these documents are easily available in the earlier phase of the development. A black box test case does not need functional design of the application but white box testing needs. Structural design of the application is clearer in the later part of project, mostly while executing or designing. For black box testing you need to only analyze from the functional perspective which is easily available from a simple requirement document.&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is difference between latent and masked defect?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The difference between latent and masked defect are:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– A latent defect is an existing defect that has not yet caused a failure because the conditions that are required to invoke the defect is not meet.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– A masked defect is an existing defect that has not yet caused a failure just because another defect hides that part of the code from being executed where it is present.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is coverage and what are the different types of coverage techniques?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Coverage is a measurement used in software testing to describe the degree to which the source code is tested. There are three basic types of coverage techniques as shown in the following figure:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Statement coverage:&lt;/span&gt;&amp;nbsp;This coverage ensures that each line of source code has been executed and tested.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Decision coverage:&lt;/span&gt;&amp;nbsp;This coverage ensures that every decision (true/false) in the source code has been executed and tested.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Path coverage:&lt;/span&gt;&amp;nbsp;In this coverage we ensure that every possible route through a given part of code is executed and tested.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain the concept of defect cascading?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Defect cascading is a defect which is caused by another defect. In this one defect invokes the other defect in the application. When a defect is present in any stage but is not identified, hide to other phases without getting noticed. This will result in increase in number of defects.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are the basic elements of defect report format?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;The basic elements of Defect Report Format are:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. Project name&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Module name&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Defect detected on&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Defect detected by&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Defect id&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6. Defect name&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7. Snapshot of the defect(if the defect is in the non reproducible environment)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8. Priority, severity, status&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9. Defect resolved by&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10. Defect resolved on&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is destructive testing, and what are its benefits?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Destructive testing includes methods where material is broken down in to evaluate the mechanical properties, such as strength, toughness and hardness. For example, finding the quality of a weld is good enough to withstand extreme pressure and also to verify the properties of a material.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Benefits of Destructive Testing (DT)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verifies properties of a material&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Determines quality of welds&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Helps you to reduce failures, accidents and costs&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Ensures compliance with regulations&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Use Case Testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Use Case:&lt;/span&gt;&amp;nbsp;A use case is a description of the process which is performed by the end user for a particular task. Use case contains a sequence of step which is performed by the end user to complete a specific task or a step by step process that describe how the application and end user interact with each other. Use case is written by the user point of view.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Use case Testing:&lt;/span&gt;&amp;nbsp;the use case testing uses this use case to evaluate the application. So that, the tester can examines all the functionalities of the application. Use case testing cover whole application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Requirement Traceability Matrix?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The Requirements Traceability Matrix (RTM) is a tool to make sure that project requirement remain same throughout the whole development process. RTM is used in the development process because of following reasons:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– To determine whether the developed project is meet the requirements of the user.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– To determine all the requirements given by the user.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– To make sure the application requirement can be fulfilled in the verification process.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is difference between Pilot and Beta testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The differences between these two are listed below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– A beta test when the product is about to release to the end user whereas pilot testing take place in the earlier phase of the development cycle.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– In beta testing application is given to a few user to make sure that application meet the user requirement and does not contain any showstopper whereas in case of pilot testing team member give their feedback to improve the quality of the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Describe how to perform Risk analysis during software testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Risk analysis is the process of identifying risk in the application and prioritizing them to test. Following are some of the risks:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. New Hardware.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. New Technology.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. New Automation Tool.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Sequence of code delivery.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Availability of application test resources.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;We prioritize them into three categories these are:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;High magnitude:&lt;/span&gt;&amp;nbsp;Impact of the bug on the other functionality of the application.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Medium:&lt;/span&gt;&amp;nbsp;it can be tolerable in the application but not desirable.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Low:&lt;/span&gt;&amp;nbsp;it can be tolerable. This type of risk has no impact on the company business.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Silk Test?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Silk Test is a tool developed for performing the regression and functionality testing of the application. Silk Test a tool is used when we are testing the applications which are based on Window, Java, web or traditional client/server. Silk Test help in preparing the test plan and management of those test plans, to provide the direct accessing of the database and validation of the field.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is difference between Master Test Plan and Test Plan.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The differences between Master Plan and Test Plan are given below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Master Test Plan contains all the testing and risk involved area of the application where as Test case document contains test cases.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Master Test plan contain all the details of each and every individual tests to be run during the overall development of application whereas test plan describe the scope, approach, resources and schedule of performing test.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Master Test plan contain the description of every tests that is going to be performed on the application where as test plan only contain the description of few test cases. during the testing cycle like Unit test, System test, beta test etc&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Master Test Plan is created for all large projects but when it is created for the small project then we called it as test plan.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;How to deal with not reproducible bug?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A bug cannot be reproduced for following reasons:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. Low memory.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Addressing to non available memory location.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Things happening in a particular sequence.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Tester can do following things to deal with not reproducible bug:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Includes steps that are close to the error statement.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Evaluate the test environment.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Examine and evaluate test execution results.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Resources &amp;amp; Time Constraints must be kept in point.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the difference between coupling and cohesion?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The difference between coupling and cohesion is discussed below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Cohesion is the degree which is measure dependency of the software component that combines related functionality into a single unit whereas coupling means that binding the related functionality into different unit.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Cohesion deals with the functionality that related different process within the single module where as coupling deals with how much one module is dependent on the other modules within the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– It is good to increase the cohesion between the software whereas increasing coupling is avoided.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the role of QA in a project development?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The role of Quality Assurance is discussed below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– QA team is responsible for monitoring the process to be carried out for development.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Responsibilities of QA team are planning testing execution process.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– QA Lead creates the time tables and agrees on a Quality Assurance plan for the product.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– QA team communicated QA process to the team members.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– QA team ensures traceability of test cases to requirements.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;When do you choose automated testing over manual testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;This choice between automated testing over manual testing can be based upon following factors:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. Frequency of use of test case&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Time Comparison (automated script run much faster than manual execution.)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Reusability of Automation Script&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Adaptability of test case for automation.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Exploitation of automation tool&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are the key challenges of software testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Following are some challenges of software testing:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. Application should be stable enough to be tested.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Testing always under time constraint.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Understanding the requirements.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Domain knowledge and business user perspective understanding.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Which tests to execute first?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6. Testing the Complete Application.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7. Regression testing.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8. Lack of skilled testers.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9. Changing requirements.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10. Lack of resources, tools and training.&lt;/p&gt;&lt;div&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;paratitle1&quot; id=&quot;dgContent&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; color: #444444; font-size: 20px; margin: 0px 0px 30px; width: 700px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is baseline testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Baseline testing is the process of running a set of tests to capture performance information. Baseline testing use the information collected to made the changes in the application to improve performance and capabilities of the application. Baseline compares present performance of application with its own previous performance.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is benchmark testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Benchmarking testing is the process of comparing application performance with respect to industry standard which is given by some other organization. Benchmark informs us where our application stands with respect to others. Benchmark compares our application performance with other company’s application’s performance.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is verification and validation?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Verification:&lt;/span&gt;&amp;nbsp;process of evaluating work-products of a development phase to determine whether they meet the specified requirements for that phase.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Validation:&lt;/span&gt;&amp;nbsp;process of evaluating software during or at the end of the development process to determine whether it specified requirements.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Difference between Verification and Validation:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Verification is Static Testing where as Validations is Dynamic Testing.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Verification takes place before validation.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Verification evaluates plans, document, requirements and specification, where as Validation evaluates product.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Verification inputs are checklist, issues list, walkthroughs and inspection ,where as in Validation testing of actual product.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Verification output is set of document, plans, specification and requirement documents where as in Validation actual product is output.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain Branch Coverage and Decision Coverage.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Branch Coverage is testing performed in order to ensure that every branch of the software is executed atleast. To perform the Branch coverage testing we take the help of the Control Flow Graph.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Decision coverage testing ensures that every decision taking statement is executed atleast once.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Both decision and branch coverage testing is done to ensure the tester that no branch and decision taking statement, will not lead to failure of the software.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– To Calculate Branch Coverage:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Branch Coverage = Tested Decision Outcomes / Total Decision Outcomes.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is difference between Retesting and Regression testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;The differences between Retesting and Regression testing are below:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Retesting is done to verify defect fix previous in now working correctly where as regression is perform to check if the defect fix have not impacted other functionality that was working fine before doing changes in the code.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Retesting is specific and is performed on the bug which is fixed where as in regression is not be always specific to any defect fix it is performed when any bug is fixed.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Retesting concern with executing those test cases that are failed earlier where as regression concern with executing test cases that was passed in earlier builds.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Retesting has higher priority over regression.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Mutation testing &amp;amp; when can it be done?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Mutation testing is a performed to find out the defect in the program. It is performed to find put bugs in specific module or component of the application. Mutation testing is based on two assumptions:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Competent programmer hypothesis:&lt;/span&gt;&amp;nbsp;according this hypothesis we suppose that program write the correct code of the program.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Coupling effect: according to this effect collection of different set of test data can also find large and complex bugs.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;In this testing we insert few bugs into program to examine the optimal test inputs.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is severity and priority of bug? Give some example.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Priority:&lt;/span&gt;&amp;nbsp;concern with application from the business point of view.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;It answers: How quickly we need to fix the bug? Or how soon the bug should get fixed?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Severity: concern with functionality of application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How much the bug is affecting the functionality of the application?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Ex.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. High Priority and Low Severity:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;If a company logo is not properly displayed on their website.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2. High Priority and High Severity:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Suppose you are doing online shopping and filled payment information, but after submitting the form, you get a message like “Order has been cancelled.”&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3. Low Priority and High Severity:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;If we have a typical scenario in which the application get crashed, but that scenario exists rarely.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4. Low Priority and Low Severity:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;There is a mistake like “You have registered success” instead of successfully, success is written.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain bug leakage and bug release.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Bug Leakage:&lt;/span&gt;&amp;nbsp;When customer or end user discovered a bug which can be detected by the testing team. Or when a bug is detected which can be detected in pervious build then this is called as Bug Leakage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Bug release:&lt;/span&gt;&amp;nbsp;is when a build is handed to testing team with knowing that defect is present in the release. The priority and severity of bug is low. It is done when customer want the application on the time. Customer can tolerate the bug in the released then the delay in getting the application and the cost involved in removing that bug. These bugs are mentioned in the Release Notes handed to client for the future improvement chances.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is alpha and beta testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Alpha testing:&lt;/span&gt;&amp;nbsp;is performed by the IN-House developers. After alpha testing the software is handed over to software QA team, for additional testing in an environment that is similar to the client environment.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Beta testing:&lt;/span&gt;&amp;nbsp;beta testing becomes active. It is performed by end user. So that they can make sure that the product is bug free or working as per the requirement. IN-house developers and software QA team perform alpha testing. The public, a few select prospective customers or the general public performs beta testing.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Monkey testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Monkey testing is a type of Black Box Testing used mostly at the Unit Level. In this tester enter the data in any format and check the software is not crashing. In this testing we use Smart monkey and Dumb monkey.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Smart monkeys are used for load and stress testing, they will help in finding the bugs. They are very expensive to develop.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Dumb monkey, are important for basic testing. They help in finding those bugs which are having high severity. Dumb monkey are less expensive as compare to Smart monkeys.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Example: In phone number filed Symbols are entered.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;paratitle1&quot; id=&quot;dgContent&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; color: #444444; font-size: 20px; margin: 0px 0px 30px; width: 700px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Why Performance Testing is performed?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Performance Testing is performed to evaluate application performance under some load and stress condition. It is generally measured in terms of response time for the user activity. It is designed to test the whole performance of the system at high load and stress condition.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Example: Customer like to withdraw money from an ATM counter, customer inserts debit or credit card and wait for the response. If system takes more than 5 min. then according to requirements system functioning is fail.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Types of Performance Testing:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Load:&lt;/span&gt;&amp;nbsp;analogous to volume testing and determine how application deal with large amount of data.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Stress:&lt;/span&gt;&amp;nbsp;examine application behavior under peak bursts of activity.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Capacity: measure overall capacity and determine at what time response time become unacceptable.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are tools of performance testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Following are some popular commercial testing tools are:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;LoadRunner(HP):&lt;/span&gt;&amp;nbsp;this for web and other application. It provides a variety of application environments, platforms and database. Number of server monitors to evaluate the performance measurement of each component and tracking of bottlenecks.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;QAload(Compuware):&lt;/span&gt;&amp;nbsp;used for load testing of web, database and char-based system.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;WebLoad(RadView):&lt;/span&gt;&amp;nbsp;it allows comparing of running test vs. test metrics.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Rational Performance Tester (IBM):&lt;/span&gt;&amp;nbsp;used to identify presence and cause of system performance bottlenecks.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Silk Performer (Borland):&lt;/span&gt;&amp;nbsp;allow prediction of behavior of e-business environment before it is deployed, regardless of size and complexity.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain the sub-genres of Performance testing.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Following are the sub-genres of Performance Testing:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Load Testing:&lt;/span&gt;&amp;nbsp;it is conducted to examine the performance of application for a specific expected load. Load can be increased by increasing the number of user performing a specific task on the application in a specific time period.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Stress Testing:&lt;/span&gt;&amp;nbsp;is conducted to evaluate a system performance by increasing the number of user more than the limits of its specified requirements. It is performed to understand at which level application crash.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Volume Testing:&lt;/span&gt;&amp;nbsp;test an application in order to determine how much amount of data it can handle efficiently and effectively.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Spike Testing:&lt;/span&gt;&amp;nbsp;what changes happens on the application when suddenly large number of user increased or decreased.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Soak Testing:&lt;/span&gt;&amp;nbsp;is performed to understand the application behavior when we apply load for a long period of time what happens on the stability and response time of application.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is performance tuning?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;To improve the system performance we follow a mechanism, known as Performance tuning. To improve the systems performance there are two types of tuning performed:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Hardware tuning:&lt;/span&gt;&amp;nbsp;Optimizing, adding or replacing the hardware components of the system and changes in the infrastructure level to improve the systems performance is called hardware tuning.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Software tuning:&lt;/span&gt;&amp;nbsp;Identifying the software level bottlenecks by profiling the code, database etc. Fine tuning or modifying the software to fix the bottlenecks is called software tuning.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is concurrent user hits in load testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;When the multiple users, without any time difference, hits on a same event of the application under the load test is called a concurrent user hit. The concurrency point is added so that multiple Virtual User can work on a single event of the application. By adding concurrency point, the virtual users will wait for the other Virtual users which are running the scripts, if they reach early. When all the users reached to the concurrency point, only then they start hitting the requests.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the need for Performance testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Performance testing is needed to verify the below:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Response time of application for the intended number of users&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Maximum load resisting capacity of application.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Capacity of application to handling the number of transactions.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Stability of application under expected and unexpected user load.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Ensuring that users have proper response time on production&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the reason behind performing automated load testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Following drawbacks of manual Load Testing that leads to Automation load testing:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Difficult to measure the performance of the application accurately.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Difficult to do synchronization between the users.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Number of real time users are required to involve in Performance Testing&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Difficult to analyze and identify the results &amp;amp; bottlenecks.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Increases the infrastructure cost&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are the exiting and entering criteria in the performance testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;We can start the performance testing of application during the design. After the execution of the performance testing, we collected the results and analyzed them to improve the performance. The performance tuning processed will be performed throughout the application development life cycle. Performance tuning is performed which is based on factors like release time of application and user requirements of application stability, reliability and scalability under load, stress and performance tolerance criteria. In some projects the end criteria is defined based on the client performance requirements defined for each section of the application. When product reaches to the expected level then that can be considered as the end criteria for performance testing.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;.How do you identify the performance bottlenecks situations?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Performance Bottlenecks can identify by monitoring the application against load and stress condition. To find bottleneck situation in performance testing we use Load Runner because provides different types of monitors like run-time monitor, web resource monitor, network delay monitor, firewall monitor, database server monitor, ERP server resources monitor and Java performance monitor. These monitors can help to us to determine the condition which causes increased response time of the application. The measurements of performance of the application are based on response time, throughput, hits per sec, network delay graphs, etc.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What activities are performed during performance testing of any application?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Following activities are performed during testing of application:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. Create user scenarios&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. User Distribution&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Scripting&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Dry run of the application&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Running load test and analyzing the result&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;paratitle1&quot; id=&quot;dgContent&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; color: #444444; font-size: 20px; margin: 0px 0px 30px; width: 700px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Define performance and stress testing.&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Performance Testing:&lt;/span&gt;&amp;nbsp;Performance Testing is performed to evaluate application performance under some load and stress condition. It is generally measured in terms of response time for the user activity. It is designed to test the whole performance of the system at high load and stress condition.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Stress testing:&lt;/span&gt;&amp;nbsp;It involves imposing the database with heavy loads. Such as, large numbers of users access the data from the same table and that table contains large number of records.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What are the typical problems in web testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;The following problem may arise in web testing:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Functionality problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– User Interface related problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Performance related problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Database related problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– OS compatibility problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Browser compatibility problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Security related problems&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Load related problem&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Navigation problem&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Write the test scenarios for testing a web site?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;First we have to assume that Graphical User Interface (GUI) objects and elements of a website together is One Test Scenario. Then, we have to check all the links and buttons. Then we have to check all forms are working properly or not. Prepare Test Scenarios of the forms of a webpage. We can identify 4 different types of Test Scenarios of a form:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Check the form with valid data in all the fields.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Check the form with invalid data which violate the validations of fields in the form.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Check the form by leaving some mandatory fields in the form.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Check the form with existing record details.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;While testing a website, which are the different configurations which will have to be considered?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;These configurations may demand for change in strategy of the webpage. The most important factors that need consideration are following:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Hardware platform:&lt;/span&gt;&amp;nbsp;some user may use the Mac platform, some may use Linux, while others may use Microsoft platform.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Browsers:&lt;/span&gt;&amp;nbsp;browser and their versions also change the layout of the web page. Along with the browser versions, the different Plug-Ins also has to be taken into consideration. The resolution of the monitor also with color depth and text size is some of the other configurations.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the difference between authentication and authorization in web testing?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The differences between authentication and authorization are:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Authentication is the process with which the system identifies the user whereas authorization is the process after the authentication process.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– The authentication is used to ensure that the user is indeed a user, who he claims to be whereas in authorization system will decide whether a particular task can be performed by the user.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– There are different types of authentications, which can be used like password based authentication, device based authentication whereas in authorization there are two types read only, and read write both.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;Explain the different between HTTP and HTTPS?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The differences between HTTP and HTTPS are following:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Hypertext Transfer Protocol is a protocol for information to be passed back and forth between web servers and clients. Https is refers to the combination of a normal HTTP interaction over an encrypted Secure Sockets Layer (SSL) or Transport Layer Security (TLS) transport mechanism.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– HTTP use port number 80 whereas HTTPS use port number 443.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– HTTP can support the client asking for a particular file to be sent only if it has been updated after a certain date and time whereas Hypertext Transfer Protocol over Secure Socket Layer is built into its browser that encrypts and decrypts user page requests as well as the pages that are returned by the Web server.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is the difference between the static and dynamic website?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The differences between Static and Dynamic website are following:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– A static website contains Web pages with fixed content where as in Dynamic web site content of the web page change with respect to time.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Static website are easy to create and don’t require any database design but in case of dynamic website it require good knowledge to develop the website with programming and database knowledge.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– In static website user cannot communicate with other and same information will be displayed to each user where as in dynamic website user may communicate with each other.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;How do you perform testing on web based application using QTP?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;We can do the performance testing using QTP by adding the web add-in in the QTP at the startup of the QTP. Now to make URL of the website available to the QTP we have to type the URL of the site. So that while running QTP will open the application and do the testing.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What is Cross Site Scripting?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Cross Site Scripting is a thread in the dynamic website. It is also known as XSS. Cross site scripting occurs when a web application gathers malicious data from a user. The data is collected in the hyperlink form which contains malicious content within it. It allows malicious code to be inserted into the web page. The web page can be a simple HTML code or a client side script. When the malicious code is inserted in page and clicked by some user, the malicious code becomes a part of the web request of the user. This request can also execute on the user’s computer and steal information.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;paratitle1&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;text&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.83em 0px;&quot;&gt;What type of security testing you performed?&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;To perform the security testing tester try to attack the system. This is the best way to determine the lope hole in the security area of the application. Most of the systems use encryption technique to store passwords. In this we have to try to get access to the system by using different combinations of passwords. Another common example of security testing is to find if the system is vulnerable to SQL injection attacks. While performing the security testing, tester cannot do any changes in any of the following:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Configuration of the application or the server&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Services running on the server&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Existing user or customer data hosted by the application&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;paratitle1&quot; id=&quot;dgContent&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; color: #444444; font-size: 20px; margin: 0px 0px 30px; width: 700px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border-bottom: 1px solid rgb(217, 221, 224); box-sizing: border-box; padding: 0.4375em 0.3125em;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 1 – What is Component Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;–&lt;/span&gt;Testing of individual software components (Unit Testing).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span id=&quot;more-2338&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/span&gt;Que 2- What’s Compatibility Testing meaning by?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;In Compatibility testing we can test that software is compatible with other elements of system.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 3 – What is Data Driven Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing in which the action of a test case is parameterized by externally defined data values, maintained as a file or spreadsheet. A common technique in Automated Testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 4 – What is the difference between Positive and Negative Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing aimed at showing software works. Also known as “test to pass” is Positive Testing. Testing aimed at showing software does not work. Also known as “test to fail” is Negative Testing&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 5 –&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is fault?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;A fault is condition that causes system to fail in performing the required function.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 6 – What is Performance Testing and Load Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing conducted to evaluate the compliance of a system or component with specified performance requirements. Often this is performed using an automated test tool to simulate large number of users. Also known as “Load Testing”.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ques 7 – What is the Re-testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Retesting- Again testing the functionality of the application.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 8 – What is the importance of Regression testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Ans Regression- Check that change in code have not effected the working functionality&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 9 – Why Agile Testing is important?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Testing practice for projects using agile methodologies, treating development as the customer of testing and emphasizing a test-first design paradigm. See also Test Driven Development.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 10 – What is Basis Path Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;A white box test case design technique that uses the algorithmic flow of the program to design tests.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 11 – What skills needed to be a good test automator?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Good Logic for programming, Analytical skills, Pessimestic in Nature.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 12 –&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Why does software have bugs ?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;1.miscommunication&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2.programming errors&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3.time pressures.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4.changing requirements&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5.software complexity&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 13 – How does Bug affect the computer program?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;A fault in a program which causes&amp;nbsp; perform in an unintended or unanticipated manner.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 14 – What is Defect?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;If software misses some feature or function from what is there in requirement it is called as defect.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 15 – What is the full name of CAST?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Computer Aided Software Testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 16 – What is Capture/Replay Tool?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A test tool that records test input as it is sent to the software under test. The input cases stored can then be used to reproduce the test at a later time. Most commonly applied to GUI test tools.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 17- What is the importance of CMM?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;The Capability Maturity Model for Software (CMM or SW-CMM) is a model for judging the maturity of the software processes of an organization and for identifying the key practices that are required to increase the maturity of these processes.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 18 – What is Code Inspection?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;A formal testing technique where the programmer reviews source code with a group who ask questions analyzing the program logic, analyzing the code with respect to a checklist of historically common programming errors, and analyzing its compliance with coding standards.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 19 – What is Code Walkthrough?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;A formal testing technique where source code is traced by a group with a small set of test cases, while the state of program variables is manually monitored, to analyze the programmer’s logic and assumptions.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 20 –&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Coding?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;It is the generation of source code.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 21 –&lt;/span&gt;&amp;nbsp;What is Data Dictionary?&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A database that contains definitions of all data items defined during analysis.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 22 –&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Data Flow Diagram?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;It is modeling notation that represents a functional decomposition of a system.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 23 –&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;What are main benefits of test automation?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ans&lt;/span&gt;&amp;nbsp;– It’s fast, reliable, comprehensive and reusable.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 24 – What is Gorilla Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;It is a Testing one particular module, functionality heavily.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 25 –&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Gray Box Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A combination of Black Box and White Box testing methodologies testing a piece of software against its specification but using some knowledge of its internal workings.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 26 –&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is High Order Tests?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Black-box tests conducted once the software has been integrated.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 27 –&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Independent Test Group (ITG)?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A group of people whose primary responsibility is software testing,&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 28 – What is Boundary Value Analysis?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;BVA is similar to Equivalence Partitioning but focuses on “corner cases” or values that are usually out of range as defined by the specification. his means that if a function expects all values in range of negative 100 to positive 1000, test inputs would include negative 101 and positive 1001.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ques 29 –&amp;nbsp; What is Code Complete?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Phase of development where functionality is implemented in entirety bug fixes all that left. All functions found in the Functional Specifications have been implemented.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 30 – What is Code Coverage?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;An analysis method that determines which parts of the software have been executed (covered) by the test case suite and which parts have not been executed and therefore may require additional attention.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 31 – What is Cyclomtic Complexity?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;It is a measure of the logical complexity of an algorithm, used in white-box testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 32 – What is Quality Assurance?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;All those planned or systematic actions necessary to provide adequate confidence that a product or service is of the type and quality needed and expected by the customer.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 33-What is Quality Audit?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A systematic and independent examination to determine whether quality activities and related results comply with planned arrangements and whether these arrangements are implemented effectively and are suitable to achieve objectives.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que34 – What is Ramp Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Continuously raising an input signal until the system breaks down.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 35 – What does Recovery Testing mean by&lt;/span&gt;?&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;It Confirms that the program recover from expected or unexpected events without loss of data or functionality. Events can include shortage of disk space, unexpected loss of communication, or power out conditions.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 36 – What is Regression Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Retesting is a previously tested program following modification to ensure that faults have not been introduced or uncovered as a result of the changes made&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 37&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;– What is Security Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Testing which confirms that the program can restrict access to authorized personnel and that the authorized personnel can access the functions available to their security level.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 38 – What is Smoke Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Smoke Testing is a quick-and-dirty test that the major functions of a piece of software work. Originated in the hardware testing practice of turning on a new piece of hardware for the first time and considered it a success if it does not catch on fire.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 39 – What is Static Analysis?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;Analysis of a program carried out without executing the program.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 40 – What is the main work of Static Analysis?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;It is basically tool that carries out static analysis.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 41 – What is Static Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Analysis of a program carried out without executing the program&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ques 42 -What is Test Bed?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;An execution environment configured for&amp;nbsp;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;testing.It&lt;/span&gt;&amp;nbsp;May consist of specific hardware, OS, network topology, configuration of the product under test, other application or system software, etc. The Test Plan for a project should enumerate the test beds(s) to be used.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 43 – What is Test Case?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Test Case is a commonly used term for a specific test. This is usually the smallest unit of testing. A Test Case will consist of information such as requirements testing, test steps, verification steps, prerequisites, outputs, test environment, etc. A set of inputs, execution preconditions, and expected outcomes developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement. Test Driven Development? Testing methodology associated with Agile Programming in which every chunk of code is covered by unit tests, which must all pass all the time, in an effort to eliminate unit-level and regression bugs during development. Practitioners of TDD write a lot of tests, i.e. an equal number of lines of test code to the size of the production code.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 44 – What is Load Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;See Performance Testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 45 – What is Localization Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;This term refers to making software specifically designed for a specific locality.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 46 – What is the meaning of Glass Box Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;&amp;nbsp;It is a synonym for White Box Testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 47 – What is Functional Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Testing the features and operational behavior of a product to ensure they correspond to its specifications. Testing that ignores the internal mechanism of a system or component and focused solely on the outputs generated in response to selected inputs and execution conditions or Black Box Testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 48 – What is Inspection?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;A group review quality improvement process for written material. It consists of two aspects; product (document itself) improvement and process improvement (of both document production and inspection).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 49 – What is Quality Circle?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;A group of individuals with related interests that meet at regular intervals to consider problems or other matters related to the quality of outputs of a process and to the correction of problems or to the improvement of quality.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 50 – What is Quality Control?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;The operational techniques and the activities used to fulfill and verify requirements of quality.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 51 – What is Release Candidate?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;A pre-release version, which contains the desired functionality of the final version, but which needs to be tested for bugs (which ideally should be removed before the final version is released).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 52 – What is Scalability Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Performance testing focused on ensuring the application under test gracefully handles increases in work load.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 53 – What is Software Requirements Specification?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A deliverable that describes all data, functional and behavioral requirements, all constraints, and all validation requirements for software/&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 54 – What is Storage Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Testing that verifies the program under test stores data files in the correct directories and that it reserves sufficient space to prevent unexpected termination resulting from lack of space. This is external storage as opposed to internal storage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 55 – What is Equivalence Partitioning?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;A test case design technique for a component in which test cases are designed to execute representatives from equivalence classes.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 56 – What is Exhaustive Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;Testing which covers all combinations of input values and preconditions for an element of the software under test.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 57 – What is Equivalence Class?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;A portion of a component’s input or output domains for which the component’s behavior is assumed to be the same from the component’s specification.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 58 – What is Functional Decomposition?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;A technique used during planning, analysis and design; creates a functional hierarchy for the software.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 59 – What is Functional Specification?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;IT is a document that describes in detail the characteristics of the product with regard to its intended features.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 60 – What is Conversion Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing of programs or procedures used to convert data from existing systems for use in replacement systems.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 61 –&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What could go wrong with test automation&lt;/span&gt;?&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;Choice of automation tool and the set of test cases&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 62 – What is Debugging?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;It is the process of finding and removing the causes of software failures.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 63 – What is Component?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans-&lt;/span&gt;&amp;nbsp;A minimal software item for which a separate specification is available.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 64 – What are different names for Unit Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans &amp;nbsp;–&amp;nbsp;&lt;/span&gt;Component testing, program testing, Module testing&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 65 – What is CMM?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;The Capability Maturity Model for Software (CMM or SW-CMM) is a model for judging the maturity of the software processes of an organization and for identifying the key practices that are required to increase the maturity of these processes.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 66 – What is Cause Effect Graph?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A graphical representation of inputs and the associated outputs effects which can be used to design test cases.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 67 – What is Boundary Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Test which focus on the boundary or limit conditions of the software being tested. (Some of these tests are stress tests).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 68 – What is Bug?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A fault in a program which causes it to perform in an unintended or unanticipated manner.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 69&amp;nbsp; -What is Beta Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing of a release of a software product conducted by customers.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 70 –&lt;/span&gt;&amp;nbsp;What is Binary Portability Testing?&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing an executable application for portability across system platforms and environments, usually for conformation to an ABI specification.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 71 -What is Black Box Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Testing based on an analysis of the specification of a piece of software without reference to its internal workings. The goal is to test how well the component conforms to the published requirements for the component&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 72- What is Basis Set?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;The set of tests derived using basis path testing.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 73 – What is Baseline?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;The point at which some deliverable produced during the software engineering process is put under formal change control.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 74 – What is Endurance Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Checks for memory leaks or other problems that may occur with prolonged execution.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 75 – What is Metric?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A standard of measurement. Software metrics are the statistics describing the structure or content of a program. A metric should be a real objective measurement of something such as number of bugs per lines of code.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 76 – What is Quality Policy?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;&amp;nbsp;The overall intentions and directions of an organization as regards quality as formally expressed by top management.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 78 – What is Stress Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing conducted to evaluate a system or component at or beyond the limits of its specified requirements to determine the load under which it fails and how. Often this is performance testing using a very high level of simulated load.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 79 – What is Monkey Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&lt;/span&gt;Testing a system or an Application on the fly, i.e. just few tests here and there to ensure the system or an application does not crash out.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 80 – What is Concurrency Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;Multi-user testing geared towards determining the effects of accessing the same application code, module or database records. Identifies and measures the level of locking, deadlocking and use of single-threaded code and locking semaphores&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 81 – What is Backus-Naur Form?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A meta language used to formally describe the syntax of a language.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 82 – What is Basic Block?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans –&amp;nbsp;&lt;/span&gt;A sequence of one or more consecutive, executable statements containing no branches.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Que 83 – What is Sanity Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Ans&lt;/span&gt;&amp;nbsp;– Brief test of major functional elements of a piece of software to determine if it’s basically operational.&lt;/p&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;—————————————————————————————————————————————————-&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Quality?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Customer satisfaction? Subjective term. It will depend on who the ‘customer’ is. Each type of customer will have their own view on ‘quality’&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Software Quality?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Measurement of how close is actual software product to the expected (intended) product&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Customer satisfaction (to who?)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Quality Software: reasonably bug-free, delivered on time and within budget, meets requirements and/or expectations, and is maintainable&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Software Quality Assurance?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Software QA is the process of monitoring and improving all activities associated with software development, from requirements gathering, design and reviews to coding, testing and implementation.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the difference between Software Testing and Software QA?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Testing is mainly an ‘error detection’ process&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Software QA is ‘preventative’. It aims to ensure quality in the methods &amp;amp; processes. (“Quality Assurance”&amp;nbsp; measures the quality of&amp;nbsp;&lt;u style=&quot;box-sizing: border-box;&quot;&gt;processes&lt;/u&gt;used to create a quality product)&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Software Testing?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Software Testing is the process of analyzing the software in order to detect the differences between existing and required conditions and to evaluate the features of the software.&amp;nbsp;It involves the entire software development process:&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– monitoring and improving the process&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– making sure that any agreed-upon standards and procedures are followed&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– ensuring that problems are found and dealt with, at the earliest possible stage&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The purpose of testing is verification, validation and error detection (in order to find and fix the problems)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;u style=&quot;box-sizing: border-box;&quot;&gt;Verification&lt;/u&gt;is checking for conformance and consistency by evaluating the results against pre-specified requirements. (Verification: Are we building the system right?)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;u style=&quot;box-sizing: border-box;&quot;&gt;Validation&lt;/u&gt;&amp;nbsp;is the process of checking that what has been specified is what the user actually wanted. (Validation: Are we building the right system?)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;–&amp;nbsp;&lt;u style=&quot;box-sizing: border-box;&quot;&gt;Error Detection:&lt;/u&gt;&amp;nbsp;finding if things happen when they shouldn’t or things don’t happen when they should.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Is it possible to find/fix all the bugs in a software product before it goes to the customers? Why test?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;To establish and to enforce business systems of the QA Organization (Test planning, bug tracking, bug reporting, test automation, release certification, and others)&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is black/white box testing?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Black box software testing is done without access to the source code.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;White box testing is done with access to the code. Bugs are reported at the source code level, not behavioral.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Describe a bug?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Mismatch between actual behavior of a software application and its intended (expected) behavior. We learn about expected behavior from requirements, specifications,&amp;nbsp;other&amp;nbsp;technical documentation.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is use case?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Use cases are used by Business Analysts as a format for specifying system requirements. Each use case represents completed business operation performed by user.&amp;nbsp; From the QA prospective we would need to execute End-To-End test to make sure the requirement is implemented.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Find more here:&amp;nbsp;&lt;a href=&quot;http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci334062,00.html&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot;&gt;http://searchsoftwarequality.techtarget.com/sDefinition/0,,sid92_gci334062,00.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the most important impact QA can have on a product development process?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Clarifying requirements&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Bringing down percentage of code re-written due to the change in requirements&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Negative testing?&amp;nbsp;Positive?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Positive testing&amp;nbsp;aimed at showing software works as intended when user does what he/she does correct actions.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Negative testing aimed at showing that software handles properly situations in which user acts not as user is supposed to act (invalid inputs, unreasonable selections of settings, etc.)&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Which type of testing results in highest number of bugs found?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Negative testing (versus Positive testing of same type)&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the software development life cycle?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The software development life cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project, from an initial feasibility study through maintenance of the completed application. Read more –&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is a Test Case?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Set of conditions and/or variables under which a tester will determine if a requirement upon an application is satisfied&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What does Test Case include?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;u style=&quot;box-sizing: border-box;&quot;&gt;When planning for testing the test case:&lt;/u&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test case ID&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The purpose (Title, Description) of the test case&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;An instruction on how to get from the&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;application base state&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;to a verifiable application output or expected result&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Expected result&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;u style=&quot;box-sizing: border-box;&quot;&gt;When execute test cases we need two more columns:&lt;/u&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Actual result&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;PASS/FAIL indication&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is a test plan?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Document that describes the objectives, scope, approach, and focus of a software testing effort.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The process of preparing a test plan is a useful way to think through the efforts needed to validate the acceptability of a software product. The completed document will help people outside the test group understand the ‘why’ and ‘how’ of product validation. It should be thorough enough to be useful but not so thorough that no one outside the test group will read it.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What does Test Plan include?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The following are some of the items that might be included in a test plan, depending on the particular project:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Title&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Identification of software including version/release numbers&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Revision history of document including authors, dates, approvals&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Table of Contents&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Purpose of document, intended audience&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Objective of testing effort&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* Software product overview&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Relevant related document list, such as requirements, design documents, other test plans, etc.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Relevant standards or legal requirements&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Traceability requirements&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Relevant naming conventions and identifier conventions&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Overall software project organization and personnel/contact-info/responsibilities&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test organization and personnel/contact-info/responsibilities&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Assumptions and dependencies&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Project risk analysis&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* Testing priorities and focus&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* Scope and limitations of testing&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test outline – a decomposition of the test approach by test type, feature, functionality, process, system, module, etc. as applicable&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Outline of data input equivalence classes, boundary value analysis, error classes&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test environment – hardware, operating systems, other required software, data configurations, interfaces to other systems&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test environment validity analysis – differences between the test and production systems and their impact on test validity.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test environment setup and configuration issues&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Software migration processes&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Software CM processes&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test data setup requirements&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Database setup requirements&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Outline of system-logging/error-logging/other capabilities, and tools such as screen capture software, that will be used to help describe and report bugs&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Discussion of any specialized software or hardware tools that will be used by testers to help track the cause or source of bugs&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test automation – justification and overview&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* Test tools to be used, including versions, patches, etc.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test script/test code maintenance processes and version control&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Problem tracking and resolution – tools and processes&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Project test metrics to be used&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Reporting requirements and testing deliverables&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Software entrance and exit criteria&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Initial sanity testing period and criteria&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test suspension and restart criteria&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;* Personnel allocation&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Personnel pre-training needs&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Test site/location&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Outside test organizations to be utilized and their purpose, responsibilities, deliverables, contact persons, and coordination issues&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Relevant proprietary, classified, security, and licensing issues&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Open issues&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;* Appendix – glossary, acronyms, etc.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Write test cases for a text field?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;5 test cases for capacity including 2 for each boundary and one for the class between boundaries&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;3 test cases for valid/invalid input of letters, digits, special characters&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;One test cases for each allowed special character (email field as an example)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Functionality testing if there is any functionality (validation of input as an example, case sensitivity, required field, etc.)&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Test matrix&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Data collection mechanism.&amp;nbsp;It provides a structure for testing the effect of combining two or more variables, circumstances, types of hardware, or events. Row and column headings identify the test conditions. Cells keep the results of test execution.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;If there are so many settings/options to choose, how to write test cases?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test cases should be developed for all most common potential scenarios&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;They should cover most of the positive input&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Beside test case &amp;amp; test plan, what documents are required to write?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check Lists&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test matrices&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test design specs&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;End-to-end tests&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test summary reports&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Bug reports&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Describe risk analysis&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Risk analysis means the actions taken to avoid things going wrong on a software development project, things that might negatively impact the scope, quality, timeliness, or cost of a project. This is, of course, a shared responsibility among everyone involved in a project. However, there needs to be a ‘buck stops here’ person who can consider the relevant tradeoffs when decisions are required, and who can ensure that everyone is handling their risk management responsibilities.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How will you write test cases for testing fields LOGIN &amp;amp; PASSOWRD, positive and negative testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Testing boundary conditions? Why? How?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Boundary value analysis is a methodology for designing test cases that concentrates software testing effort on cases near the limits of valid ranges.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Boundary value analysis is a method which refines equivalence partitioning.&amp;nbsp;&amp;nbsp;It generates test cases that highlight errors better than equivalence partitioning. The trick is to concentrate software testing efforts at the extreme ends of the equivalence classes.&amp;nbsp;&amp;nbsp;At those points when input values change from valid to invalid errors are most likely to occur.&amp;nbsp;&amp;nbsp;As well, boundary value analysis broadens the portions of the business requirement document used to generate tests.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;For example, if a valid range of quantity on hand is -9,999 through 9,999, write test cases that include: 1. the valid test case&amp;nbsp; quantity on hand is&amp;nbsp; -9,999, 2. the valid test case&amp;nbsp; quantity on hand is 9,999, 3. the invalid test case&amp;nbsp; quantity on hand is -10,000&amp;nbsp; and 4. the invalid test case&amp;nbsp; quantity on hand is&amp;nbsp;&amp;nbsp; 10,000&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the difference between a test case and a test plan?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test plan is the most comprehensive Software Testing document that describes the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;objectives, scope, approach, and focus of a software testing effort&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Test case is the smallest Software Testing document that describes both typical and atypical situation (set of conditions and/or variables) that may occur in the&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;use&lt;/span&gt;&amp;nbsp;of an application (under which a tester will determine if a requirement upon an application is satisfied).&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Which documents would you refer to when creating Test Cases?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;All business and technical documentation available:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– PRD – Product Requirements Document&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– BRD – Business Requirements Document&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Functional Specifications&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Manuals and Help&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Use Cases&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Test Design&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Third party publications (books, published by independent authors)&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Business Requirements Document (BRD)?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;BRD is written by the Business Analysts.&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;It details the business solution for a project including the documentation of customer needs and expectations.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;The most common objectives of the BRD are:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;– To gain agreement with stakeholders&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;– To provide a foundation to communicate to a technology service provider what the solution needs to do to satisfy the customer’s and business’ needs&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;– To provide input into the next phase for this project&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;– To describe what not how the customer/business needs will be met by the solution&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What are Bug Report components?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What fields do you fill out in a Bug Report?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Describe to me the basic elements you put in a defect/bug report?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Report number: Unique number given to the report&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Application / Module being tested&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Version &amp;amp; release number&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Problem Summary / Short Description / Synopsis&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Steps to reproduce (Detailed Description)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Severity (Critical, Serious, Minor, Suggestion)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Priority (High, Medium, Low)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Environment (Software and/or hardware configuration)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Reported by&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Assigned to&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Status (Open, Pending, Fixed, Closed, cannot reproduce, etc.)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Resolution / Notes&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Keywords&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;If you find a bug and the developer says it is as-designed, what can you do?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– find an exact requirement, which defines the way it should be designed&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– if there is no specific requirement compare to same feature implemented in quality applications (ask your manager which applications to compare to)&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How do you write a bug report?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Rule of&amp;nbsp;WWW- What happened, Where it happened, under Which circumstances&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Write one bug report for each fix to be verified&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Bug report should be as complete as possible&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Bug reports are as concise as possible&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Report a bug immediately, do not postpone&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Use technical terms, not “people off the street” language&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the most important part of bug report?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Steps to reproduce&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Short Description&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Severity&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Priority&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Status&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the bug life cycle?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The bug should go through the life cycle to be closed. Here are the stages:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– bug found&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– bug reported&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– bug assigned to developer&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– bug fixed by developer&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– fix verified by tester&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– bug closed&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How can a tester be sure that bug was fixed?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;–&amp;nbsp;execute&amp;nbsp;the steps in the bug report&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– make sure the fixed bug does not result in new bugs in same area.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Describe the QA Process&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;QA processes include:&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;1) Test Planning Process&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) Test Development Process&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3) Test Execution Process&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4) Defect Management Process&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5) Test Reporting Process&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Unit Testing?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;The goal of unit testing is to isolate each part of the program and show that the individual parts (units) are correct.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;A unit is the smallest testable part of an application. It may be an individual function or procedure.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Unit testing is provided by developers, not testers.&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is&amp;nbsp;API&amp;nbsp;Testing?&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Testing of an&amp;nbsp;API(Application Programming Interface), which is a collection of software functions and procedures.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;APItesting is mostly used for testing system software, application software or libraries.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;It is a white box testing method.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;APItesting (done by QA Team) is different from Unit testing (done by developers).&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is the Performance Testing? ?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Performance testing is to determine how fast some aspect of a system performs under a particular workload. It can also serve to validate and verify other quality attributes of the system, such as scalability, reliability and resource usage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Stress Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Stress test puts&amp;nbsp;a&amp;nbsp;emphasis on robustness, availability, and error handling under a heavy load, rather than on what would be considered correct behavior under normal circumstances. The goal may be to ensure the software doesn’t crash in conditions of insufficient computational resources (such as memory or disk space), unusually high concurrency, or denial of service attacks.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is a Regression Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Partial retesting of a modified program to make sure that no errors were introduced while making changes to the code (developing new or fixing existing one)&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;What is an Acceptance Testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Acceptance testing is black-box testing performed on a software prior to its delivery. Acceptance testing by the system provider is distinguished from acceptance testing by the customer (user acceptance testing – UAT).&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What do you prefer: white or black box testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Stick to the objective stated in your resume (Portnov&amp;nbsp;School&amp;nbsp;graduates normally apply for black box testing positions)&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;How do you determine when you have done enough testing?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Testing process comes to the point at which additional tests will not significantly change quality of the software.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Which tools are used to write Test Cases?&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;– Test Management Tools such as HP&amp;nbsp;Quality&amp;nbsp;Center, Zephyr, Rational&amp;nbsp;TestManager&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;– Many companies use spreadsheets (Excel) or word processors (Word)&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is walk-through meeting?&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Walk-through meeting is a form of software peer review in which a designer or programmer leads members of the development team and other interested parties through a software product, and the participants ask questions and make comments about possible errors, violation of development standards, and other problems.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Build?&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;In a programming context, a build is a version of a program. As a rule, a build is a pre-release version and as such is identified by a build number, rather than by a release number. Reiterative (repeated) builds are an important part of the development process. Throughout development, application components are collected and repeatedly compiled for testing purposes.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;What is Test Strategy?&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;A test strategy is an outline that describes the testing portion of the software development cycle. It is created to inform project managers, testers, and developers about some key issues of the testing process.&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h1 id=&quot;q23123&quot; style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.67em 0px;&quot;&gt;Test cases for mobile phone ?&lt;/h1&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Test Cases for Mobile Phone:&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1)Chek whether Battery is inserted into mobile properly&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2)Chek Switch on/Switchoff&amp;nbsp; of&amp;nbsp;the Mobile&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3)Insert the sim into the phone n chek&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4)Add one user with name and phone number in Address book&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5)Chek the Incoming call&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;6)chek the outgoing call&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;7)send/receive messages for that mobile&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;8)Chek all the numbers/Characters on the phone working fine by clicking on them..&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;9)Remove the user from phone book n chek removed properly with name and phone number&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;10)Chek whether Network working fine..&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;11)If its GPRS enabled chek for the connectivity.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;The test cases for mobile phone can be divided into&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1) Functionality&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) Usability&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Functionality:&amp;nbsp;The mobile phone&amp;nbsp;should work as per the specification document.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ex: To verify whether the&amp;nbsp;contact&amp;nbsp;details is&amp;nbsp;added when the user saves the&amp;nbsp;details.&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Usability: How easy to&amp;nbsp;operate?&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;Ex: To verify whether the buttons&amp;nbsp;of&amp;nbsp;the handset is easy to operate&lt;/p&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-4&quot; style=&quot;box-sizing: border-box; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Similary one can&amp;nbsp;design testcases for Pen, Taperecorder, TV etc…….&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Test Cases for Mobile Phone:&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1)Chek whether Battery is inserted into mobile properly&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2)Chek Switch on/Switchoff&amp;nbsp; of&amp;nbsp;the Mobile&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3)Insert the sim into the phone n chek&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4)Add one user with name and phone number in Address book&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5)Chek the Incoming call&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;6)chek the outgoing call&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;7)send/receive messages for that mobile&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;8)Chek all the numbers/Characters on the phone working fine by clicking on them..&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;9)Remove the user from phone book n chek removed properly with name and phone number&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;10)Chek whether Network working fine..&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;11)If its GPRS enabled chek for the connectivity.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;12)if its bluetooth there check it.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;13) check mobile performance&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;14) check the talk time&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;15) check the mobile panel and keys&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Test Cases for Mobile Phone&lt;/p&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;1.Check whether the mobile is switched on&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;2.verify whether the mobile is switched on else switch on the mobile&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;3.Check whether the mobile is connected with proper network&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;4.Check when the mobile is not connected with proper network kindly contact the customer care&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;5.Check whether the mobile has got enough battery&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;6.Check when the mobile has not gort enough battery kindly power on the mobile&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;7.Check whether the mobile is connected with prepaid or postpaid connection.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;8.Check whether the mobile has got enough balance&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;9.Verify if the mobile has not got enough balance kindly recharge the mobile&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;10.Check when you press the keypad it displays as unlock the keypad&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;11.Check whether the display helps us to click the correct button to unlock the keypad&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;12.check whether the user clicks as per the direction given to him the key pad opens&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;13.Check now the user can type anything on the mobile whether it displays on the screen.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;14.Check whether the user can call only to the valid numbers&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;15.Check if the user calls to invalid he hear the invalid numberbeep&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;16.Check whether the user type the valid numbers and presses call button it be connected&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;ans_name&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;media&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;commentText&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;SOME MOBILE PHONE TEST CASES&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;This is not an exhaustive list.&amp;nbsp; As you see, mobile phone testing is a rigorous process that can easily require numerous test cases.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;START UP&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;1) Can fully charge battery&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) Inserting SIM is intuitive and fool-proof&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3) Inserting battery is intuitive and fool-proof&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4) Can power on the mobile phone&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5) Power-on splash screen meets requirements (ex: format, branding)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6) Set-up page asks if you want to set time and date&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;a) returning ‘yes’ allows you to complete set-up&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;b) returning ‘no’ skips set-up&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7) Completing or skipping set-up goes to main page&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;MAIN PAGE&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;1) Text, graphics, format, color scheme, and branding meet requirements&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) Time and date are properly displayed on screen&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3) Signal strength is properly displayed on screen&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4) Battery level is properly displayed on screen&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5) Left soft button text reads ‘Call’&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6) Right soft button text reads ‘Menu’&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7) Pressing left soft button displays Call Log&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8) Pressing right soft button displays Applications Menus&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9) Pressing left return button does nothing&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10) Pressing right clear button does nothing&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;PLACING A CALL&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;1) Pressing a number key opens foreground window&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) Foreground window has proper dimensions and graphics&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3) Selected number is displayed along bottom left of window&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4) The text related to soft key changes from ‘Calls’ to ‘Call’&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5) Pressing additional numbers adds corresponding numbers from left to right&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6) Pressing clear button deletes right-most number&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7) Can clear entire entry&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8) With numbers populated in the foreground window, pressing back button&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;returns to main page&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9) Enter a valid local phone number and place call&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10) Enter a valid long distance number and place call&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;11) Place call when phone has weak signal (1 bar)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;12) Attempt to place a call with no signal&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;13) Place call with low battery&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;14) Place call when battery runs out&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;OTHER TEST CASES TO CONSIDER&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;1) Receiving calls&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;a) during another call&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;b) during an IM session&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;c) while authoring an SMS&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;d) while reading and e-mail&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;e) while playing a game&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;f) while listening to a song&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;e) while taking a picture&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2) Sending and receiving short messages (SMS) with and without attachments&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3) Mobile e-mail&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4) Mobile Instant Messaging&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5) Mobile internet&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6) Bluetooth interface&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7) Camera&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8) Themes&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9) Ringtones&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10) Battery life&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;11) Signal strength&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;12) No-signal conditions&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Test cases can get quite complex.&amp;nbsp; For example, consider the steps required to&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify that a Mobile IM session re-establishes itself after receiving no&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;signal and going back to a good signal area.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;And we’ve just scratched the surface!&amp;nbsp; It would likely take an entire day to&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;produce all of the test cases needed to fully test a cell phone!&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-5&quot; style=&quot;box-sizing: border-box; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;box-sizing: border-box;&quot;&gt;1. Check whether the dimensions of mobile are according to the requirements.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Check whether the functionalities are with respect to the requirements.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Check whether the colour is accroding to requirments.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Check whether the backup for battery is as given in the manual.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Check whether the functionalities are with respect to the manual.(extras,games,email services,bluetooth,camera etc.)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6. Checking for various items as charger,headphones,cable etc.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7. Check whether the functionality of keys are proper.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8. Check whether the model is according to the requirements.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9. Checking for display colour(B/w or colour) of the mobile as mentioned in requirements.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10. Checking for proper signal and network in maximum areas.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;11. Check for memory used for storage.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;12. Checking out for memory where data is stored above the peak value.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;13. Checking for performance of the mobile.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;14. Checking for the usability.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;qd_question&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;h1 id=&quot;q90787&quot; style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.67em 0px;&quot;&gt;Test Cases for Bisleri bottle&lt;/h1&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify&amp;nbsp; the design&amp;nbsp; and graph of the bottle.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify the bottle when you open.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify the bottle when you fill the water.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify the bottle the water falls outside when you fill.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify the bottle when the water is full filled.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify the bottle when you closed.&lt;/p&gt;&lt;p class=&quot;list_answer&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;verify the bottle the water is flow ouside when you after closed&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Test Cases for&amp;nbsp;Mineral Water&amp;nbsp;bottle:&lt;/p&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-6&quot; style=&quot;box-sizing: border-box; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1. To check whether the water should be pure&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. To check whether the water should contain some minerals&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. To check whether the bottle should be compact to drink&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. To check it should be some strong when it slips from hand also it should be safe&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. To check the bottle should be recycled&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6. To check the bottle should come with different capacities&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1.Check the physical appearance of the bottle&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2.It can hold water&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3.Leakage test&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4.Temperature that a bottle can withstand both cold and hot&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5.Material of bottle&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6.Cap of the bottle it fits the bottle&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;7.Engravement of company logo&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;8.How much litre it can hold&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;9.Color of the bottle&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;10.Quality of the product is mentioned (1 to 5 Rating)&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;11.Recyclable, reusable&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;12.Breakable or durability test&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;13.Prize of bottle is mentioned&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; color: navy; font-size: small;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;Test Case for a Traffic Signal&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box; font-size: small;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;1) Check the presence of three lights like Green, Yellow &amp;amp; Red on the traffic light post.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2) Check the switching sequence of the lights.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3) Check the defined time delay between the switching of lights of defined colors.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4) Check the possibility and accuracy of adjustment in defining the time delay between the switching of various lights depending upon the traffic density.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5) Check the switching ON of light of one color at one particular time.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;6) Check the switching of lights from some type of sensor.&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 1em 0px;&quot;&gt;Write test cases of fan?&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;There are numerous&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;nbsp;test cases of&amp;nbsp;&lt;/span&gt;fan which are given below:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 1&lt;/span&gt;: Check whether it moves or not.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that fan should moves properly.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Expected result&lt;/span&gt;: Fan should be moving.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 2&lt;/span&gt;: Check it should have minimum 3 blades.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Description&lt;/span&gt;: Ensure that length of fan blades should be considered to 3 blades.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Length of fan blades should not be shorter than 3 blades.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 3&lt;/span&gt;: Check it should be on when electric button (switch) is on.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that fan should start working when electric switch is on.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan should be on when electric button (switch) is on.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 4&lt;/span&gt;: Check whether Speed of the fan definitely be controlled by the regulator.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that speed of fan should be controlled.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan speed should be controlled by the regulator.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 5&lt;/span&gt;: Check it should be stop working once the electric switch off.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that fan should stop working once the electric switch is off.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan should be off once electric switch is off.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 6&lt;/span&gt;: Check the proper “company name” should be displayed on fan or not.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Always ensure that name of company should be properly displayed on fan.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result; Proper name of company should be displayed on fan.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 7&lt;/span&gt;: Check Fan should always work in&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;clock-wise direction&lt;/span&gt;.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that direction of fan should be in clock-wise.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan should work in clock-wise direction.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 8&lt;/span&gt;: Check the color of the fan blades.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Always ensure that all the blades of fan have same color.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Color of all the blades of fan should be of same color.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 9&lt;/span&gt;: Check the fan during (while) in motion should not vibrate.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that the fan during (while) in motion should not vibrate.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan should not vibrate.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 10&lt;/span&gt;: Check whether the blades should have decent distance from the ceiling.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that fan blades should have decent distance from the ceiling.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan blades should have decent distance.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 11&lt;/span&gt;: Check the size of the fan blades.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Always ensure that all the blades of fan have same size.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result:&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Size of all the blades&lt;/span&gt;&amp;nbsp;of fan should be of same size.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 12&lt;/span&gt;: Check whether it operates in low voltage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that fan should properly operate in low voltage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Fan should be properly operated on low voltage.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test case 13&lt;/span&gt;: Check whether speed varies when regulator adjusted.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Description: Ensure that&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;speed of fan varies&lt;/span&gt;&amp;nbsp;when we adjust the regulator.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Expected result: Speed of fan varies while adjusting the regulator.&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 1em 0px;&quot;&gt;Write Test Cases of Pen?&lt;/h3&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test cases&lt;/span&gt;&amp;nbsp;of pen are given below: –&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;But keep one thing in mind that&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;test cases for pen&amp;nbsp;&lt;/span&gt;may vary if you have different requirements or set of requirements.&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Below is given different test cases of pen&lt;/span&gt;&amp;nbsp;which does not contain any requirements or specifications?&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Test cases of pen are like that&lt;/span&gt;:&lt;/p&gt;&lt;ol style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify the color of the pen.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;2. Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;GUI testing&lt;/span&gt;&amp;nbsp;means logo of the pen maker.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;3. Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Usability testing&lt;/span&gt;&amp;nbsp;means grip of the pen.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;4. Verify whether the pen is ballpoint pen or ink pen.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;5. Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;a href=&quot;http://testingbasicinterviewquestions.blogspot.in/2012/01/what-is-integration-testing-explain-it.html&quot; style=&quot;box-sizing: border-box; color: #1185d7; text-decoration-line: none; transition: all 0.3s ease-in-out 0s;&quot;&gt;Integration Testing&lt;/a&gt;&lt;/span&gt;means cap of the pen should easily fit beside the body of the pen.&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;6. Check pen should be continuously in writing mode.&lt;/li&gt;&lt;/ol&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Some Functional test cases for pen&lt;/span&gt;:&lt;/p&gt;&lt;ol style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check whether it writes on paper or not.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify whether the ink on the paper is belongs with the similar color as what we see in the refill.&lt;/li&gt;&lt;/ol&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Performance and load test cases for pen&lt;/span&gt;:&lt;/p&gt;&lt;ol style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify how it performs when writing on wet paper.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify how it performs when writing on rough paper.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;3&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify how it performs when writing on hand because we occasionally do that&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;4&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check load test means when pen is pressed very hard against the tough surface then pen refill should not come out of the pen.&lt;/li&gt;&lt;/ol&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Negative test cases about pen&lt;/span&gt;:&lt;/p&gt;&lt;ol style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify whether ink is available or not.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check if ink is available, than the pen does not write on the paper.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;3&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify by bend the refill at multiple ends and then try to write&amp;nbsp;with it.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;4&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Verify by dip the pen always in to the water and then write it again.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;5&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check whether it write on leaves or not.&lt;/li&gt;&lt;/ol&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-8&quot; style=&quot;box-sizing: border-box; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Additional test cases for pen&lt;/span&gt;:&lt;/p&gt;&lt;ol style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;usability testing&lt;/span&gt;&amp;nbsp;means test by writing on a section of paper, Examine if you can write smoothly. It should not be writing and stopping among (with) breaks.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;capability or reliability testing&lt;/span&gt;&amp;nbsp;means Test the writing capacity (the amount of writing that is possible from a single refill) of the pen.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;3&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Robustness testing&lt;/span&gt;&amp;nbsp;means Test wherever you can carry the pen in to your shirt and pent pocket using its cap. The cap distension should be solid enough to grip your pocket.&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;4&quot; style=&quot;box-sizing: border-box; margin: 0px; padding: 0px 0px 0px 40px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Check&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;Compatibility testing&lt;/span&gt;&amp;nbsp;means Test by writing on distinct types of surfaces like: rough paper, packing material, glass, leather, cotton, wood, plastic, metals like aluminum or iron, polythene sheet etc.&lt;/li&gt;&lt;/ol&gt;&lt;h1 id=&quot;q48886&quot; style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.67em 0px;&quot;&gt;Write a test case for a car, which has been, recently launch in a market to check its durability, fuel efficiency and its optimum speed.&lt;/h1&gt;&lt;p class=&quot;list_answer&quot; data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;1.check whether the car is moving on high speed while driving in plain&lt;/p&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;2.Check whether the car is giving how much kilometres per litre in different locations such as plain,mountain,slope&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;3.Check whether the car is fully controlable speed when we are driving the car at very high speed&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;1)Check the design of the car compared to other cars of the same price range.&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;2)Check features provided in the car compared to other cars of the same price range.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;3)Check whether the features provided inside are working fine.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;a)power windows&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;b)airbags&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;c)ac&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;d)music system&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;e)central locking&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;f)lights,horn,wipers,gear lever,brakes,accelerator,clutch&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;g)check the odometer and tachometer needle and verify with a gauge.&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4)Drive it in conditions like&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;a)Highway&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;b)City&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;to check mileage,clutch,gear,acceleration&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5)Drive at fairly high speed and slow down to check brakes,steering,control&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Positive test case:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Open gate-&amp;gt;Get inside(see if the roof does not hit your hear, should not be too low)-&amp;gt;Close gate(no screeching sound should be present)-&amp;gt;Check all buttons on dash to work fine(Also check power windows)-&amp;gt;Check Music Player and its controls-&amp;gt;Start car and drive normally to see hear any defect-&amp;gt;stop-&amp;gt;Open door-&amp;gt;Exit-&amp;gt;close door&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Negative test cases:&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;Start the car-&amp;gt;Test the AC for cool air,dust,water-&amp;gt;Start driving-&amp;gt;Check for Shock absorbers on rough patches-&amp;gt;control over high speeds and check-&amp;gt;mileage should me as prescribed by the&amp;nbsp;&lt;span class=&quot;skimlinks-unlinked&quot; style=&quot;box-sizing: border-box;&quot;&gt;company.Stop&lt;/span&gt;&amp;nbsp;very quickly to check brakes-&amp;gt;Open door-&amp;gt;Exit-&amp;gt;close door&lt;/p&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h1 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.67em 0px;&quot;&gt;Test Cases for Pen:&lt;/h1&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;1. Check if the all parts of the pen is fitting properly and no loose fitting. [Installation Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;2. Check if the pen ball is fitted properly and ball is moving with ease. [Installation Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;3. Check if the dimension of the pen as per mentioned in the requirement.&amp;nbsp; [UI Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;4. Size and shape should be confirmable for writing. [UI Testing]&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;5. Logo on the pen should be properly printed. [UI Testing]&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;6. Check if the grip on the pen is superior. [Usability Testing]&lt;/em&gt;&lt;/p&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-9&quot; style=&quot;box-sizing: border-box; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;7. Check if pen is writing smoothly with continuous and not breaking while writing. [Usability Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;8. Check if pen ink is not getting blemish while writing on the paper. [Usability Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;9. Check if pressure needs to be applied on the pen to write down on page with least efforts. [Usability Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;10. Check if pen is usable for similar refills of different brands. [Usability Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;11. Check if pen is writing on the page properly. [Functional Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;12. Check if&amp;nbsp;the ink on the paper is belongs with the similar color as what we see in the refill. [Functional Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;13. Check if written on paper is not getting fade out after some time. If the requirement saying about ink is water proof then apply water on written text and check the&amp;nbsp;behaviour&amp;nbsp;of the ink. [Functional Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;14. Check if the pen is making width of line as per the specified millimeter range. If the pen is coming with two different sets of millimeter ranges i.e. 0.5 mm and 0.7 mm then make sure that line width is properly producing by pen as per design. [Validation Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;15. Check if pen is properly working in the flight where different pressure conditions. [Performance testing]&lt;/em&gt;&lt;/p&gt;&lt;div class=&quot;wpInsert wpInsertInPostAd wpInsertMiddle&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;/div&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;16. Check if pen is not used for substantial period of time and check if ink is not clot inside the pen. Check if user able to access the pen with ease. [Recovery testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;17. Check if the material used to manufacture is safe to use for chewing or kept in mouth. Generally users are use to put the pen in mouth while writing, so make sure that pen is safe put in mouth or chewing.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;18. Check if ink in not being leak from refill in normal conditions.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;19. Check if pen is working with different writing angles like the notice is displayed on notice board and user want to write on the notice board.&lt;/em&gt;&lt;/p&gt;&lt;p class=&quot;inline-ad-slot&quot; data-adtags-visited=&quot;true&quot; data-adtags-width=&quot;700&quot; id=&quot;inline-ad-10&quot; style=&quot;box-sizing: border-box; float: left; height: 0px; margin: 0px auto; overflow: hidden; width: 700px;&quot;&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;20. Check if the flow of ink is consistent while writing. The Badly designed pens have the problem with uneven ink flows.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;21. Check if the pen ink is not getting dry very quickly or very slowing. While writing on page ink coming out of the pen point, so it should neither dry quickly nor dry too late.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;22. Check if the pen is properly working on Space environment if it mentioned in the requirement specifications. [Capability testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;23. Check if how much long you can able to write with the single refill of pen. [Capability testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;24. Check if pen is properly writing on different type’s surfaces like smooth paper, rough paper, wooden material, plastic, leather, steel, glass etc. [Compatibility Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;25. Check if pen is properly gripped on the shirt pocket and user able to carry on pocket with ease. [Robustness Testing]&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;26. Check if pen writing point is strong enough to bear a load of different users like some user used to write with some extra pressure on the pen tip. [Robustness Testing]&lt;/em&gt;&lt;/p&gt;&lt;h1 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.67em 0px;&quot;&gt;&lt;/h1&gt;&lt;h1 style=&quot;box-sizing: border-box; color: #283d4b; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, Arial, sans-serif; margin: 0.67em 0px;&quot;&gt;Negative Test Cases&amp;nbsp;for&amp;nbsp;Pen:&lt;/h1&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;26. Check pen stress testing by dropping pen down from practical height and check if nothing is breaking, no any damage to pen and pen is working without any issues.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;27. Hold the pen upwards direction for some time and try to write on paper.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;28. Keep the pen in water and try to write on paper.&lt;/em&gt;&lt;/p&gt;&lt;p data-adtags-visited=&quot;true&quot; style=&quot;box-sizing: border-box; margin: 1em 0px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;29. Check how pen is working at different climate environmental conditions like at room temperature, different climate conditions.&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/8818394500121971928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2021/04/testing-interview-questions-and-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8818394500121971928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8818394500121971928'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2021/04/testing-interview-questions-and-answers.html' title='Testing Interview Questions and Answers-Freshers'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-1871078608457237499</id><published>2021-04-11T23:45:00.010-07:00</published><updated>2021-04-11T23:53:10.499-07:00</updated><title type='text'>Test Automation Framework</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span&gt;&lt;div style=&quot;color: #2b00fe; font-style: italic; font-weight: bold; text-decoration-line: underline;&quot;&gt;What is a Test Automation Framework?&lt;/div&gt;&lt;div style=&quot;color: #2b00fe; font-style: italic; font-weight: bold; text-decoration-line: underline;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A test automation framework is a set of universal guidelines and rules used to produce beneficial results of the test automation activity. The automation framework brings together function libraries, test data sources, object details, and other reusable modules and methods. Automation framework makes testing consistent. Some of the guidelines are as follows:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Rules for writing test cases&lt;/li&gt;&lt;li&gt;Coding guidelines for creating test scripts&lt;/li&gt;&lt;li&gt;Input test data templates&lt;/li&gt;&lt;li&gt;Object repository management&lt;/li&gt;&lt;li&gt;Log configuration&lt;/li&gt;&lt;li&gt;Test result and reporting usage&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b style=&quot;color: #2b00fe;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b style=&quot;color: #2b00fe;&quot;&gt;&lt;i&gt;&lt;u&gt;What are Test Automation Framework development challenges?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Some of the challenges that you come across while using frameworks are:&lt;br /&gt;&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ability to understand what needs to be achieved out of test automation&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Identifying requirements from multiple areas to design automation Framework&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Tool identification&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What are the attributes of a good Test Automation Framework?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Modular: The framework should be adaptable to change.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Reusable – The commonly used methods or utilities should be kept in a common file which is easily accessible to all the scripts.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Consistent – The test suite should be written in a consistent format by following the coding practices.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Independent – The test scripts should be written in such a way that they are independent of each other.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Logging – It is good to have implemented the logging feature in the framework.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Reporting – Once the scripting is done, we can have the results and reports sent via email.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration – Automation framework should be such that it is easy to integrate with other applications&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;p style=&quot;box-sizing: border-box; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: justify; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What are good coding practices that should be followed while writing test cases for automation?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Certain good practices that you should follow when writing test cases are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use comments at the appropriate places&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Maintain separate files for reusable functions&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Follow coding conventions&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Run scripts regularly&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the different types of Automation Testing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Different types of test automation are unit tests, GUI tests, and functional tests.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Unit tests are usually done during the development phase to reduce the bugs&lt;/div&gt;&lt;div&gt;GUI tests are done at the testing level, where tests are scripted to test how the user interface of an application behaves.&lt;/div&gt;&lt;div&gt;Functional tests are also done at the testing level to simulate the functional scenarios to test the application with provided input and for expected output.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is data-driven testing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The aim of data-driven automation testing is to simplify the testing process involving complex and huge data sets. In Data Driven Testing the test data includes input, expected output, and a result field. These fields are listed in files like CSV files, excel files, text files, XML files etc. These files are then fed to automation tool for execution, which in turn compares the expected and actual data. Then the obtained results are documented in the result field.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the important modules of Test Automation Framework?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Test Assertion Tool: This module will provide assert statements for testing the expected values in the application under test.&lt;/li&gt;&lt;li&gt;Data Setup: Each test case needs to take the user data either from the database or from a file or embedded in the test script.&lt;/li&gt;&lt;li&gt;Build Management Tool: Tool that you can use to build a framework so that you can create test scripts.&lt;/li&gt;&lt;li&gt;Continuous integration tool: Continuous Integration/Continuous Delivery tools are required for integrating and deploying the changes done in the framework at each iteration.&lt;/li&gt;&lt;li&gt;Reporting tool: A reporting tool is required to generate a readable report after the test cases are executed. This way you can get a better view of the steps, results, and failures.&lt;/li&gt;&lt;li&gt;Logging tool: The logging tool in the framework helps in better debugging of the error and bugs.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What do you think are the use cases where implementing automation is not suggested?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;100% test automation is impossible. Manual testing is still necessary. Tests that cannot be automated are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Ad hoc testing – Here testing is done without preparation and writing test cases. During ad hoc testing, a QA specialist randomly tests the functionality of the system; his aim is to be creative, “break” the system and discover flaws.&lt;/li&gt;&lt;li&gt;Exploratory testing – During exploratory testing, a QA specialist tests a product like an explorer, relying on his personal experience. After getting the idea of a product’s functionality, a tester designs test cases which he uses to further test the product. In exploratory testing, the tester needs to rely on his personal experience and design test cases in the testing process.&lt;/li&gt;&lt;li&gt;User interface testing – Here, a QA specialist validates the properties and states of interface elements. Also, they make sure that design elements in the interface match elements in the final layout.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the advantages &amp;amp; disadvantages of using Automation Testing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Advantages of automation testing are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Improves the reliability of tests&lt;/li&gt;&lt;li&gt;Reduces maintenance cost&lt;/li&gt;&lt;li&gt;Increases amount of test coverage&lt;/li&gt;&lt;li&gt;Increases the speed of test execution&lt;/li&gt;&lt;li&gt;Improves accuracy of the software tests&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Disadvantages of automation testing include:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Development and maintenance time is more&lt;/li&gt;&lt;li&gt;The initial investment is high&lt;/li&gt;&lt;li&gt;Skilled resources are required&lt;/li&gt;&lt;li&gt;Environment set up is complex&lt;/li&gt;&lt;li&gt;Debugging test scripts is difficult&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the advantages of using an Automation Framework?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The advantages of using test automation framework, are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Re-usability of code&lt;/li&gt;&lt;li&gt;Reliable recovery scenarios&lt;/li&gt;&lt;li&gt;Maximum test coverage&lt;/li&gt;&lt;li&gt;Low maintenance cost&lt;/li&gt;&lt;li&gt;High Return of Investment(ROI) in the long run&lt;/li&gt;&lt;li&gt;Minimal manual intervention&lt;/li&gt;&lt;li&gt;Easy reporting capabilities&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the different approaches to Test Automation?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Code-Driven Testing:&lt;/b&gt; Here the focus is mainly on test case execution to find out if the various sections of code are performing as per expectations or not. This testing approach is a popular method used in agile software development.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Graphical User Interface (GUI) Testing:&lt;/b&gt; Applications that have GUIs may be tested using this approach. Testers can record user actions and analyze them any number of times. Test cases can be written in a number of programming languages like C#, Java, Perl, Python etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Test Automation Framework: &lt;/b&gt;Framework is a set of guidelines used to produce beneficial results of the automated testing activity.&amp;nbsp; It brings together function libraries, test data sources, object details, and other reusable modules.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;When is Automation testing useful? Which test cases to Automate?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is impossible to automate all test cases, so it is important to determine which ones to be automated first. There are some top candidates like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Repetitive tasks are primary candidates. Not only are those tasks boring, but they’re often the ones where mistakes are most common.&lt;/li&gt;&lt;li&gt;Tests that require multiple data sets. Rather than manually typing in all the information into fields, automate the process to read in information from a data source, and automatically type it into the respective forms.&lt;/li&gt;&lt;li&gt;Tests that run on several different hardware or software platforms and configurations.&lt;/li&gt;&lt;li&gt;Manually exporting bulk of data, crunching the numbers, and making detailed graphs is time-consuming. You can invest in a tool or automation strategy that will do the task for you.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;When should you prefer Manual Testing over Automation Testing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are certain cases where manual testing is preferred over automation testing, like:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Short-time projects: Though automated tests are aimed at saving time and resources, it takes time and resources to design and maintain them. For example, if you are building a small promotional website, it can be much more efficient to rely on manual testing.&lt;/li&gt;&lt;li&gt;Ad-hoc Testing: In ad-hoc testing, there is no specific approach. It is a totally unplanned method of testing where the understanding and insight of the tester is the only important factor.&lt;/li&gt;&lt;li&gt;Exploratory Test: This type of testing requires the tester’s knowledge, experience, analytical, logical skills, creativity, and intuition. So human involvement is important in exploratory testing.&lt;/li&gt;&lt;li&gt;Usability Testing: Here the tester needs to measure how user-friendly, efficient, or convenient the software or product is for the end users. Human observation is the most important factor, so a manual approach is preferable.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the different types of automation frameworks that are available?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Linear Scripting Framework: It is a basic level test automation framework which is in the form of ‘Record and Playback’ but in a linear fashion. This type of framework is mostly used to test small sized applications.&lt;/li&gt;&lt;li&gt;Data-Driven Framework: It is used to create test automation scripts by passing different sets of test data. The test data which includes input, expected output and a result field are stored in files like CSV files, excel files, text files, XML files etc.&lt;/li&gt;&lt;li&gt;Modular Testing Framework: Here the testers divide the application into multiple small modules and create test scripts individually. These individual test scripts are combined to make larger test scripts by using a master script to achieve the required scenarios.&lt;/li&gt;&lt;li&gt;Keyword Driven Framework: In this framework, testers use a table format to define keywords or action words for each method. Based on the keywords specified in the excel sheet test, scripting is done and tests are executed.&lt;/li&gt;&lt;li&gt;Hybrid Testing Framework: As the name suggests, this framework is the combination of two or more frameworks mentioned above. It attempts to leverage the strengths and benefits of other frameworks based on tester’s requirements.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Why use automation frameworks? What are the benefits that they offer?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Using automation framework avails a lot of benefits like:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The framework enables consistency in testing. It provides a universal standard for testers to achieve the specific goals of their automated tests.&lt;/li&gt;&lt;li&gt;Automation frameworks, when designed and implemented correctly, they deliver frequent and stable automated test code&lt;/li&gt;&lt;li&gt;With a proper framework, the code is easier to maintain and reuse&lt;/li&gt;&lt;li&gt;Even with limited knowledge of how the test case is set up, a tester can depend on the framework to refer to simple statements and implement the test cases with ease.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/1871078608457237499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2021/04/what-are-test-automation-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/1871078608457237499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/1871078608457237499'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2021/04/what-are-test-automation-framework.html' title='Test Automation Framework'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8805403795653453599.post-8620511436027389048</id><published>2021-04-08T23:41:00.028-07:00</published><updated>2022-10-12T00:22:05.159-07:00</updated><title type='text'>Cyber Security Interview questions</title><content type='html'>&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Which OSI layer is responsible for ordered delivery of packets?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The transport layer is also responsible for the management of error correction, providing quality and reliability to the end user. This layer enables the host to send and receive error corrected data, packets or messages over a network and is the network component that allows multiplexing. It ensures that packets are always delivered in strict sequence. Although the network layer is responsible, the transport layer can fix any discrepancies in sequence caused by packet drops or device interruption.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is Malware?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Malicious software or malware is any program that seeks to do harm or steal information. There are many defenses in place to protect you from malware, such as antivirus and antispyware software, firewalls and spam filters, but these tools cannot protect you if you unwittingly cooperate with malware.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Examples of different kinds of malware that could infect your computer include:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Viruses and worms&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Bots and Zombies&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Spyware and Adware&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ransomware and Fake Antivirus software and&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Trojan Horses&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Attack Vectors:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Email Attachments&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Email messages&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Downloaded Programs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Instant Messages&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SPAM Email&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Social networks&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Mobile Data devices&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is the standard IANA port number used for requesting web pages?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;On a Web server or Hypertext Transfer Protocol daemon, port 80 is the port that the server &quot;listens to&quot; or expects to receive from a Web client, assuming that the default was taken when the server was configured or set up.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What type of offence does slandering is categorized as?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Slandering is categorized as cyberstalking. Cyberstalking is a crime in which the attacker harasses a victim using electronic communication, such as e-mail or instant messaging (IM), or messages posted to a Web site or a discussion group. A cyberstalker relies upon the anonymity afforded by the Internet to allow them to stalk their victim without being detected. Cyber stalking can be terribly frightening. It can destroy friendships, credit, careers, self-image, and confidence. Ultimately it can lead the victim into far greater physical danger when combined with real-world stalking. Yes, we&#39;re talking serious stuff here. Victims of domestic violence are often cyber stalking victims. They, like everybody else, need to be aware that technology can make cyber stalking easy. Spyware software can be used to monitor everything happening on your computer or cell phone, giving tremendous power and information to Cyber stalkers.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Most Common Forms of Cyber Security Threats&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;1. Phishing&lt;/b&gt; - It is the practice of sending false emails that appear to be from legitimate sources. The goal is to steal sensitive information such as credit card numbers and login details. It is the most prevalent form of cyber security attack. You can protect yourself by making yourself aware of the same or using a technological solution that filters out dangerous emails.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;2. Ransomware&lt;/b&gt; - The term &quot;ransomware&quot; refers to a type of harmful software with the purpose to extort money from users. This cyber security attack prevents access to data or the computer system until a ransom is paid. Even if the ransom is paid, it does not ensure file retrieval or that your system will be restored.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;3. Malware&lt;/b&gt; - This is a form of software that is meant to gain unauthorized access to a computer or to cause harm to it. This cyber security threat is mainly delivered through emails or as an authentic download.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;4. Social Engineering&lt;/b&gt; - Adversaries employ this type of attack to deceive you into disclosing sensitive information. They might demand money or obtain access to your private information. This cyber security threat can be used in conjunction with any of the dangers outlined above to increase your likelihood of clicking on links, downloading malware, or trusting a malicious source.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is network security, and what are its types?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Network security is essentially a set of rules and configurations formulated to protect the accessibility, confidentiality, and integrity of computer networks and data with the help of software and hardware technologies.&amp;nbsp; Types of network security:&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Network access control: To prevent attackers and infiltrations in the network, network access control policies are in place for both users and devices at the most granular level. For example, access authority to network and confidential files can be assigned and regulated as needed.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Antivirus and antimalware software: Antivirus and antimalware software are used to continuously scan and protect against malicious software, viruses, worms, ransomware, and trojans.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Firewall protection: Firewalls act as a barrier between your trusted internal network and an untrusted external network. Administrators can configure a set of defined rules for the permission of traffic into the network.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Virtual private networks (VPNs): VPNs form a connection to the network from another endpoint or site. For example, an employee working from home uses a VPN to connect to the organization’s network. The user would need to authenticate to allow this communication. The data between the two points is encrypted.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Distinguish between phishing and spoofing?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Phishing and spoofing are totally different beneath the surface. One downloads malware to your PC or network, and the other part tricks you into surrendering sensitive monetary data to a cyber-crook. Phishing is a technique for recovery, while spoofing is a method for delivery.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is network sniffing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;System sniffing includes utilizing sniffer tools that empower real- time monitoring and analysis of data streaming over PC systems. Sniffers can be utilized for various purposes, regardless of whether it’s to steal data or manage systems. Network sniffing is utilized for ethical and unethical purposes. System administrators utilize these as system monitoring and analysis tool to analyse and avoid network related issues, for example, traffic bottlenecks. Cyber criminals utilize these devices for untrustworthy purposes, for example, character usurpation, email, delicate information hijacking etc.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is Network Enumeration?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Network Enumeration is the revelation of hosts/gadgets on a network, they tend to utilize obvious disclosure protocols, for example, ICMP and SNMP to gather data, they may likewise check different ports on remote hosts for looking for surely known services trying to further recognize the function of a remote host.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How can you avoid ARP poisoning?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ARP poisoning is a type of network attack that can be resolved through these techniques:&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Using Packet filtering: Packet filters can filter out &amp;amp; block packets with clashing source address data.&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Keeping away from trust relationship: Organizations ought to develop a protocol that depends on trust relationship as little as they can.&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Utilize ARP spoofing software: Some programs assess and certify information before it is transmitted and blocks any information that is spoofed.&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What does Authentication Service facilitates?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Authentication Service facilitates username/password validation using your on-premises Active Directory/LDAP server. Authentication Service is installed as a virtual appliance and communicates with your local directory using LDAP over SSL. It can operate in the DMZ or inside the local area network (LAN), or both, based on the mode(s) of operation. An authentication server is an application that facilitates authentication of an entity that attempts to access a network. Such an entity may be a human user or another server. An authentication server can reside in a dedicated computer, an Ethernet switch, an access point or a network access server. Hence, authentication Service facilitates username and password check.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What does SSO refers to?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SSO expands to Single Sign On. Single sign-on (SSO) is a property of access control of multiple related, but independent software systems. With this property a user logs in with a single ID and password to gain access to a connected system or systems without using different usernames or passwords, or in some configurations seamlessly sign on at each system. This is typically accomplished using the Lightweight Directory Access Protocol (LDAP) and stored LDAP databases on servers. A simple version of single sign-on can be achieved over IP networks using cookies but only if the sites share a common DNS parent domain&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is SSO (Single Sign-On)?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A friend recently went through the irksome experience of being signed out from a number of websites they use daily. This event will be familiar to millions of web users, and it is a tedious process to fix. It can involve trying to remember multiple long-forgotten passwords, or typing in the names of pets from childhood to answer security questions. SSO removes this inconvenience and makes life online better. But how does it work?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Basically, Single Sign-On (SSO) is an authentication scheme. It allows a user to log in to different systems using a single ID.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The diagram below illustrates how SSO works.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEijJ6IJZ_t_glMfSTmXgb1OLysryxIZ0tAxkkZF5W-sECMZj6mKG66xONyTOsQeT_gOe-PZ7lGEekqJkfv4puOWjvv-Jbb2mtynn-I51Z44tOJfdEf9A5CxjGYYH1FwL-6Lj_pt_ZRSfTycLhyxwy2rRo1uby5T6KvDa7uLW00ClNMf6ZqP_t3KqIrh3g&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;608&quot; data-original-width=&quot;832&quot; height=&quot;468&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEijJ6IJZ_t_glMfSTmXgb1OLysryxIZ0tAxkkZF5W-sECMZj6mKG66xONyTOsQeT_gOe-PZ7lGEekqJkfv4puOWjvv-Jbb2mtynn-I51Z44tOJfdEf9A5CxjGYYH1FwL-6Lj_pt_ZRSfTycLhyxwy2rRo1uby5T6KvDa7uLW00ClNMf6ZqP_t3KqIrh3g=w640-h468&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Step 1: A user visits Gmail, or any email service. Gmail finds the user is not logged in and so redirects them to the SSO authentication server, which also finds the user is not logged in. As a result, the user is redirected to the SSO login page, where they enter their login credentials.&lt;/li&gt;&lt;li&gt;Steps 2-3: The SSO authentication server validates the credentials, creates the global session for the user, and creates a token.&lt;/li&gt;&lt;li&gt;Steps 4-7: Gmail validates the token in the SSO authentication server. The authentication server registers the Gmail system, and returns “valid.” Gmail returns the protected resource to the user.&lt;/li&gt;&lt;li&gt;Step 8: From Gmail, the user navigates to another Google-owned website, for example, YouTube.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Steps 9-10: YouTube finds the user is not logged in, and then requests authentication. The SSO authentication server finds the user is already logged in and returns the token.&lt;/li&gt;&lt;li&gt;Step 11-14: YouTube validates the token in the SSO authentication server. The authentication server registers the YouTube system, and returns “valid.” YouTube returns the protected resource to the user.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;The process is complete and the user gets back access to their account.&lt;/div&gt;&lt;div&gt;Over to you:&amp;nbsp;&lt;/div&gt;&lt;div&gt;Question 1: have you implemented SSO in your projects? What is the most difficult part?&lt;/div&gt;&lt;div&gt;Question 2: what’s your favorite sign-in method and why?&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is Nmap?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Nmap, short for Network Mapper, is a network discovery and security auditing tool. It is known for its simple and easy to remember flags that provide powerful scanning options. Nmap is widely used by network administrators to scan for:&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Open ports and services&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Discover services along with their versions&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Guess the operating system running on a target machine&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Get accurate packet routes till the target machine&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Monitoring hosts&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Nmap Scan Types&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A variety of scans can be performed using Nmap. Below are the types of scans:&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;1) TCP SCAN&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A TCP scan is generally used to check and complete a three-way handshake between you and a chosen target system. A TCP scan is generally very noisy and can be detected with almost little to no effort. This is “noisy” because the services can log the sender IP address and might trigger Intrusion Detection Systems.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;2) UDP SCAN&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;UDP scans are used to check whether there is any UDP port up and listening for incoming requests on the target machine. Unlike TCP, UDP has no mechanism to respond with a positive acknowledgment, so there is always a chance for a false positive in the scan results. However, UDP scans are used to reveal Trojan horses that might be running on UDP ports or even reveal hidden RPC services. This type of scan tends to be quite slow because machines, in general, tend to slow down their responses to this kind of traffic as a precautionary measure.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;3) SYN SCAN&lt;br /&gt;&lt;/b&gt;This is another form of TCP scan. The difference is unlike a normal TCP scan, nmap itself crafts a syn packet, which is the first packet that is sent to establish a TCP connection. What is important to note here is that the connection is never formed, rather the responses to these specially crafted packets are analyzed by Nmap to produce scan results.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;b&gt;4) ACK SCAN&lt;br /&gt;&lt;/b&gt;ACK scans are used to determine whether a particular port is filtered or not. This proves to be extremely helpful when trying to probe for firewalls and their existing set of rules. Simple packet filtering will allow established connections (packets with the ACK bit set), whereas a more sophisticated stateful firewall might not.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;b&gt;5) FIN SCAN&lt;br /&gt;&lt;/b&gt;Also a stealthy scan, like the SYN scan, but sends a TCP FIN packet instead. Most but not all computers will send an RST packet (reset packet) back if they get this input, so the FIN scan can show false positives and negatives, but it may get under the radar of some IDS programs and other countermeasures.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;b&gt;6) NULL SCAN&lt;/b&gt;&lt;br /&gt;Null scans are extremely stealthy scan and what they do is as the name suggests — they set all the header fields to null. Generally, this is not a valid packet and a few targets will not know how to deal with such a packet. Such targets are generally some version of windows and scanning them with NULL packets may end up producing unreliable results. On the other hand, when a system is not running windows this can be used as an effective way to get through.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;b&gt;7)XMAS SCAN&lt;/b&gt;&lt;br /&gt;Just like null scans, these are also stealthy in nature. Computers running windows will not respond to Xmas scans due to the way their TCP stack is implemented. The scan derives its name from the set of flags that are turned on within the packet that is sent out for scanning. XMAS scans are used to manipulate the PSH, URG and FIN flags that can be found in the TCP header.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;8)RPC SCAN&lt;/b&gt;&lt;br /&gt;RPC scans are used to discover machines that respond to Remote Procedure Call services (RPC). RPC allows commands to be run on a certain machine remotely, under a certain set of connections. RPC service can run on an array of different ports, hence, it becomes hard to infer from a normal scan whether RPC services are running or not. It is generally a good idea to run an RPC scan from time to time to find out where you have these services running.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;9)IDLE SCAN&lt;/b&gt;&lt;br /&gt;IDLE scan is the stealthiest of all scans discussed in this nmap tutorial, as the packets are bounced off an external host. Control over the host is generally not necessary, but the host needs to meet a specific set of conditions. It is one of the more controversial options in Nmap since it only has a us&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: small;&quot;&gt;&lt;u&gt;&lt;i&gt;Nmap Commands&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;box-sizing: border-box; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: justify; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In this section of Nmap Tutorial, I’ll be listing down the various commands you can use in Nmap along with their flag and usage description with an example on how to use it.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: center; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Scanning Techniques&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; border-style: dashed; color: #4a4a4a; height: 120px; margin-bottom: 1.125rem; table-layout: fixed; width: 492px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; border-style: dotted; box-sizing: border-box; color: white; text-align: center;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 107.841px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 223.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 213.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-style: dotted; box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 107.841px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;-&lt;span style=&quot;color: black;&quot;&gt;sS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 223.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;TCP syn port scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 213.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -sS 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-style: dotted; box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 107.841px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-sT&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 223.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;TCP connect port scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 213.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -sT 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-style: dotted; box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 107.841px;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;–&lt;/span&gt;sU&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 223.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;UDP port scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 213.295px;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;nmap –&lt;/span&gt;sU&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;border-style: dotted; box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 107.841px;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;–&lt;/span&gt;sA&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 223.295px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;TCP ack port scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 213.295px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;nmap –&lt;/span&gt;sA&lt;/span&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;192.168.1.1&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-size: 16px; height: 155px; margin-bottom: 1.125rem; table-layout: fixed; width: 366px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; border-style: solid; box-sizing: border-box; color: white; height: 24px; text-align: center;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 84px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 234px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 226px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 84px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;-&lt;span style=&quot;color: black;&quot;&gt;Pn&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 234px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;only port scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 226px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -Pn192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 84px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-sn&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 234px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;only host discover&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 226px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -sn192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 84px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-PR&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 234px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;arp discovery on a local network&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 226px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -PR192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 84px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-n&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 234px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;disable DNS resolution&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 226px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -n 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; word-break: break-word;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;graf graf--p graf-after--blockquote graf--trailing&quot; id=&quot;08c5&quot; style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: center; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Port Specification&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-size: 16px; height: 121px; margin-bottom: 1.125rem; table-layout: fixed; width: 366px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; color: white; height: 24px; text-align: center;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 81px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 223px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 240px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 81px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-p&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 223px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;specify a port or port range&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 240px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -p 1-30 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 81px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-p-&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 223px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;scan all ports&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 240px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -p- 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 81px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-F&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 223px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;fast port scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 240px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -F 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; word-break: break-word;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;graf graf--p graf-after--blockquote graf--trailing&quot; id=&quot;08c5&quot; style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: center; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Service Version and OS Detection&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-size: 16px; height: 123px; margin-bottom: 1.125rem; table-layout: fixed; width: 366px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; color: white; height: 24px; text-align: center;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 79px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 207px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 79px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;-&lt;span style=&quot;color: black;&quot;&gt;sV&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;detect the version of services running&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 207px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -sV 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 79px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-A&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;aggressive scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 207px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -A 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 79px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-O&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;detect operating system of the target&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 207px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -O 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; word-break: break-word;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: center; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Timing and Performance&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-size: 16px; height: 210px; margin-bottom: 1.125rem; table-layout: fixed; width: 569px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; border-style: solid; box-sizing: border-box; color: white; height: 24px; text-align: center;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;-&lt;span style=&quot;color: black;&quot;&gt;T0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;paranoid IDS evasion&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -T0 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-T1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;sneaky IDS evasion&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -T1 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-T2&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;polite IDS evasion&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -T2 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-T3&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;normal IDS evasion&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -T3 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-T4&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;aggressive speed scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -T4 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; padding-left: 5px; text-align: center; width: 95px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-T5&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; padding-left: 5px; text-align: center; width: 238px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;insane speed scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; padding-left: 5px; text-align: center; width: 211px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -T5 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; word-break: break-word;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;graf graf--p graf-after--blockquote graf--trailing&quot; id=&quot;08c5&quot; style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: center; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;NSE Scripts&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-size: 16px; height: 92px; margin-bottom: 1.125rem; table-layout: fixed; width: 366px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; color: white; height: 24px; text-align: center;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 144px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 180px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; width: 220px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 144px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-sC&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 180px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;default script scan&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 220px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -sC 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 144px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;–script banner&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 180px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;banner grabbing&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-style: solid; box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 220px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap –script banner 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; word-break: break-word;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;graf graf--p graf-after--blockquote graf--trailing&quot; id=&quot;08c5&quot; style=&quot;box-sizing: border-box; color: #4a4a4a; font-size: 16px; line-height: 1.7; margin-bottom: 1rem; margin-top: 0px; text-align: center; word-break: break-word;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;IDS Evasion&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;center&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-size: 16px; height: 122px; margin-bottom: 1.125rem; table-layout: fixed; width: 366px;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; color: white; height: 24px; text-align: center;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 78px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Flag&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Use&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; width: 208px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 78px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-f&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;use fragmented IP packets&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 208px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -f 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 78px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-D&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;decoy scans&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 208px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -D 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box; height: 24px;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 78px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;-g&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 258px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;use a&amp;nbsp;given source port number&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; height: 24px; padding-left: 5px; text-align: center; width: 208px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;nmap -g 22 192.168.1.1&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Standard Cryptographic Algorithms&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Let’s discuss some of the most common cryptographic algorithms used till date:&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;1) MD5&lt;/b&gt;– this is the acronym for Message-Digest 5. It is used to create 128-bit hash values. Theoretically, hashes cannot be reversed into the original plain text. MD5 is used to encrypt passwords as well as check data integrity.&amp;nbsp; MD5 is not collision resistant. Collision resistance is the difficulties in finding two values that produce the same hash values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2) SHA–&lt;/b&gt; this is the acronym for Secure Hash Algorithm. SHA algorithms are used to generate condensed representations of a message (message digest). It has various versions such as;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;SHA-0:&amp;nbsp; produces 120-bit hash values. It was withdrawn from use due to significant flaws and replaced by SHA-1.&lt;/li&gt;&lt;li&gt;SHA-1:&amp;nbsp; produces 160-bit hash values. It is similar to earlier versions of MD5. It has cryptographic weakness and is not recommended for use since the year 2010.&lt;/li&gt;&lt;li&gt;SHA-2:&amp;nbsp; it has two hash functions namely SHA-256 and SHA-512. SHA-256 uses 32-bit words while SHA-512 uses 64-bit words.&lt;/li&gt;&lt;li&gt;SHA-3: this algorithm was formally known as Keccak.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;3) RC4 –&lt;/b&gt; this algorithm is used to create stream ciphers. It is mostly used in protocols such as Secure Socket Layer (SSL) to encrypt internet communication and Wired Equivalent Privacy (WEP) to secure wireless networks.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is ransomware?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ransomware is a type of malware that prevents or limits users from accessing their system. This type of malware forces its victims to pay the ransom through certain online payment methods in order to grant access to their systems, or to get their data back. Some ransomware encrypts files (called Cryptolocker).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What type of virus is an macro virus?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Interpreted virus is an macro virus. An interpreted virus is composed of source code that can be executed only by a particular application or service. Interpreted viruses have become very common because they are much easier to write and modify than other types of viruses. A macro virus is a virus that is written in a macro language: a programming language which is embedded inside a software application (e.g., word processors and spreadsheet applications).&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is reason for preferring WPA encryption over WEP&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The values of WPA keys can change dynamically while the system is used&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;What are the sub-categories of network layer firewall?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The sub-categories of network layer firewall are stateful firewall and stateless firewall.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;What are the characteristic of Host based IDS?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The characteristic of Host based IDS are : 1. The host operating system logs in the audit information. 2. Logs includes logins,file opens and program executions. 3. Logs are analysed to detect tails of intrusion.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.4The corporate head office has a teleconferencing system that uses VOIP (voice over IP) technology. This system uses UDP as the transport for the data transmissions. What will happen if these UDP datagrams arrive at their destination out of sequence?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;UDP will pass the information in the datagrams up to the next OSI layer in the order that they arrive.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.5Which practice help secure the configuration utilities on wireless access points from unauthorized access?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Configuring a new administrator password.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.1What is reason for preferring WPA encryption over WEP&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The values of WPA keys can change dynamically while the system is used&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.2What are the sub-categories of network layer firewall?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The sub-categories of network layer firewall are stateful firewall and stateless firewall.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.3What are the characteristic of Host based IDS?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The characteristic of Host based IDS are : 1. The host operating system logs in the audit information. 2. Logs includes logins,file opens and program executions. 3. Logs are analysed to detect tails of intrusion.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.4The corporate head office has a teleconferencing system that uses VOIP (voice over IP) technology. This system uses UDP as the transport for the data transmissions. What will happen if these UDP datagrams arrive at their destination out of sequence?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;UDP will pass the information in the datagrams up to the next OSI layer in the order that they arrive.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.5Which practice help secure the configuration utilities on wireless access points from unauthorized access?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Configuring a new administrator password.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Why to perform a scan on port 137 ?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Scan on port 137 is perfomed to discover a target system with the NetBIOS null session vulnerability.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.2What is privilege escalation?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Privilege escalation is increasing privileges on a user account.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.3What is Java Struts?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Java Struts is a MVC framework and extension of Java servlets.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.4Which API is used for secured network programming when using RPCs ?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;RPCSEC_GSS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Q.5What is same in value of a handcrafted packet in a land attack?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Source, destination IP address and ports is same in value of a handcrafted packet in a land attack.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is the first phase of hacking?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Reconnaissance&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;How does traceroute work?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It uses the TTL value in an ICMP message to determine the number of hops from the sender to the router.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is footprinting?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Accumulation of data by gathering information on a target&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Which port number does FTP use?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;21&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is enumeration?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Identifying users and machine names&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is a null session?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Connecting to a system with no username and password&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is traceroute? Why is it used?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Traceroute is a tool that shows the path of a packet. It lists all the points (mainly routers) that the packet passes through. This is used mostly when the packet is not reaching its destination. Traceroute is used to check where the connection stops or breaks to identify the point of failure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is the difference between HIDS and NIDS?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;HIDS(Host IDS) and NIDS(Network IDS) are both Intrusion Detection System and work for the same purpose i.e., to detect the intrusions. The only difference is that the HIDS is set up on a particular host/device. It monitors the traffic of a particular device and suspicious system activities. On the other hand, NIDS is set up on a network. It monitors traffic of all device of the network.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the steps to set up a firewall?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Following are the steps to set up a firewall:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Username/password: modify the default password for a firewall device&lt;/li&gt;&lt;li&gt;Remote administration: Disable the feature of the remote administration&lt;/li&gt;&lt;li&gt;Port forwarding: Configure appropriate port forwarding for certain applications to work properly, such as a web server or FTP server&lt;/li&gt;&lt;li&gt;DHCP server: Installing a firewall on a network with an existing DHCP server will cause conflict unless the firewall’s DHCP is disabled&lt;/li&gt;&lt;li&gt;Logging: To troubleshoot firewall issues or potential attacks, ensure that logging is enabled and understand how to view logs&lt;/li&gt;&lt;li&gt;Policies: You should have solid security policies in place and make sure that the firewall is configured to enforce those policies.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain SSL Encryption&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;SSL(Secure Sockets Layer) is the industry-standard security technology creating encrypted connections between Web Server and a Browser. This is used to maintain data privacy and to protect the information in online transactions. The steps for establishing an SSL connection is as follows:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A browser tries to connect to the webserver secured with SSL&lt;/li&gt;&lt;li&gt;The browser sends a copy of its SSL certificate to the browser&lt;/li&gt;&lt;li&gt;The browser checks if the SSL certificate is trustworthy or not. If it is trustworthy, then the browser sends a message to the web server requesting to establish an encrypted connection&lt;/li&gt;&lt;li&gt;The web server sends an acknowledgment to start an SSL encrypted connection&lt;/li&gt;&lt;li&gt;SSL encrypted communication takes place between the browser and the web server&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What steps will you take to secure a server?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Secure servers use the Secure Sockets Layer (SSL) protocol for data encryption and decryption to protect data from unauthorized interception.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here are four simple ways to secure server:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 1: Make sure you have a secure password for your root and administrator users&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 2: The next thing you need to do is make new users on your system. These will be the users you use to manage the system&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 3: Remove remote access from the default root/administrator accounts&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 4: The next step is to configure your firewall rules for remote access&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are some of the common Cyberattacks?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Following are some common cyber attacks that could adversely affect your system.&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Malware&lt;/li&gt;&lt;li&gt;Phishing&lt;/li&gt;&lt;li&gt;Password Attacks&lt;/li&gt;&lt;li&gt;DDoS&lt;/li&gt;&lt;li&gt;Man in the Middle&lt;/li&gt;&lt;li&gt;Drive-By Downloads&lt;/li&gt;&lt;li&gt;Malvertising&lt;/li&gt;&lt;li&gt;Rogue Software&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a Brute Force Attack? How can you prevent it?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Brute Force is a way of finding out the right credentials by repetitively trying all the permutations and combinations of possible credentials. In most cases, brute force attacks are automated where the tool/software automatically tries to login with a list of credentials. There are various ways to prevent Brute Force attacks. Some of them are:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Password Length: You can set a minimum length for password. The lengthier the password, the harder it is to find.&lt;/li&gt;&lt;li&gt;Password Complexity: Including different formats of characters in the password makes brute force attacks harder. Using alpha-numeric passwords along with special characters, and upper and lower case characters increase the password complexity making it difficult to be cracked.&lt;/li&gt;&lt;li&gt;Limiting Login Attempts: Set a limit on login failures. For example, you can set the limit on login failures as 3. So, when there are 3 consecutive login failures, restrict the user from logging in for some time, or send an Email or OTP to use to log in the next time. Because brute force is an automated process, limiting login attempts will break the brute force process.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is Port Scanning?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Port Scanning is the technique used to identify open ports and service available on a host. Hackers use port scanning to find information that can be helpful to exploit vulnerabilities. Administrators use Port Scanning to verify the security policies of the network. Some of the common Port Scanning Techniques are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Ping Scan&lt;/li&gt;&lt;li&gt;TCP Half-Open&lt;/li&gt;&lt;li&gt;TCP Connect&lt;/li&gt;&lt;li&gt;UDP&lt;/li&gt;&lt;li&gt;Stealth Scanning&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a VPN?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Almost all Cybersecurity Interview Questions will have this question included. VPN stands for Virtual Private Network. It is used to create a safe and encrypted connection. When you use a VPN, the data from the client is sent to a point in the VPN where it is encrypted and then sent through the internet to another point. At this point, the data is decrypted and sent to the server. When the server sends a response, the response is sent to a point in the VPN where it is encrypted and this encrypted data is sent to another point in the VPN where it is decrypted. And finally, the decrypted data is sent to the client. The whole point of using a VPN is to ensure encrypted data transfer.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What do you understand by Risk, Vulnerability &amp;amp; Threat in a network?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Threat: Someone with the potential to harm a system or an organization&lt;/li&gt;&lt;li&gt;Vulnerability: Weakness in a system that can be exploited by a potential hacker&lt;/li&gt;&lt;li&gt;Risk: Potential for loss or damage when threat exploits a vulnerability&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;How can identity theft be prevented?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Here’s what you can do to prevent identity theft:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Ensure strong and unique password&lt;/li&gt;&lt;li&gt;Avoid sharing confidential information online, especially on social media&lt;/li&gt;&lt;li&gt;Shop from known and trusted websites&lt;/li&gt;&lt;li&gt;Use the latest version of the browsers&lt;/li&gt;&lt;li&gt;Install advanced malware and spyware tools&lt;/li&gt;&lt;li&gt;Use specialized security solutions against financial data&lt;/li&gt;&lt;li&gt;Always update your system and the software&lt;/li&gt;&lt;li&gt;Protect your SSN (Social Security Number)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are black hat, white hat and grey hat hackers?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Black hat hackers are known for having vast knowledge about breaking into computer networks. They can write malware which can be used to gain access to these systems. This type of hackers misuse their skills to steal information or use the hacked system for malicious purpose.&amp;nbsp;&lt;/li&gt;&lt;li&gt;White hat hackers use their powers for good deeds and so they are also called Ethical Hackers. These are mostly hired by companies as a security specialist that attempts to find and fix vulnerabilities and security holes in the systems. They use their skills to help make the security better.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Grey hat hackers are an amalgamation of a white hat and black hat hacker. They look for system vulnerabilities without the owner’s permission. If they find any vulnerabilities, they report it to the owner. Unlike Black hat hackers, they do not exploit the vulnerabilities found.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain MITM attack and how to prevent it?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;A MITM(Man-in-the-Middle) attack is a type of attack where the hacker places himself in between the communication of two parties and steal the information. Suppose there are two parties A and B having a communication. Then the hacker joins this communication. He impersonates as party B to A and impersonates as party A in front of B. The data from both the parties are sent to the hacker and the hacker redirects the data to the destination party after stealing the data required. While the two parties think that they are communicating with each other, in reality, they are communicating with the hacker.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can prevent MITM attack by using the following practices:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Use VPN&lt;/li&gt;&lt;li&gt;Use strong WEP/WPA encryption&lt;/li&gt;&lt;li&gt;Use Intrusion Detection Systems&lt;/li&gt;&lt;li&gt;Force HTTPS&lt;/li&gt;&lt;li&gt;Public Key Pair Based Authentication&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain DDOS attack and how to prevent it?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This again is an important Cybersecurity Interview Question. A DDOS(Distributed Denial of Service) attack is a cyberattack that causes the servers to refuse to provide services to genuine clients. DDOS attack can be classified into two types:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Flooding attacks: In this type, the hacker sends a huge amount of traffic to the server which the server can not handle. And hence, the server stops functioning. This type of attack is usually executed by using automated programs that continuously send packets to the server.&lt;/li&gt;&lt;li&gt;Crash attacks: In this type, the hackers exploit a bug on the server resulting in the system to crash and hence the server is not able to provide service to the clients.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can prevent DDOS attacks by using the following practices:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Use Anti-DDOS services&lt;/li&gt;&lt;li&gt;Configure Firewalls and Routers&lt;/li&gt;&lt;li&gt;Use Front-End Hardware&lt;/li&gt;&lt;li&gt;Use Load Balancing&lt;/li&gt;&lt;li&gt;Handle Spikes in Traffic&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain XSS attack and how to prevent it?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;XSS(Cross-Site Scripting) is a cyberattack that enables hackers to inject malicious client-side scripts into web pages. XSS can be used to hijack sessions and steal cookies, modify DOM, remote code execution, crash the server etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can prevent XSS attacks by using the following practices:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Validate user inputs&lt;/li&gt;&lt;li&gt;Sanitize user inputs&lt;/li&gt;&lt;li&gt;Encode special characters&lt;/li&gt;&lt;li&gt;Use Anti-XSS services/tools&lt;/li&gt;&lt;li&gt;Use XSS&amp;nbsp; HTML Filter&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is an ARP and how does it work?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Address Resolution Protocol (ARP)is a protocol for mapping an Internet Protocol address (IP address) to a physical machine address that is recognized in the local network.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When an incoming packet destined for a host machine on a particular local area network arrives at a gateway, the gateway asks the ARP program to find a physical host or MAC address that matches the IP address.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The ARP program looks in the ARP cache and, if it finds the address, provides it so that the packet can be converted to the right packet length and format and sent to the machine.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If no entry is found for the IP address, ARP broadcasts a request packet in a special format to all the machines on the LAN to see if one machine knows that it has that IP address associated with it.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is port blocking within LAN?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Restricting the users from accessing a set of services within the local area network is called port blocking.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Stopping the source to not to access the destination node via ports. As the application works on the ports, so ports are blocked to restricts the access filling up the security holes in the network infrastructure.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;box-sizing: border-box; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1rem; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;u&gt;What protocols fall under TCP/IP internet layer?&lt;/u&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 1.125rem; table-layout: fixed; width: unset;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; color: white; text-align: center;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&amp;nbsp;TCP/IP&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&amp;nbsp;TCP/IP Protocol Examples&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: black;&quot;&gt;Application&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;NFS, NIS+, DNS, telnet, ftp, rlogin, rsh, rcp, RIP, RDISC, SNMP and others&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Transport&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;TCP, UDP&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Internet&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;IP, ARP, ICMP&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Data Link&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;PPP, IEEE 802.2&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Physical Network&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Ethernet (IEEE 802.3) Token ring, RS-232, others&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a Botnet?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;A Botnet is a number of devices connected to the internet where each device has one or more bots running on it. The bots on the devices and malicious scripts used to hack a victim. Botnets can be used to steal data, send spams and execute a DDOS attack.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are salted hashes?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Salt is a random data. When a properly protected password system receives a new password, it creates a hash value of that password, a random salt value, and then the combined value is stored in its database. This helps to defend against dictionary attacks and known hash attacks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Example: If someone uses the same password on two different systems and they are being used using the same hashing algorithm, the hash value would be same, however, if even one of the system uses salt with the hashes, the value will be different.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain SSL and TLS&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;SSL is meant to verify the sender’s identity but it doesn’t search for anything more than that. SSL can help you track the person you are talking to but that can also be tricked at times.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;TLS is also an identification tool just like SSL, but it offers better security features. It provides additional protection to the data and hence SSL and TLS are often used together for better protection.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;box-sizing: border-box; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1rem; font-weight: 500; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;u&gt;What is data protection in transit vs data protection at rest?&lt;/u&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 1.125rem; table-layout: fixed; width: unset;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; color: white; text-align: center;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;Data Protection in transit&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;Data protection at rest&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;When data is going from server to client&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;When data just exists in its database or on its hard drive&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Effective Data protection measures for in-transit data are critical as data is less secure when in motion&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Data at rest is sometimes considered to be less vulnerable than data in transit&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is 2FA and how can it be implemented for public websites?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;An extra layer of security that is known as “multi-factor authentication“.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Requires not only a password and username but also something that only, and only, that user has on them, i.e. a piece of information only they should know or have immediately to hand – such as a physical token.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Authenticator apps replace the need to obtain a verification code via text, voice call or email.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;box-sizing: border-box; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 1rem; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px; text-align: justify;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is the difference between VPN and VLAN?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;table border=&quot;1&quot; style=&quot;border-collapse: collapse; color: #4a4a4a; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; margin-bottom: 1.125rem; table-layout: fixed; width: unset;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;background-color: #008dd9; box-sizing: border-box; text-align: center;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;VPN&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: bolder;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;VLAN&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Helps to group workstations that are not within the same locations into the same broadcast domain&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Related to remote access to the network of a company&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Means to logically segregate networks without physically segregating them with various switches&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Used to connect two points in a secured and encrypted tunnel&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Saves the data from prying eyes while in transit and no one on the net can capture the packets and read the data&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; padding-left: 5px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Does not involve any encryption technique but it is only used to slice up your logical network into different sections for the purpose of management and security&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain Phishing and how to prevent it?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Phishing is a Cyberattack in which a hacker disguises as a trustworthy person or business and attempt to steal sensitive financial or personal information through fraudulent email or instant message.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can prevent Phishing attacks by using the following practices:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Don’t enter sensitive information in the webpages that you don’t trust&lt;/li&gt;&lt;li&gt;Verify the site’s security&lt;/li&gt;&lt;li&gt;Use Firewalls&lt;/li&gt;&lt;li&gt;Use AntiVirus Software that has Internet Security&lt;/li&gt;&lt;li&gt;Use Anti-Phishing Toolbar&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain SQL Injection and how to prevent it?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;SQL Injection (SQLi) is a code injection attack where an attacker manipulates the data being sent to the server to execute malicious SQL statements to control a web application’s database server, thereby accessing, modifying and deleting unauthorized data. This attack is mainly used to take over database servers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can prevent SQL Injection attacks by using the following practices:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Use prepared statements&lt;/li&gt;&lt;li&gt;Use Stored Procedures&lt;/li&gt;&lt;li&gt;Validate user input&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;Test Cases for Security Assessment Testing&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Test cases required while performing security testing on any web application.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Authentication&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test password quality rules — Look at how secure the site wants its passwords to be, is there a minimum/maximum? is there any excluded characters — ‘,&amp;lt;, etc — this might suggest passwords aren’t being hashed properly.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for username enumeration — Do you get a different error if a user exists or not? Worth noting the application behavior if a user exists does the error change if they don’t?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test resilience to password guessing — Does the application lockout an account after x number of login attempts?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test password creation strength — Is there a minimum creation length? Is the policy ridiculous? e.g.“mustbebetween4and 8 characters passwords are not case sensitive” — should kick off alarm bells for most people!&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test any account recovery function — Look at how an account can be recovered, are there methods in place to prevent an attacker changing the email without asking current user? Can the password be changed without knowing anything about the account? Can you recover to a different email address?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test any “remember me” function — Does the remember me function ever expire? Is there room for exploit-ability in cookies combined with other attacks?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test any impersonation function — Is it possible to pretend to be other users? Can session cookies be stolen and replayed? Does the application utilize anti-cross site request forgery102?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test username uniqueness — Can you create a username or is it generated for you? Is it a number that can be incremented? Or is it something the user knows and isn’t displayed on the application?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for unsafe distribution of credentials — How are logins processed, are they sent over HTTP? Are details sent in a POST request or are they included in the URL (this is bad if they are, especially passwords)?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for fail-open conditions — Fail-open authentication is the situation when the user authentication fails but results in providing open access to authenticated and secure sections of the web application to the end-user.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test any multi-stage mechanisms — Does the application utilize multi-steps, e.g. username-&amp;gt;click next-&amp;gt;password-&amp;gt;login, can this be bypassed by visiting complete page after the username is entered? (similar to IDOR issues) — Session Management– How well are sessions handled, is there randomness to the session cookie? Are sessions killed in a reasonable time or do they last forever? Does the app allow multiple logins from the same user (is this significant to the app?). — Test tokens for meaning — What do the cookies mean?!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test tokens for predictability — Are tokens generated predictably or do they provide a sufficiently random value, tools to help with this are Burp Suite’s sequencer tool.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for insecure transmission of tokens — This lies the same way as insecure transmission of credentials, are they sent over HTTPS? are they included in URL? Can they be accessed by JavaScript? Is this an Issue?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for disclosure of tokens in logs — Are tokens cached in browser logs? Are they cached server-side? Can you view this? Can you pollute logs by setting custom tokens?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check to map of tokens to sessions — Is a token tied to a session, or can it be re-used across sessions?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check session termination — is there a time-out?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for session fixation — Can an attacker hijack a user’s session using the session token/cookie?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for cross-site request forgery — Canauthenticatedactionsbeperformedwithinthecontextoftheapplicationfromother websites?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check cookie scope — Is the cookie scoped to the current domain or can it be stolen, what are the flags set&amp;gt; is it missing secure or http-only? This can be tested by trapping the request in burp and looking at the cookie.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Understand the access control requirements — How do you authenticate to the application, could there be any flaws here?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test effectiveness of controls, using multiple accounts if possible&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Test for insecure access control methods (request parameters, Referrer header, etc)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Input Validation&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Fuzz all request parameters — Look at what you’re dealing with, are parameters reflected? Is there a chance of open redirection?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for SQL injection — Look at if a parameter is being handled as SQL, don’t automate this off the bat as if you don’t know what a statement is doing you could be doing DROP TABLES.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Identify all reflected data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for reflected cross-site scripting (XSS)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for HTTP header injection&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for arbitrary redirection&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for stored attacks&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for OS command injection&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for path traversal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for JavaScript/HTML injection — similar to XSS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for file inclusion — both local and remote&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for SMTP injection&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for SOAP injection — can you inject SOAP envelopes, or get the application to respond to SOAP, this ties into XXE attacks too.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for LDAP injection — not so common anymore but look for failure to sanitize input leading to possible information disclosure&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for XPath injection -can you inject XML that is reflected or causes the application to respond in a weird way?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for template injection-does the application utilizes a templating language that can enable you to achieve XSS or worse remote code execution? — There is a tool for this, automated template injection with Sqlmap&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Test for XXE injection — does the application respond to external entity injection?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Application/Business Logic&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This type of test cases also play an important role in security testing while other typed test cases can be automated with any tool, but application/business logic test cases are too difficult to automate with tool because every application’s logic is different to others.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Identify the logic attack surface — What does the application do, what is the most value, what would an attacker want to access?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test transmission of data via the client — Is there a desktop application or mobile application, does the transferal of information vary between this and the web application&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for reliance on client-side input validation– Does the application attempt to base its logic on the client-side, for example, do forms have a maximum length client side that can be edited with the browser that is simply accepted as true?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test any thick-client components (Java, ActiveX, Flash) — Does the application utilize something like Java, Flash, ActiveX or Silverlight? can you download the applet and reverse engineer it?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test multi-stage processes for logic flaws — Can you go from placing an order straight to delivery thus bypassing payment? or a similar process?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test handling of incomplete input — Can you pass the application dodgy input and does it process it as normal, this can point to other issues such as RCE &amp;amp; XSS.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test trust boundaries — What is a user trusted to do, can they access admin aspects of the app?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test transaction logic&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Application Infrastructure&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test segregation in shared infrastructures/ virtual hosting environments&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test segregation between ASP-hosted applications&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Test for web server vulnerabilities — this can be tied into port scanning and infrastructure assessments&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Default credentials&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Default content&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Dangerous HTTP methods&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Proxy functionality&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Miscellaneous tests&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for DOM-based attacks — open redirection, cross-site scripting, client-side validation.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for frame injection, frame busting (can still be an issue)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for local privacy vulnerabilities&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Persistent cookies&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Weak cookie options&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Caching&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Sensitive data in URL parameters&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Follow up any information leakage&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• Check for weak SSL ciphers&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;• HTTP Header analysis — look for lack of security headers such as — Content Security Policy (CSP) — HTTP Strict Transport Security (HSTS) — X-XSS-Protection — X-Content-Type-Options — HTTP Public Key Pinning&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is “Vulnerability”?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Vulnerability can be defined as the weakness of any system through which intruders or bugs can attack the system.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;If security testing has not been performed rigorously on the system then chances of vulnerabilities get increased. Time to time patches or fixes is required to prevent a system from the vulnerabilities.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is Intrusion Detection?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Intrusion detection is a system which helps in determining possible attacks and deal with it. Intrusion detection includes collecting information from many systems and sources, analysis of the information and finding the possible ways of the attack on the system.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Intrusion detection checks the following:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Possible attacks&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Any abnormal activity&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Auditing the system data&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Analysis of different collected data, etc.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is “SQL Injection”?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: SQL Injection is one of the common attacking techniques used by hackers to get critical data.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hackers check for any loophole in the system through which they can pass SQL queries, bypass the security checks, and return back the critical data. This is known as SQL injection. It can allow hackers to steal critical data or even crash a system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL injections are very critical and need to be avoided. Periodic security testing can prevent this kind of attack. SQL database security needs to be defined correctly and input boxes and special characters should be handled properly.&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&amp;nbsp;List the attributes of Security Testing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Answer: There are following seven attributes of Security Testing:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Authentication&lt;/li&gt;&lt;li&gt;Authorization&lt;/li&gt;&lt;li&gt;Confidentiality&lt;/li&gt;&lt;li&gt;Availability&lt;/li&gt;&lt;li&gt;Integrity&lt;/li&gt;&lt;li&gt;Non-repudiation&lt;/li&gt;&lt;li&gt;Resilience&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is XSS or Cross-Site Scripting?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;XSS or cross-site scripting is a type of vulnerability that hackers used to attack web applications.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It allows hackers to inject HTML or JAVASCRIPT code into a web page that can steal the confidential information from the cookies and returns to the hackers. It is one of the most critical and common techniques which needs to be prevented.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the SSL connections and an SSL session?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;SSL or Secured Socket Layer connection is a transient peer-to-peer communications link where each connection is associated with one SSL Session.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SSL session can be defined as an association between client and server generally created by the handshake protocol. There are a set of parameters defined and it may be shared by multiple SSL connections.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is “Penetration Testing”?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Penetration testing is on security testing which helps in identifying vulnerabilities in a system. A penetration test is an attempt to evaluate the security of a system by manual or automated techniques and if any vulnerability found, testers use that vulnerability to get deeper access to the system and find more vulnerabilities.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The main purpose of this testing is to prevent a system from any possible attacks. Penetration testing can be done in two ways –White Box testing and Black box testing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In white-box testing, all the information is available with the testers whereas in black box testing, testers don’t have any information and they test the system in real-world scenarios to find out the vulnerabilities.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Why “Penetration Testing” is important?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: Penetration testing is important because-&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Security breaches and loopholes in the systems can be very costly as the threat of attack is always possible and hackers can steal important data or even crash the system.&lt;/div&gt;&lt;div&gt;It is impossible to protect all the information all the time. Hackers always come with new techniques to steal important data and it is necessary for testers as well to perform periodical testing to detect the possible attacks.&lt;/div&gt;&lt;div&gt;Penetration testing identifies and protects a system by the above-mentioned attacks and helps organizations to keep their data safe.&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Name the two common techniques used to protect a password file?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: Two common techniques to protect a password file is- hashed passwords and a salt value or password file access control.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;List the full names of abbreviations related to Software security?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer: Abbreviations related to software security include:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;IPsec – Internet Protocol Security is a suite of protocols for securing Internet&lt;/div&gt;&lt;div&gt;OSI – Open Systems Interconnection&lt;/div&gt;&lt;div&gt;ISDN Integrated Services Digital Network&lt;/div&gt;&lt;div&gt;GOSIP- Government Open Systems Interconnection Profile&lt;/div&gt;&lt;div&gt;FTP – File Transfer Protocol&lt;/div&gt;&lt;div&gt;DBA – Dynamic Bandwidth Allocation&lt;/div&gt;&lt;div&gt;DDS – Digital Data System&lt;/div&gt;&lt;div&gt;DES – Data -Encryption Standard&lt;/div&gt;&lt;div&gt;CHAP – Challenge Handshake Authentication Protocol&lt;/div&gt;&lt;div&gt;BONDING – Bandwidth On Demand Interoperability Group&lt;/div&gt;&lt;div&gt;SSH – The Secure Shell&lt;/div&gt;&lt;div&gt;COPS Common Open Policy Service&lt;/div&gt;&lt;div&gt;ISAKMP – Internet Security Association and Key Management Protocol&lt;/div&gt;&lt;div&gt;USM – User-based Security Model&lt;/div&gt;&lt;div&gt;TLS – The Transport Layer Security&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List down some factors that can cause vulnerabilities?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Factors causing vulnerabilities are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Design flaws: If there are loopholes in the system that can allow hackers to attack the system easily.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Passwords: If passwords are known to hackers they can get the information very easily. Password policy should be followed rigorously to minimize the risk of password steal.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Complexity: Complex software can open doors on vulnerabilities.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Human Error: Human error is a significant source of security vulnerabilities.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Management: Poor management of the data can lead to the vulnerabilities in the system.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List the various methodologies in Security testing?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Methodologies in Security testing are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;White Box- All the information are provided to the testers.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Black Box- No information is provided to the testers and they can test the system in a real-world scenario.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Grey Box- Partial information is with the testers and rest they have to test on their own.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List down the seven main types of security testing as per Open Source Security Testing methodology manual?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The seven main types of security testing as per the Open Source Security Testing methodology manual are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Vulnerability Scanning: Automated software scans a system against known vulnerabilities.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Security Scanning: Manual or automated technique to identify network and system weaknesses.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Penetration testing: Penetration testing is on the security testing which helps in identifying vulnerabilities in a system.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Risk Assessment: It involves the analysis of possible risks in the system. Risks are classified as Low, Medium and High.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Security Auditing: Complete inspection of systems and applications to detect vulnerabilities.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Ethical hacking: Hacking is done on a system to detect flaws in it rather than personal benefits.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Posture Assessment: This combines Security Scanning, Ethical Hacking and Risk Assessments to show an overall security posture of an organization.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is SOAP and WSDL?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: SOAP or Simple Object Access Protocol is an XML-based protocol through which applications exchange information over HTTP. XML requests are sent by web services in SOAP format then a SOAP client sends a SOAP message to the server. The server responds back again with a SOAP message along with the requested service.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Web Services Description Language (WSDL) is an XML formatted language used by UDDI. “Web Services Description Language describes Web services and how to access them”.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List the parameters that define an SSL session connection?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: The parameters that define an SSL session connection are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Server and client random&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Server write MACsecret&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Client write MACsecret&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Server write key&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Client write key&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Initialization vectors&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Sequence numbers&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is file enumeration?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This kind of attack uses forceful browsing with the URL manipulation attack. Hackers can manipulate the parameters in URL string and can get the critical data which generally does not open for the public such as achieved data, old version or data which is under development.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List the benefits that can be provided by an intrusion detection system?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;There are three benefits of an intrusion detection system.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;NIDS or Network Intrusion Detection&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;NNIDS or Network Node Intrusion Detection System&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;HIDS or Host Intrusion Detection System&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is HIDS?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: HIDS or Host Intrusion Detection system is a system in which a snapshot of the existing system is taken and compared with the previous snapshot. It checks if critical files were modified or deleted then an alert is generated and sent to the administrator.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List down the principal categories of SET participants?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Following are the participants:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Cardholder&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Merchant&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Issuer&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Acquirer&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Payment gateway&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Certification authority&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;Explain “URL manipulation”?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: URL manipulation is a type of attack in which hackers manipulate the website URL to get the critical information. The information is passed in the parameters in the query string via HTTP GET method between client and server. Hackers can alter the information between these parameters and get the authentication on the servers and steal the critical data.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In order to avoid this kind of attack security testing of URL manipulation should be done. Testers themselves can try to manipulate the URL and check for possible attacks and if found they can prevent these kinds of attacks.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What are the three classes of intruders?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: The three classes of intruders are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Masquerader: It can be defined as an individual who is not authorized on the computer but hacks the system’s access control and get access of authenticated user’s accounts.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Misfeasor: In this case, user is authenticated to use the system resources but he misuses his access to the system.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Clandestine user, It can be defined as an individual who hacks the control system of the system and bypasses the system security system.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List the component used in SSL?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Secure Sockets Layer protocol or SSL is used to make secure connections between clients and computers.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Below are the component used in SSL:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SSL Recorded protocol&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Handshake protocol&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Change Cipher Spec&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Encryption algorithms&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is port scanning?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Ports are the point where information goes in and out of any system. Scanning of the ports to find out any loopholes in the system is known as Port Scanning. There can be some weak points in the system to which hackers can attack and get the critical information. These points should be identified and prevented from any misuse.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Following are the types of port scans:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Strobe: Scanning of known services.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;UDP: Scanning of open UDP ports&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Vanilla: In this scanning, the scanner attempts to connect to all 65,535 ports.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Sweep: The scanner connects to the same port on more than one machine.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Fragmented packets: The scanner sends packet fragments that get through simple packet filters in a firewall&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Stealth scan: The scanner blocks the scanned computer from recording the port scan activities.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;FTP bounce: The scanner goes through an FTP server in order to disguise the source of the scan.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is a Cookie?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: A cookie is a piece of information received from a web server and stored in a web browser which can be read anytime later. A cookie can contain password information, some auto-fill information and if any hackers get these details it can be dangerous.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What are the types of Cookies?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Types of Cookies are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Session Cookies – These cookies are temporary and last in that session only.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Persistent cookies – These cookies stored on the hard disk drive and last till its expiry or manual removal of it.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is a honeypot?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Honeypot is a fake computer system that behaves like a real system and attracts hackers to attack it. Honeypot is used to find out loopholes in the system and to provide a solution for these kinds of attacks.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List the parameters that define an SSL session state?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: The parameters that define an SSL session state are:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Session identifier&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Peer certificate&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Compression method&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Cipher spec&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Master secret&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Is resumable&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;Describe the Network Intrusion Detection system?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Answer: Network Intrusion Detection system generally is known as NIDS. It is used for the analysis of the passing traffic on the entire subnet and to match with the known attacks. If any loophole identified then the administrator receives an alert.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is “Vulnerability”?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This is the weakness in the web application. The cause of such “weakness” can be due to the bugs in the application, an injection (SQL/ script code) or the presence of viruses.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is “URL Manipulation”?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Some web applications communicate additional information between the client (browser) and the server in the URL. Changing some information in the URL may sometimes lead to unintended behavior by the server and this termed as URL Manipulation.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is “SQL injection”?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This is the process of inserting SQL statements through the web application user interface into some query that is then executed by the server.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is “XSS (Cross-Site Scripting)”?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;When a user inserts HTML/ client-side script in the user interface of a web application, this insertion is visible to other users and it is termed as XSS.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is “Spoofing”?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The creation of hoax look-alike websites or emails is called Spoofing.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What should you do to Test Network Security?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;1) Most critical areas should be tested first&lt;/i&gt;&lt;/b&gt; – In Case of network security, areas which are exposed to the public are considered to be critical. So focus should be on firewalls, web servers, routers, switches and systems that are open to a mass crowd.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;2) Up to date with Security Patches&lt;/i&gt;&lt;/b&gt; – System under test should always have the latest security patch installed in it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;3) Good Interpretation of Testing Results &lt;/i&gt;&lt;/b&gt;– Vulnerability Testing sometimes may lead to false-positive scores and at times may not be able to identify the issues beyond the capability of the tool that is being used for testing. In such cases, testers should be experienced enough to understand, analyze and make a decision on the outcome.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;4) Awareness of the Security Policies &lt;/i&gt;&lt;/b&gt;– Testers should be well versed in the security policy or the protocol that is followed. This will help in effective testing and understanding of what is within and beyond the security guidelines.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;5) Tool Selection &lt;/i&gt;&lt;/b&gt;– From a wide range of tools available, make sure you select the tool that provides the features required for your testing.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;List of Network Security Devices&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Given below is a brief note of few Network Security Devices&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Firewalls – Firewall is the protection layer that monitors the connections that can take place within a network.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;VPN’s – VPN Gateways are used to establish a secure connection to the remote systems.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Anti Virus – It is used to monitor, identify and filter out all forms of malware.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;URL Filtering –URL filtering will keep the end-users protected by restricting them to access malicious sites.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;IDS system – Intrusion detection system monitors for malicious attacks and raises alerts to the admin team.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;Techniques/Approaches for Testing Network Security&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#1) Network Scanning&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In this technique, a port scanner is used to identify all the hosts connected to the network. Network Services are also scanned like HTTP and FTP. This finally helps in ensuring whether the ports are configured to allow only the secured network services.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#2) Vulnerability Scanning&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Vulnerability Scanner helps in finding the weakness of the system or network. It provides information on the security loopholes which can be improved.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#3) Ethical Hacking&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This is hacking done to identify potential threats to a system or network. This helps to identify if unauthorized access or malicious attacks are possible.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#4) Password Cracking&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This method can be used to crack weak passwords. This can help in enforcing a policy with minimum password criteria which ends up in creating strong passwords and difficult to crack.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#5) Penetration Testing&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Pentest is an attack done on system/network to find out Security flaws. Under Penetration Testing Technique the Servers, endpoints, web application, wireless devices, mobile devices, and network devices, are all compromised to identify the vulnerability.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;Why Network Security Test?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A well-tested website from the security perspective always gets the two prime benefits.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The benefits include:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Retention of Customers – If a Website is secured, users will definitely opt using it over the other websites. In the case of eCommerce websites, retention of customers results in the generation of more revenue online.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Cost Saving – A Website compliant with all the security protocol drives less legal charges later, and also the cost involved in getting the site back up after a security attack gets reduced.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;Penetration Testing Sample Test Cases (Test Scenarios)&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Remember this is not functional testing. In Pentest your goal is to find security holes in the system. Below are some generic test cases and not necessarily applicable to all applications.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Check if the web application is able to identify spam attacks on contact forms used on the website.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Proxy server – Check if network traffic is monitored by proxy appliances. The proxy server makes it difficult for hackers to get internal details of the network thus protecting the system from external attacks.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Spam email filters – Verify if incoming and outgoing email traffic is filtered and unsolicited emails are blocked.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Many email clients come with inbuilt spam filters that need to be configured as per your needs. These configuration rules can be applied to email headers, subject or body.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Firewall – Make sure the entire network or computers are protected with firewalls. A Firewall can be software or hardware to block unauthorized access to a system. A Firewall can prevent sending data outside the network without your permission.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Try to exploit all servers, desktop systems, printers, and network devices.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify that all usernames and passwords are encrypted and transferred over secure connections like https.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify information stored in website cookies. It should not be in a readable format.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify previously found vulnerabilities to check if the fix is working.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if there is no open port in the network.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify all telephone devices.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify WIFI network security.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify all HTTP methods. PUT and Delete methods should not be enabled on a web server.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if the password meets the required standards. The password should be at least 8 characters long containing at least one number and one special character.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Username should not be like “admin” or “administrator”.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The application login page should be locked upon a few unsuccessful login attempts.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Error messages should be generic and should not mention specific error details like “Invalid username” or “Invalid password”.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if special characters, HTML tags, and scripts are handled properly as an input value.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Internal system details should not be revealed in any of the error or alert messages.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Custom error messages should be displayed to end-users in case of a web page crash.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify the use of registry entries. Sensitive information should not be kept in the registry.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;All files must be scanned before uploading them to the server.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Sensitive data should not be passed in URLs while communicating with different internal modules of the web application.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;There should not be any hardcoded username or password in the system.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify all input fields with long input string with and without spaces.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if reset password functionality is secure.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify application for SQL Injection.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify application for Cross-Site Scripting.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Important input validations should be done at the server-side instead of JavaScript checks at the client-side.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Critical resources in the system should be available to authorized persons and services only.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;All access logs should be maintained with proper access permissions.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify user session ends upon log off.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify that directory browsing is disabled on the server.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify that all applications and database versions are up to date.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify URL manipulation to check if a web application is not showing any unwanted information.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify memory leak and buffer overflow.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if incoming network traffic is scanned to find Trojan attacks.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if the system is safe from Brute Force Attacks – a trial and error method to find sensitive information like passwords.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if the system or network is secured from DoS (denial-of-service) attacks. Hacker can target network or a single computer with continuous requests due to which resources on the target system gets overloaded resulting in the denial of service for legit requests.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify application for HTML script injection attacks.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify against COM &amp;amp; ActiveX attacks.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify against spoofing attacks. Spoofing can be of multiple types – IP address spoofing, Email ID spoofing,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;ARP spoofing, Referrer spoofing, Caller ID spoofing, Poisoning of file-sharing networks, GPS spoofing.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Check for an uncontrolled format string attack – a security attack that can cause the application to crash or execute the harmful script on it.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify XML injection attack – used to alter the intended logic of the application.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify against canonicalization attacks.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if the error pages are displaying any information that can be helpful for a hacker to enter into the system.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if any critical data like the password is stored in secret files on the system.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Verify if the application is returning more data than it is required.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Penetration Testing Types&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#1) Social Engineering Test: In this test, attempts are being made to make a person reveal sensitive information like password, business-critical data, etc. These tests are mostly done through phone or internet and it targets certain helpdesks, employees &amp;amp; processes.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Human errors are the main causes of security vulnerability. Security standards and policies should be followed by all staff members to avoid social engineering penetration attempts. An example of these standards includes not to mention any sensitive information in the email or phone communication. Security audits can be conducted to identify and correct process flaws.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#2) Web Application Test: Using software methods one can verify if the application is exposed to security vulnerabilities. It checks the security vulnerability of web apps and software programs positioned in the target environment.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#3) Physical Penetration Test: Strong physical security methods are applied to protect sensitive data. This is generally used in military and government facilities. All physical network devices and access points are tested for the possibilities of any security breach. This test is not much relevant to the scope of software testing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#4) Network Services Test: This is one of the most commonly performed penetration tests where the openings in the network are identified by which entry is being made in the systems on the network to check what kind of vulnerabilities are there. It can be done locally or remotely.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#5) Client-side Test: It aims to search and exploit vulnerabilities in client-side software programs.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#6) Remote dial-up war dial: It searches for modems in the environment and tries to log in to the systems connected through these modems by password guessing or brute-forcing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;#7) Wireless Security Test: It discovers the open, unauthorized and less secured hotspots or Wi-Fi networks and connects through them.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The above 7 categories we have seen are one way of categorizing the types of pen tests. We can also organize the types of penetration testing into three parts as seen below:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCTzgSyhvanIAPGDarCWMq3bcTx3kiICxkhhRofvlOIPiYXNenVF0_Xn1AUQ7bOc9-EnyQE574WNAFfy9X5ZY2DoayHekGmSVruJEcpQaVWQMy8REnVpt-egPITbIMs1RQjG15b4nyHFjq/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;266&quot; data-original-width=&quot;329&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCTzgSyhvanIAPGDarCWMq3bcTx3kiICxkhhRofvlOIPiYXNenVF0_Xn1AUQ7bOc9-EnyQE574WNAFfy9X5ZY2DoayHekGmSVruJEcpQaVWQMy8REnVpt-egPITbIMs1RQjG15b4nyHFjq/&quot; width=&quot;297&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Let’s discuss this testing approaches one by one:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Black Box Penetration Testing:&lt;/b&gt; In this approach, the tester assesses the target system, network or process without the knowledge of its details. They just have a very high level of inputs like URL or company name using which they penetrate the target environment. No code is being examined in this method.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;White Box Penetration Testing:&lt;/b&gt; In this approach, the tester is equipped with complete details about the target environment – Systems, network, OS, IP address, source code, schema, etc. It examines the code and finds out design &amp;amp; development errors. It is a simulation of an internal security attack.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Grey Box Penetration Testing&lt;/b&gt;: In this approach, the tester has limited details about the target environment. It is a simulation of external security attacks.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;Methods For Web Security Testing&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Password Cracking&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The security testing on a Web Application can be kicked off by “Password Cracking”. In order to log in to the private areas of the application, one can either guess a username/ password or use some password cracker tool for the same. A list of common usernames and passwords are available along with open source password crackers.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;If the web application does not enforce a complex password (For Example, with alphabets, number, and special characters or with at least a required number of characters), it may not take very long to crack the username and password.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;If a username or password is stored in cookies without encrypting, an attacker can use different methods to steal the cookies and the information stored in the cookies like username and password.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;URL Manipulation Through HTTP GET Methods&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A tester should check whether the application passes important information in the query string or not. This happens when the application uses the HTTP GET method to pass information between the client and the server.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The information is passed through the parameters in the query string. The tester can modify a parameter value in the query string to check if the server accepts it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Via HTTP GET request user information is passed to the server for authentication or fetching data. The attacker can manipulate every input variable passed from this GET request to a server in order to get the required information or to corrupt the data. In such conditions, any unusual behavior by application or web server is the doorway for the attacker to get into an application.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SQL Injection&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The next factor that should be checked is SQL Injection. Entering a single quote (‘) in any textbox should be rejected by the application. Instead, if the tester encounters a database error, it means that the user input is inserted in some query which is then executed by an application. In such a case, the application is vulnerable to SQL injection.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;SQL injection attacks are very critical as an attacker can get vital information from the server database. To check SQL injection entry points into your web application, find out the code from your codebase where direct MySQL queries are executed on the database by accepting some user inputs.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;If the user input data is crafted in SQL queries to query the database, an attacker can inject SQL statements or part of the SQL statements as user inputs to extract vital information from a database. Even if an attacker is successful to crash the application, from the SQL query error shown on a browser, the attacker can get the information they are looking for.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Special characters from user inputs should be handled/escaped properly in such cases.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Cross-Site Scripting (XSS)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A tester should additionally check the web application for XSS (Cross-site scripting). Any HTML For Example, &amp;lt;HTML&amp;gt; or any script For Example, &amp;lt;SCRIPT&amp;gt; should not be accepted by the application. If it is, then the application can be prone to an attack by Cross-Site Scripting.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The attacker can use this method to execute a malicious script or URL on the victim’s browser. Using cross-site scripting, an attacker can use scripts like JavaScript to steal user cookies and information stored in the cookies.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Many web applications get some useful information and pass this information in some variables from different pages.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;For Example, http://www.examplesite.com/index.php?userid=123&amp;amp;query=xyz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The attacker can easily pass some malicious input or &amp;lt;script&amp;gt; as a ‘&amp;amp;query’ parameter which can explore important user/server data on the browser.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Important: During Security testing, the tester should be very careful as not to modify any of the following:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;Configuration of the application or the server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;Services running on the server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;Existing user or customer data hosted by the application&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;background-color: white; border: 0px; line-height: 1.2em; margin: 0px 0px 20px; padding: 0px;&quot;&gt;&lt;span id=&quot;Difference_Between_Functional_and_Non-Functional_Testing&quot; style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica; font-size: small;&quot;&gt;&lt;i&gt;&lt;u&gt;Difference Between Functional and Non-Functional Testing&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;tablepress-scroll-wrapper&quot; id=&quot;tablepress-441-scroll-wrapper&quot; style=&quot;background-color: white; border: 0px; color: #3a3a3a; font-size: 15px; margin: 0px; overflow: auto hidden; padding: 0px;&quot;&gt;&lt;table class=&quot;tablepress tablepress-id-441 tablepress-responsive&quot; id=&quot;tablepress-441&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: none; margin: 0px 0px 1em; padding: 0px; width: 784.8px;&quot;&gt;&lt;thead style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;tr class=&quot;row-1 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;th class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Functional Testing&lt;/span&gt;&lt;/th&gt;&lt;th class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Non Functional Testing&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;row-hover&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;tr class=&quot;row-2 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It tests ‘What’ the product does. It checks the operations and actions of an Application.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It checks the behaviour of an Application.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-3 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Functional testing is done based on the business requirement.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Non- functional testing is done based on the customer expectation and Performance requirement.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-4 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It tests whether the actual result is working according to the expected result.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It checks the response time, and speed of the software under specific conditions.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-5 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It is carried out manually.&lt;br style=&quot;word-break: normal;&quot; /&gt;Example: Black box testing method.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It is more feasible to test using automated tools.&lt;br style=&quot;word-break: normal;&quot; /&gt;Example: Loadrunner.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-6 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It tests as per the customer requirements.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It tests as per customer expectations.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-7 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Customer feedback helps in reducing the risk factors of the product.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Customer feedback is more valuable for non- functional testing as it helps to improve and lets the tester to know the expectation of the customer.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-8 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It is testing the functionality of the software.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It is testing the performance of the functionality of the software.&lt;br style=&quot;word-break: normal;&quot; /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-9 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Functional testing has the following types:&lt;br style=&quot;word-break: normal;&quot; /&gt;•Unit testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Integration testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•System Testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Acceptance Testing&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Non functional testing includes:&lt;br style=&quot;word-break: normal;&quot; /&gt;•Performance testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Load Testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Stress testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Volume testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Security testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Installation testing&lt;br style=&quot;word-break: normal;&quot; /&gt;•Recovery testing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-10 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example: A Login page must show textboxes to Enter the username and password.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;What is a Web Service?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A Web Service is a software functionality that supports machine to machine communication over the world wide web.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It generally uses web technology like HTTP for transferring the messages between electronic devices or applications. These messages are mostly in XML and JSON file formats.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A web service is based on the Request-response method.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It can be implemented by either of the two protocols – SOAP (Simple object access protocol) and REST (Representational State Transfer). Both the approaches support XML data transfer.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The concept of Web Service testing:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Web Service testing includes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Understanding the functionality offered by the web service. Basically, a web service’s functionality is described by WSDL (web services description language) file.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Determine the XML request and response format.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Sending request and then validating the response against request sent.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;We have both manual and automation testing tools available to test web services.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;For manual testing, we need to write our own code that sends a&amp;nbsp; request and validate the response. Quite the reverse, automation testing saves the coding effort.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Having had a basic understanding of the idea of web service testing, we will now discuss in this article about the different web service testing tools available in the market.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Differentiate Between a MAC and an IP Address?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;All networks across devices are assigned a number which is unique, which is termed as MAC or Machine Access Control address. This address may be a personal mail box on the net. The network router identifies it. the amount may be modified anytime.All devices get their distinctive information processing address so they can be located easily&amp;nbsp; on a given laptop and network. Whoever is aware of your distinctive information processing address will contact you through it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is SSL and why is it not enough when it comes to encryption?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;SSL is identity verification, not hard encryption. it’s designed to be able to prove that the person you’re engaging on the other side is who they say they are. SSL and TLS are each used by almost everyone&amp;nbsp; online, however because of this it is a huge target and is mainly attacked through its implementation (The Heartbleed bug for example) and its far-famed methodology.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Which programming language is used for hacking?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;It’s best, actually, to master all 5 of Python, C/C++, Java, Perl, and LISP. Besides being the foremost vital hacking languages, they represent&amp;nbsp; totally different approaches to programming, and each of it can educate you in valuable ways.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is meant by spoofing attack?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;A spoofing attack is when a malicious party impersonates another device or user on a network so as to launch attacks against network hosts, steal data, unfold malware or bypass access controls. Different Spoofing attacks are deployed by malicious parties to achieve this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the different types of spoofing?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;ARP Spoofing Attack.&lt;/li&gt;&lt;li&gt;DNS Spoofing Attack.&lt;/li&gt;&lt;li&gt;IP Spoofing Attack.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is active and passive reconnaissance?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Passive reconnaissance is nothing but to gain info regarding targeted computers and networks while not actively participating with the systems. In active reconnaissance, in distinction, the attacker engages with the target system, usually conducting a port scan to find any open ports.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What&#39;s a denial of service (DOS) attack and what are the common forms?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;DOS attacks involve flooding servers, systems or networks with traffic to cause over-consumption of victim resources. This makes it troublesome or not possible for legitimate users to access or use targeted sites.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Common DOS attacks include:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Buffer overflow attacks&lt;/li&gt;&lt;li&gt;ICMP flood&lt;/li&gt;&lt;li&gt;SYN flood&lt;/li&gt;&lt;li&gt;Teardrop attack&lt;/li&gt;&lt;li&gt;Smurf attack&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is SQL injection and its types?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;If the application doesn’t sanitize the user input then the SQL injection happens. Thus a malicious hacker would inject SQL question to gain unauthorized access and execute administration operations on the database. SQL injections may be classified as follows:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Error-based SQL injection&lt;/li&gt;&lt;li&gt;Blind SQL injection&lt;/li&gt;&lt;li&gt;Time-based SQL injection&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is Burp Suite? What tools does it contain?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Burp Suite is an integrated platform used for attacking net applications. It contains all the tools a hacker would need for attacking any application. a number of these functionalities are&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Proxy&lt;/li&gt;&lt;li&gt;Spider&lt;/li&gt;&lt;li&gt;Scanner&lt;/li&gt;&lt;li&gt;Intruder&lt;/li&gt;&lt;li&gt;Repeater&lt;/li&gt;&lt;li&gt;Decoder&lt;/li&gt;&lt;li&gt;Comparer&lt;/li&gt;&lt;li&gt;Sequencer&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Explain how you can stop your website getting hacked?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;By adapting following methodology you’ll be able to stop your web site from obtaining hacked&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Using Firewall &lt;/b&gt;: Firewall may be accustomed drop traffic from suspicious information processing address if attack may be an easy DOS&lt;/li&gt;&lt;li&gt;&lt;b&gt;Encrypting the Cookies &lt;/b&gt;: Cookie or Session poisoning may be prevented by encrypting the content of the cookies, associating cookies with the consumer information processing address and temporal arrangement out the cookies once it slow&lt;/li&gt;&lt;li&gt;&lt;b&gt;Validating and confirmative user input&lt;/b&gt; : This approach is prepared to stop the type tempering by confirmative and verifying the user input before processing it&lt;/li&gt;&lt;li&gt;&lt;b&gt;Header Sanitizing and validation&lt;/b&gt; : This technique is beneficial against cross website scripting or XSS, this method includes verifying and sanitizing headers, parameters passed via the address, type parameters and hidden values to cut back XSS attacks.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is penetration testing? Mention some popular penetration testing tools.&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;A penetration test or a pen test is the simulation of a cyberattack on a computer to check for potential vulnerabilities in the system. It is commonly implemented to augment a web application firewall (WAF). It can involve a simulated attack on any number of application systems such as APIs, frontend servers, and backend servers to discover any vulnerabilities present. The insights gained through this kind of testing can be used to tighten the WAF security policies and fix the detected issues.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Following are a few popular tools used for penetration testing:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Netsparker&lt;/li&gt;&lt;li&gt;Wireshark&lt;/li&gt;&lt;li&gt;Metasploit&lt;/li&gt;&lt;li&gt;BeEF&lt;/li&gt;&lt;li&gt;Aircrack&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is network traffic monitoring and analysis?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Network traffic monitoring and analysis is a security analytical technique and tool used by Network Security Administrators for the detection of issues that can affect accessibility, functionality, and network traffic security in connected devices.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is a security operations center (SOC)?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;A security operations center (SOC) as a facility houses the information security team. This team is set in place to continuously monitor and analyze an organization’s security. The SOC team’s responsibility includes detection, analysis, and immediate response to Cybersecurity incidents through the implementation of various technology solutions and a set of processes. The team may include Security Analysts, Engineers, and Managers who work closely with the incident response team.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is Defense in Depth?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Defense in Depth (DiD) in Cybersecurity involves a series of defensive mechanisms that are layered for the purpose of securing valuable data and information. In case one mechanism fails, another one will start to work immediately to thwart unprecedented attacks. DiD’s multi-layered approach, which is also referred to as the castle approach, tightens up the security of a system.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is sniffing? Explain its types in Ethical Hacking.&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Sniffing in Ethical Hacking is a method implemented for monitoring all the data packets that pass through a particular network. Sniffers are primarily used to oversee and troubleshoot network traffic, and Network/System Administrators are responsible for this role. Sniffers can be installed in the system in the form of software or hardware.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However, attackers can misuse sniffers to gain access to data packets that contain sensitive information, such as account information, passwords, etc. Packet sniffers on a network can give a malicious hacker the opportunity to intrude and access all of the network traffic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are two types of sniffing:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Active sniffing: Sniffing in a point-to-point network device called the switch is referred to as active sniffing. The switch is responsible for the regulation of the data flow between its ports. This is done through the active monitoring of the MAC address on each port, which enables the passing of data only to the intended target. To activate the sniffing of the traffic between targets, sniffers have to inject traffic into the LAN.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Passive sniffing: Passive sniffing happens when the sniffing is done through the hub. The traffic that goes through the unbridged network or the non-switched segment is transparent to all machines in that segment. Here, sniffers work at the network’s data link layer. This is called passive sniffing as sniffers set up by the attackers passively wait for the data to capture them when they are sent.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is MAC Flooding?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;MAC Flooding is a kind of a technique wherever the protection of given network switch is compromised. In MAC flooding the hacker floods the switch with sizable amounts of frames, than what a switch can handle. This makes switch behaving as a hub and transmits all packets to all the ports existing. Taking the advantage of this the attacker can attempt to send his packet within the network to steal the sensitive information.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the tools used for ethical hacking?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;There are several moral hacking tools out there within the marketing for different purposes, they are:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;NMAP&lt;/b&gt; – NMAP stands for Network plotter. It’s associate degree open source tool that’s used wide for network discovery and security auditing.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Metasploit &lt;/b&gt;– Metasploit is one amongst the most powerful exploit tool to conduct basic penetration tests.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Burp Suit &lt;/b&gt;– Burp Suite could be a widespread platform that’s widely used for playing security testing of internet applications.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Angry IP Scanner &lt;/b&gt;– Angry information processing scanner could be a light-weight, cross-platform information processing address and port scanner.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cain &amp;amp; Abel &lt;/b&gt;– Cain &amp;amp; Abel is a password recovery tool for Microsoft operational Systems.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Ettercap &lt;/b&gt;– Ettercap stands for local area network Capture. It is used for Man-in-the-Middle attack using a network security tool.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What are the hacking stages? Explain each stage.&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Hacking, or targeting on a machine, should have the following 5 phases :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Surveillance : This is the principal stage where the hacker endeavours to gather as much data as possible about the target&lt;/li&gt;&lt;li&gt;Scanning : This stage includes exploiting the data accumulated amid Surveillance stage and utilizing it to inspect the casualty. The hacker can utilize computerized devices amid the scanning stage which can incorporate port scanners, mappers and vulnerability scanners.&lt;/li&gt;&lt;li&gt;Getting access : This is where the real hacking happens. The hacker attempts to exploit data found amid the surveillance and Scanning stage to get access.&lt;/li&gt;&lt;li&gt;Access Maintenance : Once access is gained, hackers need to keep that access for future exploitation and assaults by securing their exclusive access with backdoors, rootkits and Trojans.&lt;/li&gt;&lt;li&gt;Covering tracks : Once hackers have possessed the capacity to pick up and maintain access, they cover their tracks and to keep away from getting detected. This likewise enables them to proceed with the utilization of the hacked framework and keep themselves away from legitimate activities.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;What is an intrusion detection system (IDS)?&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;An intrusion detection system, or IDS for short, is a software application or device that monitors a network for the detection of malicious activities or policy violations. Any detected malicious activity or violation is reported or collected centrally with the help of a security information and event management system. An IDS that can respond to intrusions upon discovery is classified as an intrusion prevention system (IPS).&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;i&gt;&lt;u&gt;Unit Testing Vs Integration Testing Vs Functional Testing&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Unit testing &lt;/b&gt;means testing individual modules of an application in isolation (without any interaction with dependencies) to confirm that the code is doing things right.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Integration testing&lt;/b&gt; means checking if different modules are working fine when combined together as a group.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Functional testing&lt;/b&gt; means testing a slice of functionality in the system (may interact with dependencies) to confirm that the code is doing the right things.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Functional tests are related to integration tests, however, they signify to the tests that check the entire application’s functionality with all the code running together, nearly a super integration test.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit testing considers checking a single component of the system whereas functionality testing considers checking the working of an application against the intended functionality described in the system requirement specification. On the other hand, integration testing considers checking integrated modules in the system.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;p style=&quot;background-color: white; border: 0px; font-size: 15px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;border: 0px; font-weight: 700; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;This is illustrated best in the following test pyramid:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; border: 0px; color: #3a3a3a; font-size: 15px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;Image result for unit testing vs functional testing vs integration testing&quot; class=&quot;wp-image-42988 lazyloaded&quot; data-ll-status=&quot;loaded&quot; height=&quot;347&quot; sizes=&quot;(max-width: 513px) 100vw, 513px&quot; src=&quot;https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/12/image-result-for-unit-testing-vs-functional-testin.png&quot; srcset=&quot;https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/12/image-result-for-unit-testing-vs-functional-testin.png 693w, https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/12/image-result-for-unit-testing-vs-functional-testin-300x203.png 300w&quot; style=&quot;height: auto; max-width: 100%;&quot; width=&quot;513&quot; /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background-color: white; border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit tests are easier to write and quicker to execute. The time and effort to implement and maintain the tests increases from unit testing to functional testing as shown in the above pyramid.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;Example:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Let us understand these three types of testing with an oversimplified example.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;E.g.&lt;/b&gt; For a functional mobile phone, the main parts required are “battery” and “sim card”.&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit testing Example – The battery is checked for its life, capacity and other parameters. Sim card is checked for its activation.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration Testing Example – Battery and sim card are integrated i.e. assembled in order to start the mobile phone.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Functional Testing Example – The functionality of a mobile phone is checked in terms of its features and battery usage as well as sim card facilities.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3a3a3a; font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #3a3a3a; font-family: helvetica;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicS2rqo7sHXSt9n3wY1O7aFCtku2vFkNQT8pVxLbzREJOdqcWkE5Qchu0D1AHYDdrLEvDFsutNgEibyrJyeVPy-EMhp92PXrpNA9qm4Onhc6ki6_-v95LgeT8VG59SkShI-uBsOKIMxHce/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;200&quot; data-original-width=&quot;250&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicS2rqo7sHXSt9n3wY1O7aFCtku2vFkNQT8pVxLbzREJOdqcWkE5Qchu0D1AHYDdrLEvDFsutNgEibyrJyeVPy-EMhp92PXrpNA9qm4Onhc6ki6_-v95LgeT8VG59SkShI-uBsOKIMxHce/&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Almost every web application requires its users/customers to log in. For that, every application has to have a “Login” page which has these elements:&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Account/Username&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Password&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Login/Sign in Button&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot; style=&quot;color: #3a3a3a;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;For Unit Testing, the following may be the test cases:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Field length – username and password fields.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Input field values should be valid.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The login button is enabled only after valid values (Format and lengthwise) are entered in both the fields.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;For Integration Testing, the following may be the test cases:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The user sees the welcome message after entering valid values and pushing the login button.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The user should be navigated to the welcome page or home page after valid entry and clicking the Login button.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Now, after unit and integratio&lt;span style=&quot;color: #3a3a3a;&quot;&gt;n testing are done, let us see the additional t&lt;/span&gt;&lt;b style=&quot;color: #3a3a3a;&quot;&gt;est cases that are considered for functional testing:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The expected behavior is checked, i.e. is the user able to log in by clicking the login button after entering a valid username and password values.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Is there a welcome message that is to appear after a successful login?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Is there an error message that should appear on an invalid login?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Are there any stored site cookies for login fields?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Can an inactivated user log in?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Is there any ‘forgot password’ link for the users who have forgotten their passwords?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;There are much more such cases which come to the mind of a functional tester while performing functional testing. But a developer cannot take up all cases while building Unit and Integration test cases.&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Thus, there are a plenty of scenarios that are yet to be tested even after unit and integration testing.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #3a3a3a; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPYA5q6vGq0cp-lQ2tdQkleZLE_vLVk2Q7WTDL43Ckcr-iKGs3IpXLOlJeTwKgdQyKfmXTBNndIjxMkoxZovuHeIFWB3zjCZH4cKvaHjAIePuPtc6eAd2BVCaQdTr0SbYf1VEmyRRxmja4/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;202&quot; data-original-width=&quot;300&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPYA5q6vGq0cp-lQ2tdQkleZLE_vLVk2Q7WTDL43Ckcr-iKGs3IpXLOlJeTwKgdQyKfmXTBNndIjxMkoxZovuHeIFWB3zjCZH4cKvaHjAIePuPtc6eAd2BVCaQdTr0SbYf1VEmyRRxmja4/&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #3a3a3a; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #3a3a3a; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #3a3a3a; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;What is Unit Testing?&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;As the name suggests, this level involves testing a ‘Unit’.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Here unit can be the smallest part of an application that is testable, be it the smallest individual function, method, etc. Software developers are the ones who write the unit test cases. The aim here is to match the requirements and the unit’s expected behavior.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Below are a few important points about unit testing and its benefits:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit testing is done before Integration testing by software developers using white box testing techniques.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit testing does not only check the positive behavior i.e. the correct output in case of valid input, but also the failures that occur with invalid input.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Finding issues/bugs at an early stage is very useful and it reduces the overall project costs. As Unit testing is done before integration of code, issues found at this stage can be resolved very easily and their impact is also very less.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;A unit test tests small pieces of code or individual functions so the issues/errors found in these test cases are independent and do not impact the other test cases.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Another important advantage is that the unit test cases simplify and make testing of code easier. So, it becomes easier to resolve the issues at a later stage too as only the latest change in the code is to be tested.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit test saves time and cost, and it is reusable and easy to maintain.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;What is Integration Testing?&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration testing is testing the integration of different part of the system together. Two different parts or modules of the system are first integrated and then integration testing is performed.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxNWyAcFFYBo2hu-BXu4WY-YLtJSEPHq2bj77BHmG0zd7Q6ADrRwK62E0xGNZoAt6To6IONsGVWs2Q8AJ44HgyW8QzkNr2DawsrnIsFWnAHYT1xeWN36ZMx9C7tgJHBG-boANeBLznqx27/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;196&quot; data-original-width=&quot;350&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxNWyAcFFYBo2hu-BXu4WY-YLtJSEPHq2bj77BHmG0zd7Q6ADrRwK62E0xGNZoAt6To6IONsGVWs2Q8AJ44HgyW8QzkNr2DawsrnIsFWnAHYT1xeWN36ZMx9C7tgJHBG-boANeBLznqx27/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The aim of integration testing is to check the functionality, reliability, and performance of the system when integrated.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration testing is performed on the modules that are unit tested first and then integration testing defines whether the combination of the modules give the desired output or not.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration testing can either be done by independent testers or by developers too.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style=&quot;border: 0px; color: #3a3a3a; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;border: 0px; font-weight: 700; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;There are 3 different types of Integration testing approaches. Let us discuss each one of them briefly:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; color: #3a3a3a; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;different-types-of-integration-testing&quot; class=&quot;wp-image-42993 lazyloaded&quot; data-ll-status=&quot;loaded&quot; height=&quot;170&quot; sizes=&quot;(max-width: 390px) 100vw, 390px&quot; src=&quot;https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/12/different-types-of-integration-testing.jpeg&quot; srcset=&quot;https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/12/different-types-of-integration-testing.jpeg 390w, https://www.softwaretestinghelp.com/wp-content/qa/uploads/2016/12/different-types-of-integration-testing-300x131.jpeg 300w&quot; style=&quot;height: auto; max-width: 100%;&quot; width=&quot;390&quot; /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;a) Big Bang Integration Approach&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;In this approach, all the modules or units are integrated and tested as a whole at one time. This is usually done when the entire system is ready for integration testing at a single point of time.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Please do not confuse this approach of integration testing with system testing, only the integration of modules or units is tested and not the whole system as it is done in system testing.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The big bang approach’s major advantage is that everything integrated is tested at one time.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;One major disadvantage is that it becomes difficult to identify the failures.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Example: In the figure below, Unit 1 to Unit 6 are integrated and tested using the Big bang approach&lt;span style=&quot;color: #3a3a3a;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; color: #3a3a3a; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_xIfSloW7xVrI-LMJi3E9AVdcIguk-bIISZrrySTpDmQhsa-rx9Or35qaRZjAnVMQejg9J8rGDqTwJtj6nXJl9Q6mThkTH405bBi7G6JPQBu48IUKJeYt76xWEgaSpf5lYR8p3FUwcBp9/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;237&quot; data-original-width=&quot;380&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_xIfSloW7xVrI-LMJi3E9AVdcIguk-bIISZrrySTpDmQhsa-rx9Or35qaRZjAnVMQejg9J8rGDqTwJtj6nXJl9Q6mThkTH405bBi7G6JPQBu48IUKJeYt76xWEgaSpf5lYR8p3FUwcBp9/&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;b&gt;b) Top-Down Approach&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration of the units/modules is tested from the top to bottom levels step by step.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The first unit is tested individually by writing test STUBS. After this, the lower levels are integrated one by one until the last level is put together and tested.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The top-down approach is a very organic way of integrating as it is consistent with how things happen in the real environment.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The only concern with this approach is that the major functionality is tested at the end.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZl7cIiRMq4LrE0sEXyiQBf-ZQuTrLHEZf-yTL46MfCW_zsJTf-RteZ1Dd351vSRqhAhvcaYNG8lkS8NRHF5D_ygR1YFyum94rrVemZXPwFhiZGgHTO4vGpcwaFkHJMpJPoX-4BpvSvnQi/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;199&quot; data-original-width=&quot;380&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZl7cIiRMq4LrE0sEXyiQBf-ZQuTrLHEZf-yTL46MfCW_zsJTf-RteZ1Dd351vSRqhAhvcaYNG8lkS8NRHF5D_ygR1YFyum94rrVemZXPwFhiZGgHTO4vGpcwaFkHJMpJPoX-4BpvSvnQi/&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;c) Bottom-Up Approach&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Units/modules are tested from bottom to top level, step by step, until all levels of units/modules are integrated and tested as one unit. Stimulator programs called DRIVERS are used in this approach. It is easier to detect issues or errors at the lower levels.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span face=&quot;Work Sans, sans-serif&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;The major disadvantage of this approach is that the higher-level issues can only be identified at the end when all the units have been integrated.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kWnS1RYt0w3QuQdSV8bPAjJTwLiGq_9fnT00pLbSYW0-up-6cD78al_0wJ5KYElOFdae6evFT2K35OchvnpsNNRS_TEJyUmsI-ODG0Jfl-i7VwFfaMIfGhlQg1E22T3YRWT8FoBqVoxy/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;204&quot; data-original-width=&quot;380&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kWnS1RYt0w3QuQdSV8bPAjJTwLiGq_9fnT00pLbSYW0-up-6cD78al_0wJ5KYElOFdae6evFT2K35OchvnpsNNRS_TEJyUmsI-ODG0Jfl-i7VwFfaMIfGhlQg1E22T3YRWT8FoBqVoxy/&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; line-height: 1.2em; margin: 0px 0px 20px; padding: 0px; text-align: left;&quot;&gt;&lt;span id=&quot;Unit_Testing_vs_Integration_Testing&quot; style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica;&quot;&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;Unit Testing vs Integration Testing&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; color: #3a3a3a; font-size: 15px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Having had enough discussion about unit testing and integration testing, let us quickly go through the differences between the two in the following table:&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;tablepress-scroll-wrapper&quot; id=&quot;tablepress-485-scroll-wrapper&quot; style=&quot;border: 0px; color: #3a3a3a; font-size: 15px; margin: 0px; overflow: auto hidden; padding: 0px;&quot;&gt;&lt;table class=&quot;tablepress tablepress-id-485 tablepress-responsive&quot; id=&quot;tablepress-485&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: none; margin: 0px 0px 1em; padding: 0px; width: 784.8px;&quot;&gt;&lt;thead style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;tr class=&quot;row-1 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;th class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit Testing&lt;/span&gt;&lt;/th&gt;&lt;th class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration Testing&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;row-hover&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;tr class=&quot;row-2 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Tests the single component of the whole system i.e. tests a unit in isolation.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Tests the system components working together i.e. test the collaboration of multiple units.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-3 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Faster to execute&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Can run slow&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-4 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;No external dependency. Any external dependency is mocked or stubbed out.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Requires interaction with external dependencies (e.g. Database, hardware, etc.)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-5 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Simple&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Complex&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-6 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Conducted by developer&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Conducted by tester&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-7 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It is a type of white box testing&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It is a type of black box testing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-8 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Carried out at the initial phase of testing and then can be performed anytime&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Must be carried out after unit testing and before system testing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-9 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Cheap maintenance&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Expensive maintenance&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-10 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Begins from the module specification&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Begins from the interface specification&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-11 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit testing has a narrow scope as it just checks if each small piece of code is doing what it is intended to do.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;It has a wider scope as it covers the whole application&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-12 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The outcome of unit testing is detailed visibility of the code&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;The outcome of integration testing is the detailed visibility of the integration structure&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-13 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(243, 243, 243); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Uncover the issues within the functionality of individual modules only. Does not exposes integration errors or system-wide issues.&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(243, 243, 243); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Uncover the bugs arise when different modules interact with each other to form the overall system&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; font-size: 15px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;table class=&quot;tablepress tablepress-id-486 tablepress-responsive&quot; id=&quot;tablepress-486&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: none; color: #3a3a3a; font-size: 15px; margin: 0px 0px 1em; padding: 0px; width: 784.8px;&quot;&gt;&lt;thead style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;tr class=&quot;row-1 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;th class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/th&gt;&lt;th class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Unit testing&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;th class=&quot;column-3&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integration testing&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;th class=&quot;column-4&quot; style=&quot;background: 0px 0px rgb(217, 237, 247); border-bottom: 1px solid rgb(221, 221, 221); border-image: initial; border-left: none; border-right: none; border-top: none; float: none; margin: 0px; padding: 8px; text-align: left; vertical-align: middle; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Functional testing&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody class=&quot;row-hover&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;tr class=&quot;row-2 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Definition and purpose&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Testing smallest units or modules individually.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-3&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Testing integration of two or more units/modules combined for performing tasks.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-4&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 0px; float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Testing the behavior of the application as per the requirement.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-3 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Complexity&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Not at all complex as it includes the smallest codes.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-3&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Slightly more complex than unit tests.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-4&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;More complex compared to unit and integration tests.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-4 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Testing techniques&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;White box testing technique.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-3&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;White box and black box testing technique. Grey box testing&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-4&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Black box testing technique.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-5 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Major attention&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Individual modules or units.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-3&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Integration of modules or units.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-4&quot; style=&quot;background: 0px 0px rgb(249, 249, 249); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Entire application functionality.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-6 even&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Error/Issues covered&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Unit tests find issues that can occur frequently in modules.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-3&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Integration tests find issues that can occur while integrating different modules.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-4&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Functional tests find issues that do not allow an application to perform its functionality. This includes some scenario-based issues too.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr class=&quot;row-7 odd&quot; style=&quot;border: 0px; margin: 0px; padding: 0px; word-break: normal;&quot;&gt;&lt;td class=&quot;column-1&quot; style=&quot;background: 0px 0px rgb(243, 243, 243); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Issue escape&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-2&quot; style=&quot;background: 0px 0px rgb(243, 243, 243); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;No chance of issue escape.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-3&quot; style=&quot;background: 0px 0px rgb(243, 243, 243); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;Less chance of issue escape.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;column-4&quot; style=&quot;background: 0px 0px rgb(243, 243, 243); border-bottom: none; border-image: initial; border-left: none; border-right: none; border-top: 1px solid rgb(221, 221, 221); float: none; margin: 0px; padding: 8px; vertical-align: top; word-break: normal;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;More chances of issue escape as the list of tests to run is always infinite.&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;h3 style=&quot;box-sizing: border-box; line-height: 25px; margin: 30px 0px 10px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-size: small;&quot;&gt;&lt;i&gt;&lt;u&gt;What is the difference between VA and PT?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; color: #3a3a3a; font-size: 16px; height: auto; line-height: 25px; margin: 10px 0px 0px; padding: 0px 10px; text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;table-responsive&quot; style=&quot;box-sizing: border-box; color: #3a3a3a; font-family: &amp;quot;Open Sans&amp;quot;, sans-serif; font-size: 16px; overflow-x: auto; width: 795px;&quot;&gt;&lt;table class=&quot;table table-bordered&quot; style=&quot;border-collapse: collapse; border: 0px; color: #212529; margin: auto; max-width: 100%; min-width: 100%; overflow-x: auto; width: fit-content;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;background-color: #008dd9; border: 1px solid rgb(222, 226, 230); box-sizing: border-box; color: white; font-size: 16px; line-height: 25px; padding: 0.75rem; text-align: center; vertical-align: top;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Vulnerability Assessment&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #008dd9; border: 1px solid rgb(222, 226, 230); box-sizing: border-box; color: white; font-size: 16px; line-height: 25px; padding: 0.75rem; text-align: center; vertical-align: top;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Penetration testing&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; font-size: 16px; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;V&lt;span style=&quot;color: black;&quot;&gt;ulnerability Assessment is an approach used to find flaws in an application/network&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; font-size: 16px; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;It is the practice of finding exploitable vulnerabilities like a real attacker will do&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; font-size: 16px; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;It is like travelling on the surface&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; font-size: 16px; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;color: black; font-family: helvetica;&quot;&gt;It is digging for gold.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;h3 style=&quot;box-sizing: border-box; line-height: 25px; margin: 30px 0px 10px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica; font-size: small;&quot;&gt;&lt;i&gt;&lt;u&gt;What is the difference between encryption and hashing?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; color: #3a3a3a; height: auto; line-height: 25px; margin: 10px 0px 0px; padding: 0px 10px; text-align: justify;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;table-responsive&quot; style=&quot;box-sizing: border-box; color: #3a3a3a; overflow-x: auto; width: 795px;&quot;&gt;&lt;table class=&quot;table table-bordered&quot; style=&quot;border-collapse: collapse; border: 0px; color: #212529; margin: auto; max-width: 100%; min-width: 100%; overflow-x: auto; width: fit-content;&quot;&gt;&lt;tbody style=&quot;box-sizing: border-box;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;background-color: #008dd9; border: 1px solid rgb(222, 226, 230); box-sizing: border-box; color: white; line-height: 25px; padding: 0.75rem; text-align: center; vertical-align: top;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Encryption&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #008dd9; border: 1px solid rgb(222, 226, 230); box-sizing: border-box; color: white; line-height: 25px; padding: 0.75rem; text-align: center; vertical-align: top;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 600;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Hashing&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Encryption is reversible&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Hashing is irreversible&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;box-sizing: border-box;&quot;&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Encryption ensures confidentiality&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border: 1px solid rgb(222, 226, 230); box-sizing: border-box; line-height: 25px; padding: 0.75rem; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Hashing ensures Integrity&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style=&quot;box-sizing: border-box; color: #3a3a3a; height: auto; line-height: 25px; margin: 10px 0px 0px; padding: 0px 10px; text-align: justify;&quot;&gt;&lt;/p&gt;&lt;h3 style=&quot;box-sizing: border-box; line-height: 25px; margin: 30px 0px 10px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;color: #2b00fe; font-family: helvetica; font-size: small;&quot;&gt;&lt;i&gt;&lt;u&gt;What is CIA Triad?&lt;/u&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;box-sizing: border-box; color: #3a3a3a; height: auto; line-height: 25px; margin: 10px 0px 0px; padding: 0px 10px; text-align: justify;&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;box-sizing: border-box; color: #3a3a3a; margin: 10px 0px 0px; padding-left: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box; line-height: 25px; margin-left: 30px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Confidentiality : Keeping the information secret.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; line-height: 25px; margin-left: 30px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Integrity : Keeping the information unaltered.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; line-height: 25px; margin-left: 30px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;Availability : Information is available to the authorised parties at all times&lt;/span&gt;&lt;span face=&quot;Open Sans, sans-serif&quot;&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Scenario Based Cybersecurity Interview Questions&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;font-size: 15px;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;A friend of yours sends an e-card to your mail. You have to click on the attachment to get the card.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;What do you do? Justify your answer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;There are four risks here:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Some attachments contain viruses or other malicious programs, so just in general, it’s risky to open unknown or unsolicited attachments.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Also, in some cases just clicking on a malicious link can infect a computer, so unless you are sure a link is safe, don’t click on it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Email addresses can be faked, so just because the email says it is from someone you know, you can’t be certain of this without checking with the person.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Finally, some websites and links look legitimate, but they’re really hoaxes designed to steal your information.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;One of the staff members in XYZ subscribes to many free magazines. Now, to activate her subscriptions one of the magazines asked for her month of birth, second asked for her year of birth, the other one asked for her maiden name.&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;What do you infer from this situation? Justify.&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;All three newsletters probably have the same parent company or are distributed through the same service. The parent company or service can combine individual pieces of seemingly-harmless information and use or sell it for identity theft&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;It is even possible that there is a fourth newsletter that asks for a day of birth as one of the activation questions&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Often questions about personal information are optional. In addition to being suspicious about situations like the one described here, never provide personal information when it is not legitimately necessary, or to people or companies, you don’t personally know.&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;In our computing labs, print billing is often tied to the user’s login. Sometimes people call to complain about bills for printing they never did only to find out that the bills are, indeed, correct.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;What do you infer from this situation? Justify.&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Sometimes they realize they loaned their account to a friend who couldn’t remember his/her password, and the friend did the printing. Thus the charges. It’s also possible that somebody came in behind them and used their account&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;This is an issue with shared or public computers in general. If you don’t log out of the computer properly when you leave, someone else can come in behind you and retrieve what you were doing, use your accounts, etc. Always log out of all accounts, quit programs, and close browser windows before you walk away.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;There is this case that happened in my computer lab. A friend of mine used their yahoo account at a computer lab on campus. She ensured that her account was not left open before she left the lab. Someone came after her and used the same browser to re-access her account. and they started sending emails from it.&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-size: 15px;&quot;&gt;What do you think might be going on here?&lt;/b&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The first person probably didn’t log out of her account, so the new person could just go to history and access her account.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Another possibility is that she did log out, but didn’t clear her web cache. (This is done through the browser menu to clear pages that the browser has saved for future use.)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;Two different offices on campus are working to straighten out an error in an employee’s bank account due to a direct deposit mistake.&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Office #1 emails the correct account and deposit information to office #2, which promptly fixes the problem.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;The employee confirms with the bank that everything has, indeed, been straightened out.&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;What is wrong here?&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Account and deposit information is sensitive data that could be used for identity theft. Sending this or any kind of sensitive information by email is very risky because email is typically not private or secure. Anyone who knows how can access it anywhere along its route.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;As an alternative, the two offices could have called each other or worked with ITS to send the information a more secure way.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;The mouse on your computer screen starts to move around on its own and click on things on your desktop. What do you do?&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;a) Call your co-workers over so they can see&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;b) Disconnect your computer from the network&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;c) Unplug your mouse&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;d) Tell your supervisor&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;e) Turn your computer off&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;f) Run anti-virus&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;g) All of the above&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Select all the options that apply.&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;b&gt;Right answer is B &amp;amp; D.&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;This is definitely suspicious. Immediately report the problem to your supervisor and the ITS Support Center:&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Also, since it seems possible that someone is controlling the computer remotely, it is best if you can disconnect the computer from the network (and turn off wireless if you have it) until help arrives. If possible, don’t turn off the computer.&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;You receive an email from your bank telling you there is a problem with your account. The email provides instructions and a link so you can log into your account and fix the problem.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;What should you do?&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Delete the email. Better yet, use the web client (e.g. gmail, yahoo mail, etc.) and report it as spam or phishing, then delete it.&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Any unsolicited email or phone call asking you to enter your account information, disclose your password, financial account information, social security number, or other personal or private information is suspicious – even if it appears to be from a company you are familiar with. Always contact the sender using a method you know is legitimate to verify that the message is from them&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;color: #2b00fe;&quot;&gt;&lt;span style=&quot;text-align: center;&quot;&gt;A while back, the IT folks got a number of complaints that one of our campus computers was sending out Viagra spam. They checked it out, and the reports were true: a hacker had installed a program on the computer that made it automatically send out tons of spam email without the computer owner’s knowledge.&lt;/span&gt;&lt;span style=&quot;text-align: center;&quot;&gt;How do you think the hacker got into the computer to set this up?&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px;&quot;&gt;&lt;span style=&quot;text-align: center;&quot;&gt;This was actually the result of a hacked password. Using passwords that can’t be easily guessed, and protecting your passwords by not sharing them or writing them down can help to prevent this. Passwords should be at least 8 characters in length and use a mixture of upper and lower case letters, numbers, and symbols.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;text-align: center;&quot;&gt;Even though in this case it was a hacked password, other things that could possibly lead to this are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;text-align: center;&quot;&gt;Out of date patches/updates&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;text-align: center;&quot;&gt;No anti-virus software or out of date anti-virus software&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;p style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;border: 0px; margin: 0px 0px 1.4em; padding: 0px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span style=&quot;font-family: helvetica;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://okayguru.blogspot.com/feeds/8620511436027389048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://okayguru.blogspot.com/2021/04/cyber-security-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8620511436027389048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8805403795653453599/posts/default/8620511436027389048'/><link rel='alternate' type='text/html' href='http://okayguru.blogspot.com/2021/04/cyber-security-interview-questions.html' title='Cyber Security Interview questions'/><author><name>Satish Vanahalli</name><uri>http://www.blogger.com/profile/03055443151393255955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmvD8D-IOXgOxxb8iUhk0CCnqwUyjioAY8_aijGP3Ph2evQANWbvvz62pxSuwA5YZUfSF18vug2j5f4DfXkyAXGGzSZ75p-e8hGR4EaQM5StqzJzWkIrCU2wh4RgbJyyI/s150/7D+%284%29.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEijJ6IJZ_t_glMfSTmXgb1OLysryxIZ0tAxkkZF5W-sECMZj6mKG66xONyTOsQeT_gOe-PZ7lGEekqJkfv4puOWjvv-Jbb2mtynn-I51Z44tOJfdEf9A5CxjGYYH1FwL-6Lj_pt_ZRSfTycLhyxwy2rRo1uby5T6KvDa7uLW00ClNMf6ZqP_t3KqIrh3g=s72-w640-h468-c" height="72" width="72"/><thr:total>0</thr:total></entry></feed>