In this post, we will see different types of questions based on python language which checks your python basic skills. Ques 1: Give the output that will be produced on the execution of the following code segments: Ques 2: Write a function series_sum(n) in Python to calculate the sum of the first n terms of […]
Tag: python
Python – Program for printing Prime Numbers from the List of Numbers
In this post, We will see how to write a python program for finding prime numbers from the list of numbers in different ways. Click on this link : Prime Number Example: Input: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Output: Prime Number : -> 2, 3, 5, 7, Input: [15, […]
Python – Program for checking whether a number is Prime or not?
In this post, We will be going to see different ways to write a code in Python for checking whether a number is Prime or not, provided number > 1. Prime Number is a natural number which is greater than 1 and that has no positive divisors other than 1 and number itself. Examples : […]
Python – Program for counting number of letters in a word
In this post, We will be going to see different ways to write a code in Python for counting number of letters in a word Example: Input: Word = “BioChemiThon” Output: B -> 1 i -> 2 o -> 2 C -> 1 h -> 2 e -> 1 m -> 1 T -> 1 […]
Set up Python virtual environment using Anaconda
While working with python, we usually face the problem of setting up the virtual environment. In this blog I have covered the steps of creating virtual environment in python. Anaconda : Anaconda is an open source software that contains Jupyter, spyder idle etc that are used for large data processing, data analytics, heavy scientific computing. […]
How to count amino acid in a protein sequence using Python program
In this article, we are going to learn how python can be useful in finding amino acid in a given protein sequence. Before reading this article you must know about FASTA format and single letter code for the amino acid. (Click here FASTA format) Here, we will learn how can we find the total length […]
Python – Different ways to Reverse a String
In this post, We will see different ways to Reverse a string in Python. Code 1: Using the concept of string-Slicing. Output: Reverse String: nohtimehcoiB Code 2: Using the concept of Looping and string-Concatenation. Output: Reverse String: nohtimehcoiB Code 3: Using the concept of Reverse Looping. Output: Reverse String: nohtimehcoiB Code 4: Using reversed(),list() and […]
How to find out the complementary strand of DNA using Python
What is a complementary strand? DNA (deoxyribonucleic acid) is made up of pentose Sugar, nitrogenous bases, and phosphate. DNA has a backbone of sugar and phosphate. As we all know DNA is a double helical structure (Watson & crick model) and both the strand of DNA are complementary of each other. So, what does it […]
Python – Tuples
This article covers about tuples in python. Tuples can be a collection of homogeneous or heterogeneous items. It can be seen as similar to list but the major difference is that list is mutable unlike tuple which is immutable and list uses square brackets but in tuple we use parentheses. Creating a Tuple: a) Empty […]
Python – frozenset() function
In this article, we will be discussing frozenset() which is an inbuilt function provided by Python language. frozenset() function: The task of this function is to freeze the iterable objects provided and make them unchangeable So that, no changes take place. Also, frozenset() is somehow similar to set(). However, it differs only in making the […]