
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

840 Views
This tutorial will discuss how to write a swift program to calculate compound interest. The interest applied to the principal and interest together over a certain period of time is known as compound interest. In other words, the compound interest is known as the interest on interest. It is calculated after calculating the amount. Formula Following is the formula of compound interest − Amount(A) = Principal(P)(1 + Rate/100)Time(t) C.I = Amount(A) - Principal(P) Where Principal(P) − Principal amount represents the amount that is initially invested. Rate(R) − Rate represents the interest rate, that applied to the principal amount for the ... Read More

954 Views
This tutorial will discuss how to write a swift program to calculate the Sum of Natural Numbers. Natural numbers are the set of whole numbers excluding 0. In other words, natural numbers are the numbers which includes all the positive numbers starting from 1 to infinity. It does not contain negative numbers and 0 in it. For example 2, 3, 67, 49, etc. They are also known as counting numbers. We can find the sum of natural numbers by adding given natural numbers using arithmetic addition operator (+). For example, we have 8 so the sum of natural numbers is ... Read More

1K+ Views
This tutorial will discuss how to write a Swift program to generate Multiplication Table. A multiplication table is a list or table of multiples of a specified number. We can create a multiplication table by multiplying a number with whole numbers. Generally, a multiplication table is created upto 10 times but you can create it according to your need. Below is a demonstration of the same − Suppose our given input is − The desired output is − Following is the multiplication table is 9 9 * 1 = 10 9 * 2 = 20 9 * 3 ... Read More

991 Views
This tutorial will discuss how to write a swift program to calculate simple interest. Simple interest is the most commonly used method to find the interest on the money for a given time period. In this method, the interest is always applied to the original principal amount with same the interest rate for every time period. It is calculated by multiplying the interest rate by the principal amount and the time. Formula Following is the formula of simple interest − S.I = Principal Amount(P) x Time(T) x Rate(R)/100 Where Principal(P) − Principal amount represents the amount that is initially invested. ... Read More

2K+ Views
This tutorial will discuss how to write a swift program to calculate the power of a number. Power of a number means how many times a number is used in multiplication, for example, 16 ^2 = 16 * 16 = 256 or 16 to the power of 2. It is also known as exponent or indices. Below is a demonstration of the same − Suppose our given input is − Number - 16 Exponent Value is - 3 The desired output is − Final result is 16^3 = 4096 Calculating power of a number using recursion We can calculate the ... Read More

25K+ Views
In this article, we will show you how to delete a specific/particular line from a text file using python.Assume we have taken a text file with the name TextFile.txt consisting of some random text. We will delete a particular line (for example line 2) from a text fileTextFile.txtGood Morning This is Tutorials Point sample File Consisting of Specific source codes in Python, Seaborn, Scala Summary and Explanation Welcome everyone Learn with a joyAlgorithmFollowing are the Algorithm/steps to be followed to perform the desired task −Create a variable to store the path of the text file.Use the open() function(opens a file ... Read More

3K+ Views
This tutorial will discuss how to write a swift program to swap two numbers. Swapping of two variables means mutually exchanging the values of two variables.Swapping using temporary variableGiven two variables Number1 and Number2 now we swap their values with each other using a temporary variable Numtemp. It is the most easiest way to swap two numbers.AlgorithmThe algorithm is explained below −Step 1 − Declare three integer variables: Number1, Number2 and Numtemp(temporary variable.)Step 2 − Assign values to Number1 and Number2Step 3 − Assign Number1 to NumbertempStep 4 − Assign Number2 to Number1Step 5 − Assign Numbertemp to Number2Step 6 ... Read More

2K+ Views
This tutorial will discuss how to write a swift program to read the number from standard input. Reading a number from standard input in Swift is very easy with the help of readLine(), Int(), and Float() functions.readLine() function − This function returns a string of characters which is read from the standard input at the end of the current line. If the control is already reached to the EOF when the readLine() function is called then this method will return nil.SyntaxFollowing is the syntax of Swift readLine() function −readLine(strippingNewline: true) Or readLine()Int() function − This function is used ... Read More

750 Views
This tutorial will discuss how to write a swift program to multiply two floating point numbers.Floating point numbers are the numbers with fraction or numbers with decimal value for example 34.56, 987.23, 0.234, etc. In Swift, floating point data type has a wide range of values and can store much smaller or larger number as compare to Integer. Swift support two signed floating point number types that is Double and Float. Double is used to represent 64-bit floating point number and has precision of at least 15-decimal digit. Whereas Float is used to represent 32-bit floating point number and has ... Read More

2K+ Views
This tutorial will discuss how to write a swift program to print an Integer. Integers represents the number with no fractional component like 45, 980, -234, 24, etc. Swift supports both signed as well as unsigned integers in 8, 16, 32, and 64 bit. Here signed integer is represented by Int whereas unsigned integer is represented by UInt and their size is same as the current platform e.g if the platform is 32-bit then the size is Int32 or UInt32 unless you work with some specific size of the integer.SyntaxFollowing is the syntax for creating integer type variablevar x : ... Read More