Write a function that gets two parameters (arguments) from the user and if both of them are integers, it returns the result of the first parameter to the power second parameter (X**Y). If both parameters are strings, the function concatenates them (‘X’+’Y’) and returns the result, otherwise, it returns an error message and gets two new inputs.
Category: Uncategorized
Consider the previous example but assume that the number of…
Consider the previous example but assume that the number of available coins is also known and limited. For example, there are only 20 Dimes left. The number of available coins must also be passed into the function as a parameter. Previous: Suppose a cashier asks you to write a function that calculates the minimum number of coins he/she needs for reimbursing the remaining balance of the customer. For example, the cashier needs to pay back $27.65 to the customer, and he/she can only use quarter, dime, and penny. What combination of these coins should he/she use to minimize the number of coins?
Write a function that gets the user’s username and password….
Write a function that gets the user’s username and password. Then it checks if the username exists in a pre-defined dictionary of the registered users. If the username is found, then it checks for the corresponding password. If the password matches, then it returns (True) value. If the password does not match, it returns “False”. If the username does not exist in the dictionary, it asks for a new username and password and informs them that “user not found”.
When four identical resistors are connected to an ideal batt…
When four identical resistors are connected to an ideal battery of voltage V = 10 V as shown in the figure, the current I{“version”:”1.1″,”math”:”I”} is equal to 0.20 A. What is the value of the resistance R{“version”:”1.1″,”math”:”R”} of the resistors?
A battery-powered global positioning system (GPS) receiver o…
A battery-powered global positioning system (GPS) receiver operates at a voltage of 9.00 V and a current of 0.130 A. How much charge passes through the receiver during 30.0 minutes?
A uniform magnetic field of magnitude 0.80 T in the negative…
A uniform magnetic field of magnitude 0.80 T in the negative z-direction is present in a region of space, as shown in the figure. A uniform electric field is also present and is set at 7.6 x 104 V/m in the +y-direction. An electron is projected with an initial velocity of 9.2 x 104 m/s in the +x-direction. The y-component of the net initial force on the electron is closest to which of the following?
Find the EXACT value of Cos(112.50) [Make certain the steps…
Find the EXACT value of Cos(112.50) [Make certain the steps are shown on the work you upload in the “comments” for the test]
Find the exact value of Cot(A) if Sin(A) = and the angle “A…
Find the exact value of Cot(A) if Sin(A) = and the angle “A” is in Quadrant 2
Find the “x” component for the Resultant vector of this syst…
Find the “x” component for the Resultant vector of this system if A = [a]o, B = [b]o, C=[c]o and the vectors have the following Magnitudes: [d] [f] [g] (write your answer as a decimal value rounded to 2 decimal places)
Draw the triangle that would be used to solve the following…
Draw the triangle that would be used to solve the following problem: Sin(Sec-1(x))