Python List Files in a Directory: Step-By-Step Guide
The Python os library is used to list the files in a directory. The Python os.listdir() method returns a list of every file and folder in a directory. os.walk() function returns a list of every file in an entire file…
Python Ceil and Floor: A Step-By-Step Guide
The Python ceil() function rounds a number up to the nearest integer, or whole number. Python floor() rounds decimals down to the nearest whole number. Both of these functions are part of the math Python library. When programming in Python,…
Python Reverse String: A Step-By-Step Guide
You can reverse a string in Python using slicing or the reversed() method. A recursive function that reads each character in a string and reverses the entire string is another common way to reverse a string. There is no function…
Python Lowercase: A Step-By-Step Guide
The Python lower() function converts a string to all lowercase. The Python isLower() method will check if the alphabetical characters in a string are all lowercase and return True or False. The lower() and isLower() functions are useful for fields…
Python Nested Dictionary: A How-To Guide
A Python nested dictionary is a dictionary within another dictionary. This lets you store data using the key-value mapping structure within an existing dictionary. When you’re working with dictionaries in Python, you may encounter a situation where a dictionary contains…
Git Checkout: A Step-By-Step Guide
The git checkout command navigates between two different branches in a Git repository. Checkout is used to view and make changes to different branches. You can check out a past commit in a repository to view how your project appeared…
Java User Input and Scanner Class: A Step-By-Step Guide
The Scanner class is used to read Java user input. Java Scanner is built into the java.util package, so no external libraries are needed to use it. Scanner reads text from standard input. This text is returned to the main…
JavaScript Bubble Sort: A Guide
How to Write a JavaScript Bubble Sort Do you have a list of values that you need to sort? The bubble sort could be for you. Bubble sorts compare adjacent elements in a list and swap their positions if they…
JavaScript Replace(): A Step-By-Step Guide
To replace text in a JavaScript string the replace() function is used. The replace() function takes two arguments, the substring to be replaced and the new string that will take its place. Regex(p) can also be used to replace text…
SQL Add Column: A How-To Guide
There is no SQL ADD COLUMN statement. To add a column to an SQL table, you must use the ALTER TABLE ADD syntax. ALTER TABLE lets you add, delete, or modify columns in a table. After you have created a…
JavaScript Object.keys(): A Guide
The JavaScript Object.keys() method retrieves the keys in an Object and returns a list that contains those keys. The order of the keys in the final list is the order they appear in the original Object. JavaScript (JS) Objects consist…
Python AttributeError: A How-To Guide
Attributes are values or functions associated with an object, a data type, or a class. If you call an attribute on a value whose data type or class does not support that attribute, you’ll encounter an AttributeError. This guide discusses…
Python Delete File: A Step-By-Step Guide
You can delete files from your computer using Python. The os.remove() method deletes single Python files. os.rmdir() removes a file or a directory. The shutil.rmtree() method will delete a directory and the files contained in it. Developers use files in…
Python Optional Arguments: A How-To Guide
A Python optional argument is a type of argument with a default value. You can assign an optional argument using the assignment operator in a function definition or using the Python **kwargs statement. There are two types of arguments a…
Python Ternary Operator: A How-To Guide
The Python ternary operator lets you evaluate whether a condition is true or false. The ternary operator takes up one line of code, which means it is shorter and more concise than a full if...else statement. Conditional statements, such as…
Binary Search Python: A Step-by-Step Guide
A Python binary search finds the position of an item in a sorted array. It divides a list in half. If a specified value is higher than the middle number, the search focuses on the right of the list. Otherwise,…
Python Class Variables vs. Instance Variables
Python is an object-oriented programming language that allows programmers to define objects which can contain data. Python variables let you store particular values in a program. When you’re working with objects in Python, there are two types of variables you…
Front End Development: Courses, Training, Other Resources
How to Learn Front End Development Have you ever wondered who's responsible for the design of the websites you use every day? Who was behind the design of Facebook? Who decided this site should have a footer? Behind every website…
Git: Courses, Training, and Other Resources
How to Learn Git At some point in your journey to becoming a programmer, you will likely have heard the term Git come up. But what is Git, and how does it work? That’s the question this guide is going…
Operating Systems: Courses, Training, and Other Resources
How to Learn Operating Systems Linux, macOS, and Windows are all operating systems. You’ll see these names when you go to download software. Some software is only available for a specific operating system, whereas other pieces of software have multiple…
HTML Input: Step-by-Step Guide
The HTML input tag creates an input field in which a user can insert data. Common inputs include text fields, checkboxes, radio buttons, and email fields. An input tag should be labelled using a <label> tag. Forms in HTML consist…
What is a Processor?
What is a Processor? A processor, or CPU, is a circuit board inside a computer that executes instructions on behalf of programs. Modern computer processors can process millions of instructions in a second. Processors are considered the main chip on…
How to Learn Swift Programming: The Complete Guide
How to Learn Swift Are you interested in creating your own iOS or Mac app? If so, there is one programming language that you will need to learn: Swift. This guide will explore the best way to learn Swift online.…
How to Learn TypeScript
How to Learn TypeScript Over the past few years, TypeScript has become an increasingly common language used by developers. TypeScript, created by Microsoft in 2012, is a typed super set of JavaScript that allows you to write scalable and efficient…
Learning Linux: A Guide for Beginners
Linux is an operating system that has been around since the 1990s. It powers most modern technologies we use today, such as Android devices, televisions, cameras, and even smart appliances. This guide will show you how to learn Linux and…
HTML Iframe: Step-by-Step Guide
The HTML iframe tag embeds a web document onto a web page. An embedded document could be a PDF, a web page, or another asset. The src attribute defines the location of the embedded resource. You can embed the contents…
.gitignore Files: A Guide for Beginners
.gitignore files contain a list of files Git should ignore in a local project. A .gitignore file commonly appears in the main directory of a project. You can ignore single files, multiple files, or folders. You may have files that…
A Step-By-Step Guide to charAt in Java
The Java charAt() method returns a character at a specific index position in a string. The first character in a string has the index position 0. charAt() returns a single character. It does not return a range of characters. When…
How to Use Java Math.random
The Math.random()Java method generates a pseudorandom number between 0.0 and 1.0. The resulting random number can be multiplied to get a range outside 0-1, and the result can be 0 but is always less than 1. When you’re programming, there are…
JavaScript Split: A Step-By-Step Guide
The JavaScript split() method divides a string into an array of substrings. These substrings are added to a new array. split() returns the new array of substrings. When you’re programming, it’s common to see cases where you need to get…