#What will the following programs print one mark for each correct answer ##Q5 1mark # tuple having integers my_tuple = (1, 2, 3) print(my_tuple) Answer: (1, 2, 3) ##Q6 1mark # tuple with mixed datatypes my_tuple = (1, "Hello", 3.4) print(my_tuple) ##Q7 1mark # nested tuple my_tuple = ("mouse", [8, 4, 6], (1, 2, 3)) print(my_tuple) ##Q8 4marks # tuple can be created without parentheses my_tuple = 3, 4.6, "dog" print(my_tuple) # tuple unpacking is also possible a, b, c = my_tuple print(a) print(b) print(c) ##Q9 2marks # Nested List n_list = ["Happy", [2,0,1,5]] # Nested indexing print(n_list[0][1]) print(n_list[1][3]) ##Q10 2marks my_list = ['p','r','o','b','e'] print(my_list[-1]) print(my_list[-5]
`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
6)
(1, 'Hello', 3.4)
7)
('mouse', [8, 4, 6], (1, 2, 3))
8)
(3, 4.6, 'dog')
3
4.6
dog
9)
a
5
10)
e
p
Kindly revert for any queries
Thanks.
#What will the following programs print one mark for each correct answer ##Q5 1mark # tuple...
Q1: Which of the following is an input peripheral device? Speakers Printer Mouse Display monitor Q2: Which type of input peripheral is most prevalent in a Point of Sale system? External USB storage Card reader Thermal receipt printer Projector Q3: Which type of cable can transmit audio and video? VGA DisplayPort HDMI 3.5mm Audio Cable Q4 Why do twisted pair copper cables use wire pairs twisted around each other? To increase the thickness of the cable To reduce the...
Mark your answers by bolding and/or underlining your preferred options. There is only one correct answer per question. 55 questions, 1 point each. Q1: Which of the following is TRUE: Q2: The cytoplasm of living skin cells A) The papillary layer of the dermis is is composed of: deep to the reticular layer A) Cytosol and organelles B) The epithelium of the integument B) A subcutaneous layer and brown is deep to the dermis fat cells C) Adipocytes are found...
please Answer the following regular expressions questions(also do number 9) Q4 Choose the pattern that finds all filenames in which the first letters of the filename are astA, followed by a digit, followed by the file extension .txt. 1) astA[[:digit:]]\.txt 2) astA[[0-9]].txt 3) astA.\.txt 4) astA[[:digit:]].txt Q5 What's the difference between [0-z]+ and \w+ ? 1) The first one accepts 0 and z and the other doesn't. 2) The first one doesn't allow for uppercase letters. 3) The first one...
Please add explanation if you can Q1) What is the formal charge on each atom in dichloromethane, CH2Cl2? a. C atom = 0, each H atom = 0, and each Cl atom = 0 b. C atom = –2, each H atom = +1, and two Cl atoms = 0 c. C atom = +4, each H = –1, and each Cl atom = –1 d. C atom = +4, each H = +1, and each Cl atom = –1...
Q1. Write a recursive function in C++ void printNumberedChars(string str, int i=0) { ... } which prints each character of the given string str on a new line, with each line numbered 1, 2, 3, …. For example calling the function with printNumberedChars("hello"); should output the following: 1. h 2. e 3. l 4. l 5. o Q2. Write a recursive function in C++ int sumArray(const int* arr, unsigned int size) { ... } which takes an array of integers,...