Skip to main content

Posts

Showing posts with the label math

Real-Time Currency Converter (PCTS)

  Currency Converter C urrency Conversion is a basic real time need in today's life, whether it's exchange of currency while tourism or stock market, import and export duties, determine the selling and buying profits of different products around the world. So it can be referred to as one of the key elements in globalization. Use of a Module: Forex Module Install the module into the computer first by running the following command in the Command Prompt: pip install forex-python Copy the following code: from forex_python.converter import CurrencyRates curr = CurrencyRates() print(""" Country with currency codes and currency names Albania ALL lek Algeria DZD dinar Angola AOA kwanza Argentina ARS peso Armenia AMD dram Australia AUD dollar Austria EUR euro Azerbaijan AZN manat Bahrain BHD dinar Barbados BBD dollar Belarus BYN rouble Belgium EUR euro Bermuda BMD dollar Bolivia BOB boliviano Bosnia and Herzegovina BAM konvertibilna marka Botswana BWP pula Br...

Diving into Modules - Math Module

 >Math Module - Overall explanation Source:  freepik Introduction Other than Python built-in functions, there are numerous functions which can be found in some packages which need to be imported when needed which are called modules .  Such a module in python is the math module. Python's standard library provides a module viz. math for math functions that work with all number types except complex numbers. The Math module in Python is enriched with plenty of functions. Note!: To use the math module one must import it first into the Python compiler one has been working with. The syntax to do so is given below: import math FUNCTIONS IN MATH MODULE ceil(): This function returns the closest just above integer when a value has been passed. Syntax: x = math.ceil(2.4) print(x) floor():  This function returns the closest just below integer when a value has been passed. Syntax: y = math.floor(2.4) print(y) fabs():  This function returns the absolute number in flo...