solve the following recurrence relations.
a) T(n)=T(n-1)+1 , for n≥ 2 and T(1)=1.
b) "a_{n+1}-2a_n=2n," for n≥1 and T(1)=2.
The coordinates of different persons are given in the following dictionary.
position = ('A': (2, 5), 'B': (1, 7), 'C': (9, 5), 'D': (2, 6))
You will take 2 inputs for person X's location where the first
input specifies person X's current location in the x-axis and the second input specifies person X's current location in the y-axis.
Your work is to find the person closest to person X by
calculating the
distance between person X and every other person in the dictionary.
Hint: The distance between two coordinates is given by the
formula (You
need to import math):
math.sqrt((x2-x1)**2 + (y2-y1)**2)
Sample Input 1:
Enter person X's x coordinate: 3
Enter person X's y coordinate: 6
Sample Output 1:
D
Write a Python program that takes a string as an input where multiple numbers are separated by hashes(#). Your first task is to create a list of numbers and print it.
Your second task is to create a dictionary that will have the index of the
list as key, and for the even indices, multiplication from start to that index as value, while for the odd indices, summation from start to that
index as value. Finally, print the dictionary.
Sample Input 1:
1#2#3#4
Sample Output 1:
[1, 2, 3, 4]
(0:1, 1:3, 2:6, 3:10}
Sample Input 2:
5#6#7
Sample Output 2:
[5, 6, 7]
{0: 5, 1:11, 2: 210}
Write a Python program that reads a number and finds the sum of the series
of 1 + 33 + 111 + 3333 +....+N terms. Then it puts the reverse digit of the sum to a list and prints it. [Cannot use built-in reverse() or reversed()]
Sample Input 1:
5
Sample Output 1:
Sum of series: 14589 Reverse sum of series in list: [9, 8, 5, 4, 1]
4. What mass of CuI is present in a 1.2 L saturated solution at 25°C? Ksp = 1.3 x10-12 (5 marks)
5. Will a precipitate form when 125 mL of 4.0 x 10-2 M of CaCl2 is added to 175 mL of 2.9 x 10-2 M of NaOH? Ksp of Ca(OH)2 = 4.8 x 10-6. Show the dissociation equation for the possible precipitate and all formulas. (10 marks)
2. At a certain temperature a saturated solution of BaF2 has a concentration of 4.59 x 10-2 M. What is the Ksp for BaF2 at this temperature? (3 marks)
3. What is the concentration of the ions present in a saturated Cd(OH)2 solution? Ksp = 5.3 x 10-15. (4 marks)
Reflect on the concept of exponential and logarithm functions. What concepts (only the names) did you need to accommodate these new concepts in your mind? What are the simplest exponential and logarithmic functions with base b ≠ 1 you can imagine? In your day to day, is there any occurring fact that can be interpreted as exponential or logarithmic functions? What strategy are you using to get the graph of exponential or logarithmic functions?
Kbr can dissolve in CCl4?
How many grams are in 5 dm^3 of NH3
Two islands A and B are 2.0km apart. How far is a third island C from A and from B is angle ACB=90 degrees