Sets in python

What is Set?
  • Set is an unordered collection data type with no duplicate elements. (unique elements)
  • Using curly braces {} or keyword set, we can create a set in Python.
  • In general, the set function is used to eliminate duplicate elements in a list.

Python Comments

Python Comments:
  • Comments are the lines that are used to make your code more readable.
  • Comment lines are mainly used for documentation purposes to make the readers understand the source code.
  • These are the lines that are skipped during the execution of the program by the compilers and the interpreters.
  • Sometimes, comments can also serve to prevent the execution of a line when testing code.
  • There are three types of comments in python.
    • Single line comments 
    • Multi-line comments
    • Docstring comments

ISRO 2020 Scientist/Engineer 'SC' Electrical BE005 Question paper with Answer marked

ISRO 2020 Electrical BE005:

ISRO Centralised Recruitment Board

Recruitment for Scientist/Engineer 'SC'

Electrical - BE 005

Held on: January 12, 2020

For loop - Python practice program

For loop - Python practice program:

Copy and try on your own.
1) Display sum 1 to 10 number by using for loop

    '''Display sum 1 to 10 number by using for loop'''
    for i in range(1,n+1):
    print("Sum of 1 to 10 number using for loop:",ans)

While loop - Python practice programs

While loop - Python practice programs:

Copy and try on your own.
1) Find first n numbers divisible by 5 using while loop

    '''first n numbers divisible by 5'''
    n=int(input("Enter n:"))
        if n%5 == 0:
            print(n, end=',')