from Algorithm_Programs.Util import Util number = int(input("Enter Number: ")) square_root = Util.square_root(number) print("Square Root of", number, "is", round(square_root, 2))
from Algorithm_Programs.Util import Util start = int(input("Enter starting Range: ")) end = int(input("Enter ending Range: ")) print("prime number between", start, "to", end, "are:", end=" ") Util.prime(start, end)
from Algorithm_Programs.Util import Util start = input("Enter starting Range: ") end = input("Enter ending Range: ") print("Palindrome number between", start, "to", end, "are:", end=" ") print(Util.primeAndPalindrome(start, end))
from Algorithm_Programs.Util import Util num = int(input("Enter a number: ")) print("Binary digit of number", num, "is :", end=" ") Util.decimal_to_binary(num) print("\nAfter swap two nibbles, The Decimal Number is :", Util.nibble_Swap(num))
from Algorithm_Programs.Util import Util date = int(input("Enter the date: ")) month = int(input("Enter the month in the form of 1-12: ")) year = int(input("Enter the year: ")) days = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ] print("Day of the Week is :", days[Util.dayOfWeek(date, month, year)])
from Algorithm_Programs.Util import Util num = int(input("Enter a number: ")) print("Binary digits of number", num, "is :", end=" ") Util.decimal_to_binary(num)
from Algorithm_Programs.Util import Util p_amount = int(input("Enter the principal amount: ")) year = int(input("Enter how many year you take to repayment: ")) rate = int(input("Enter the rate of interest: ")) monthlyPayment = Util.monthlyPayment(p_amount, year, rate) print("monthly payments you would have to make over", year, "years is Rs:", round(monthlyPayment, 2))