Write a function, reverseDigitthat takes an integer as a parameter and returns the number with itsdigitsreversed.
Forexample,thevalueofreverseDigit(12345)is54321;thevalueofreverseDigit(5600)is65;thevalueof reverseDigit(7008) is8007;andthe valueof reverseDigit(-532) is-235.
WriteaprograminC++thatcreates thefollowingfunctions:
Function
Description
Receivesstringobjectandreturnsnumberofvowelsinit.
Receivesstringobjectandreturnsnumberofconsonants
init.
Receivesstringobjectandreturnsnumberofuppercase
lettersinit.
Receivesstringobjectandreturnsnumberoflowercase
lettersinit.
Useallofthefunctions inmainfunction.
if op==1 or op==2 or op==3 or op==4 or op==5 or op==6 :
a = int(input("Enter first number"))
b = int(input("Enter second number"))
dict1 = {1:a+b, 2:a-b, 3:a*b, 4:a/b, 5:a%b, 6:a**b}
print ("The result is : " + str(dict1.get(op)))
elif op==7 or op==8 or op==9 or op==10 or op==11 or op==12 :
a = float(input("Enter the number"))
dict2 = {7:math.fabs(a), 8:math.factorial(a), 9:math.log(a), 10:math.ceil(a), 11:math.floor(a), 12:math.sqrt(a)}
print ("The result is : " + str(dict2.get(op)))
elif op==13 :
print ("Functions Menu")
print ("a. sin")
print ("b. cos")
print ("c. tan")
fun = input("Choose the function :")
a = float(input("Enter the angle in radians :"))
dict3 = {'a':math.sin(a), 'b':math.cos(a), 'c':math.tan(a)}
print ("The result is : " + str(dict3.get(fun)))
Question:
1. In this program, you will create a class and OOP.
#Scientific Calculator
import math
print ("MAIN MENU")
print ("1. Addition")
print ("2. Subtraction")
print ("3. Multiplication")
print ("4. Division")
print ("5. Modulus")
print ("6. Exponentiation")
print ("7. Absolute value")
print ("8. Factorial")
print ("9. Logarithm")
print ("10. Round Up")
print ("11. Round Down")
print ("12. Square Root")
print ("13. Trigonometric Functions")
print ("14. Inverse Trigonometric Functions")
print ("15. Hyperbolic Functions")
print ("16. Inverse Hyperbolic Functions")
print("")
print ("NOTE: If you're performing operations in the 1-6 range, don't make the second number zero." )
print()
op = int(input("Enter the operation you want to perform : "))
Question:
1. In this program you will create a class and OOP
Department Number of Users
Customer Care 10
Sales and Marketing 20
Finance 25
Legal 5
HR 10
Developers 55
Network Team 5
Server Room
Servers +ISP connections
· High level of redundancy is expected in network design to eliminate single point of failures and traffic bottle necks.
· Sales and Marketing Team need to access Network resources using WIFI connectivity.
· Proper methods for networking monitoring and troubleshooting need to be established.
· All possible network security mechanisms should be implemented.
· 1.Prepare a written network design plan to meet the above mentioned user requirements including a blueprint drawn using a modeling tool. (Ex: Microsoft Visio, Edraw Max).
2.Support your answer by providing the VLAN and IP subnetting scheme for the above scenario and the list of devices, network components and software used to design the network for above scenario and while justifying your selections.
Multiple devices are connected via single line according to priority, how to access this mechanism to initiate Input-Output.
Explain any two methods of accessing 1/0 devices and transferring data from them
Give 5 addressing modes that will use the address given inside the instruction to access operands directly in any manner, this might include addressing modes that do not use addresses but direct operands. Give proper examples.
The computer organization that uses general registers to process instructions is used, give how a program X=(A-B)^ * (V+C) can be executed in this. Elaborate properly with diagrams to show how this will be handled by the system, how this system is organized.
Java is known to be an object oriented program. Objects are also known to exist in real life. You have been invited as a computer science student to distinguish between real life objects and object found in object oriented program OOP (5 marks) b. Write an OOP to compare the risk factor that will lead to high payment of life insurance premium. The variables to consider are: age, weight, and height