Python Tutorial Examples – Programming, Pseudocode Example, C# Programming Example

# Tag - Python Tutorial Examples

Python 3

## Python Data Types with Examples

In this post, we will learn about the data type used in Python. Every programming language has this same concept as the data type. Similarly, Python has a data type of every variable that is used in the code. The datatype is very...

Python 3

## Find Sum Of Elements In A List in Python

In this article, we will learn How to find sum of elements in a list in Python. In this article, we will show you how to find the sum of numbers of the list in Python language;. This programs take input from the user for the list...

Python 3

## Find the Greatest of Three Numbers Using the Function in Python

In this example, we will discuss the concept of the Python program:find the greatest of three numbers using the function In this post, we will learn how to find the greatest number of three numbers using a user-defined function...

Python 3

## Sort a Dictionary in Python

In this example, we will learn how to sort a dictionary in python. In the below example we will sort a dictionary by key, value, and items. Sort by key: Python dict = {} dict['1'] = 'Ford' dict['4'] = 'Audi' dict['2'] = 'Toyota'...

Python 3

## Filter the Positive Numbers from a list in Python

In this example, i’ll show you how to filter the positive numbers from a list. Python Code: Python nums = [-15, 12, 15, -5] print("Original numbers in the list: ",nums) Pos_nums = list(filter(lambda x: x >0, nums))...

Python 3

## Python Program to Check Whether a Number is Even or Odd

In this example, you will learn to check whether a number entered by the user is even or odd. In the program, the integer entered by the user is stored in the variable num. Then, whether num is perfectly divisible...

Python 3

## Calculate the Sum of Three Given Numbers

Write a Python program to calculate the sum of three given numbers, if the values are equal then return thrice of their sum. Python Code: Python def sum_thrice(x, y, z): sum = x + y + z if x == y == z: sum = sum * 3 return sum...

Python 3

## Print the Calendar of a Given Month and Year

In this example, i’ll show you how to print the calendar of a given month and year. Python Code: Python import calendar year = int(input("Input the year : ")) month = int(input("Input the month : ")) print(calendar...

Python 3

## Accept a filename from the user and print the extension of that file in Python

Write a Python program to accept a filename from the user and print the extension of that file. Python Code: Python filename = input("Input the Filename: ") f_extns = filename.split(".") print ("The extension of the file is : " +...

Python 3

## Reverse a String in Python

Write a Python program which accepts the user’s first and last name and print them in reverse order. Python Code: Python firstname = input("Input your First Name : ") lastname = input("Input your Last Name : ") print...