How to Format Dollars and Cents in Python
The challenge
The company you work for has just been awarded a contract to build a payment gateway. In order to help move things along, you have …
Read Article →In-depth guides, insights, and best practices for modern software engineering
The company you work for has just been awarded a contract to build a payment gateway. In order to help move things along, you have …
Read Article →Write a function that always returns 5
Sounds easy right? Just bear in mind that you can’t use any of the following characters: …
Read Article →Implement a function named generateRange(min, max, step), which takes three arguments and generates a range of integers from min to max, …
Read Article →“Blue/Green Deployments” is a software deployment methodology. A terminology to suggest two mostly equal …
Read Article →Complete the function that takes a non-negative integer n as input, and returns a list of all the powers of 2 with the exponent ranging …
Create a function that takes in an id and returns the planet name.
Option 1:
def get_planet_name(id): …
Read Article →
If you want to create a directory in Python, but only if it doesn’t exist, you have the following option.
from …
Read Article →
Complete the square sum function so that it squares each number passed into it and then sums the results together.
For example, for [1, …
We want an array, but not just any old array, an array with contents!
Write a function that produces an array with the numbers `` to N-1 …
This error often looks something like:
.zshrc: /usr/local/bin/aws: bad interpreter:
/usr/local/opt/python/bin/python3.6: no such file or directory …
Read Article →
The below Python code will create a connection to a MSSQLServer instance, and retrieve data from it back into a variable called tblResults.
# use …
Read Article →
Numbers ending with zeros are boring.
They might be fun in your world, but not here.
Get rid of them. Only the ending ones.
1450 -> …
Read Article →