Tag: Programming Language (Software Genre)

Collatz Conjecture Meet of 2 Numbers in python

def first_collatz(n, visited): counter = 0 while n > 1: counter += 1 n = 3 * n + 1 if n & 1 else n >> 1 if n not in visited: visited[n] = counter def secondd_collatz(n, other): counter = 0 if n not in other: while n > 1: counter += 1 n … Continue reading Collatz Conjecture Meet of 2 Numbers in python

Advertisements

Simple budget program in python

I've decided to start working on a budget application for the purposes of enhancing my Python skills. In its current form this program takes given expenses and income and tells the user whether they have a surplus, a deficit, or if they are breaking even. Example: import os import sys class Application(): def __init__(self): self.income … Continue reading Simple budget program in python

Asynchronous programming in Scala with Future

What is Future? A future object is an object whose value will be removed at some point in the future. This value is usually the result of a calculation process. This calculation returns the result value, we say that the Future object has completed that value, and vice versa. If an Exception is returned, the … Continue reading Asynchronous programming in Scala with Future