Swift programming for Beginners – Swift Ternary Conditional Operator

Hits: 10 (Swift for Beginners) Swift Ternary Conditional Operator In this article, you will learn to use conditional or ternary operator to alter control flow of the program. The ternary conditional operator “? :” is a shorthand for if-else statement. The syntax for ternary conditional operator is: condition ? value1 : value2 How ternary conditional operator works? …

Swift programming for Beginners – Swift Operator precedence and associativity

Hits: 6 (Swift for Beginners) Swift Operator precedence and associativity In this article you will learn about the rules used to evaluate a expression with operators and operands. Swift Operator precedence Operator precedence is a collection of rules used in order to evaluate a given mathematical expression. When there are several operators used in a …

Swift programming for Beginners – Swift Operators

Hits: 8 (Swift for Beginners) Swift Operators In this article, you’ll learn everything about different types of operators in Swift programming language, their syntax and how to use them with examples. Operators are special symbols (characters) that carry out operations on operands (variables and values). Some basic operations includes assigning, changing, combining and checking values. …

Swift programming for Beginners – Swift Expressions, Statements and Code blocks

Hits: 9 (Swift for Beginners) Swift Expressions, Statements and Code blocks In this article, you will learn about Swift expressions, statements and blocks. In the previous chapter, we used expressions, statements and blocks without explaining what it is although it’s used in every Swift program. After you know what variables, operators are it will be …

Swift programming for Beginners – Swift Basic Input and Output

Hits: 20 (Swift for Beginners) Swift Basic Input and Output In this article, you will learn different ways to display output and get input in Swift. Swift Basic Output You can simply use print(_:separator:terminator:) function to send output to standard output (screen). See Swift function article to learn about functions in Swift. The function print(_:separator:terminator:) accepts three parameters. items: Items to print …

Swift programming for Beginners – Swift Characters and Strings

Hits: 15 (Swift for Beginners) Swift Characters and Strings In this tutorial, you will learn about characters and strings usage in Swift. You’ll also learn different operations that can be performed on strings and characters. What is a character? A character is a single symbol (letter, number, etc.). Character in swift are of Character type and is …

Swift programming for Beginners – Swift Variables, Constants and Literals

Hits: 18 (Swift for Beginners) Swift Variables, Constants and Literals   In this article, you will learn about variables, constants, literals and their use cases in Swift programming. What is a Variable? In programming, variables are used to store data in memory which can be used throughout the program. Each variable must be given a …

Swift programming for Beginners – Swift “Hello World” Program

Hits: 16 (Swift for Beginners) Swift “Hello World” Program In this article, you will dive into Swift programming by writing a “Hello, World!” program. You’ll learn the basic syntax for a working Swift program. A “Hello, World!” is a computer program that is often used to illustrate the basic syntax of a programming language with …

Python Basics for Beginners – Python | Basic Operators

Hits: 29 Python Basics for Beginners – Python | Basic Operators Operators are the constructs which can manipulate the value of operands. Consider the expression 4 + 5 = 9. Here, 4 and 5 are called operands and + is called operator. Types of Operator Python language supports the following types of operators. Arithmetic Operators …

Python Basics for Beginners – Python | Variable Types

Hits: 19 Python Basics for Beginners – Python | Variable Types Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the …

Python Basics for Beginners – Python | Basic Syntax

Hits: 25  Python Basics for Beginners – Python | Basic Syntax The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. First Python Program Let us execute programs in different modes of programming. Interactive Mode Programming Type the following text at the Python prompt and …

Python Basics for Beginners – Python | Introduction

Hits: 38  Python Basics for Beginners – Python | Introduction   Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages. Python is Interpreted − Python is processed at …

Python Basics for Beginners – Why should I learn Python?

Hits: 25 Python Basics for Beginners – Why should I learn Python? Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during 1985- 1990. Like Perl, Python source code is also available under the GNU General Public License (GPL). This tutorial gives enough understanding on Python programming language.   Why to …