[go: up one dir, main page]

0% found this document useful (0 votes)
9 views4 pages

Python, Android, Full Stack With Answer Key 04-09-2025

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

Python, Android, Full Stack With Answer Key 04-09-2025

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Weekly Technical Skill Test

(Python, Android & Full-Stcak)


[B.Tech, BCA, MCA]
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
SHOBHIT UNIVERSITY GANGOH
Time: 1 Hour
……………………………………………………………………………………………………………………………………
Student Name Roll NO
Course Name Year/Semester

Instructions:
1. Attempt all questions
2. Multiple Tick will not be considered
3. The use of Mobile phone, smart watch, and any electronic gadget is strictly prohibited
4. Final decision will be made by the committee
……………………………………………………………………………………………………………………………………
1. What is the output of the following Python code? 2. What will be the output of the following Python code?
def mystery_function(x): x=5
return x if x > 0 else mystery_function(-x) y=2
result = mystery_function(-5) result = x // y
print(result) a) 2.5
a) -5 b) 2
b) 5 c) 3
c) 0 d) 2.0
d) This code will result in an infinite loop.
3. What is the value of result after executing the following Python 4. What is the correct way to check if a key is present in a
code? dictionary?
my_list = [1, 2, 3, 4, 5] my_dict = {'name': 'John', 'age': 25}
result = my_list[::2] key_to_check = 'age'
a) [1, 3, 5] a) if key_to_check in my_dict.keys():
b) [2, 4] b) if key_to_check in my_dict:
c) [5, 3, 1] c) if my_dict.contains(key_to_check):
d) [1, 2, 3, 4, 5] d) if my_dict.exists(key_to_check):
5. What will be the output of the following Python code? 6. What will be the output of the following Python code?
x = [1, 2, 3] def outer_function(x):
y=x def inner_function():
y[0] = 10 return x + 1
print(x) return inner_function
a) [10, 2, 3] closure = outer_function(5)
b) [1, 2, 3] result = closure()
c) [10, 2, 3] (but with a warning) print(result)
d) [1, 2, 3] (but with a warning) a) 5
b) 6
c) 11
d) This code will result in an error.
7. What will be the output of the following Python code? 8. What is the output of the following Python code?
def power(x, n=2): my_list = [1, 2, 3, 4]
return x ** n result = [x if x % 2 == 0 else -x for x in my_list]
result1 = power(2) print(result)
result2 = power(2, 3) a) [1, -2, 3, -4]
print(result1 + result2) b) [-1, 2, -3, 4]
a) 10 c) [1, -2, -3, -4]
b) 16 d) [1, -2, 3, 4]
c) 12
d) 64
9. What is the output of the following Python code? 10. What will be the output of the following Python code?
def modify_list(my_list): def func(x, y, z):
my_list[0] = 5 return x + y * z
original_list = [1, 2, 3] result = func(1, 2, 3)
modify_list(original_list.copy()) print(result)
print(original_list) a) 9
a) [1, 2, 3] b) 7
b) [5, 2, 3] c) 8
c) This code will result in an error. d) 1
d) [1, 2, 3, 5]
11. What is the output of the following Python code? 12. What is the output of the following Python code?
x=5 a = [1, 2, 3]
y = x if x > 10 else x/2 b = a[:]
print(y) a[0] = 10
a) 5 print(b)
b) 2.5 a) [1, 2, 3]
c) 10 b) [10, 2, 3]
d) This code will result in an error. c) This code will result in an error.
d) [10, 2, 3] (but with a warning)
13. What will be the output of the following Python code? 14. What will be the output of the following Python code?
x = 0.1 string1 = "Python"
y = 0.2 string2 = "Python"
result = x + y result = string1 is string2
print(result) print(result)
a) 0.3 a) True
b) 0.30000000000000004 b) False
c) 0.2 c) This code will result in an error.
d) This code will result in an error. d) Undefined
15. What will be the output of the following Python code? 16. What will be the output of the following Python code?
def func(x): class MyClass:
x += 1 x = 10
return x obj = MyClass()
x=5 obj.x += 5
result = func(x) result = obj.x
print(x, result) print(result)
a) 5 6 a) 10
b) 6 6 b) 5
c) 5 5 c) 15
d) This code will result in an error. d) This code will result in an error.
17. What is the output of the following Python code? 18. What is the output of the following Python code?
x=2 a = [1, 2, 3]
y=3 b=a
result = x * y ** x a = a + [4, 5]
print(result) print(b)
a) 12 a) [1, 2, 3]
b) 18 b) [1, 2, 3, 4, 5]
c) 24 c) This code will result in an error.
d) 8 d) [1, 2, 3, 4, 5] (but with a warning)
19. What is the output of the following Python code? 20. What will be the output of the following Python code?
x = [1, 2, 3] x = "Python"
y=x y = x.lower()
x += [4, 5] z = x.upper()
print(y) result = y + z
A) [1, 2, 3] print(result)
B) [1, 2, 3, 4, 5] A) "PythonPYTHON"
C) [1, 2, 3, 4, 5] (but with a warning) B) "pythonPYTHON"
D) This code will result in an error. C) "pythonPYTHONpython"
D) This code will result in an error.
21. Which of the following is an important component of an 22. In which of the following is the Android application
Android app? Framework provided?
a) Broadcast Receiver A) Zip file
b) All of the mentioned B) Jar file
c) Activity C) Object file
d) Service D) EXE file
23. What is an APK in Android? 24. In android, mini activities are also known as.
a) Application Package A) Adapter
b) Apple Package B) Activity
c) App Programming Kit C) Fragments
d) Android Package D) None
25. What is the purpose of the Android Manifest file 26. Which tool helps debug and analyze an Android
(AndroidManifest.xml)? application’s performance?
a) Stores user preferences a) Visual Studio
b) Contains the app’s source code b) Notepad
c) Defines the app’s structure and permissions c) Android Debug Bridge (ADB)
d) Stores the app’s resources d) IntelliJ IDEA
27. Which method is used to start an activity in Android? 28. What file format is primarily used to install Android
a) createActivity() applications?
b) launchActivity() a) .exe
c) openActivity() b) .zip
d) startActivity() c) .apk
d) .docx
29. What is the Android SDK? 30. What is an Android Service?
a) A collection of Android app guidelines a) A component for managing app permissions
b) A software development kit for creating Android apps b) A UI element for displaying data
c) A web-based app store c) A debugging tool
d) A device for running Android apps d) A component for performing background tasks
31. Which Android component is responsible for displaying a UI? 32. What is `View Binding` in Android development?
a) Service a) A system service manager
b) Broadcast Receiver b) Link UI components directly to code
c) Content Provider c) A layout animator
d) Activity d) A way to connect database tables
33. Which method is used to display a Toast message in Android? 34. What is the Android Emulator used for?
a) makeText() a) Running apps on real devices
b) showToast() b) Emulating Android devices on a computer for testing purposes
c) displayToast() c) Generating app code
d) createToast() d) Creating Android apps
35. In Android, what is the main purpose of “Intent Filters”? 36. Which Android permission is required for accessing the
a) To store app data internet?
b) To define the layout of the app a) ACCESS_WIFI_STATE
c) To specify which Intents an app component can handle b) INTERNET
d) To display app permissions c) ACCESS_NETWORK_STATE
d) INTERNET_STATE
37. Which method is used to add a Fragment to an Activity at 38. How does Kotlin handle collections more effectively than
runtime? Java?
a) commit() a) By improving iteration speed
b) attachFragment() b) By supporting multi-threaded operations
c) addFragment() c) By providing immutable and mutable types
d) beginTransaction().add() d) By adding better sorting algorithms
39. Which API is used for integrating Google Maps into an 40. Which keyword is used to declare an async function in JS?
Android app? A) async
a) Fused Location Provider API B) await
b) Maps SDK for Android C) function*
c) Geofencing API D) yield
d) LocationManager API
41. Which HTML tag is used to create a hyperlink? 42. Which property is used to change the background color in
A) <link> CSS?
B) <href> A) color
C) <a> B) bgcolor
D) <hyperlink> C) background-color
D) background
43. What will be the output? 44. What does this CSS code do?
function add(a = 2, b = 3) { css
return a + b; .container {
} display: flex;
console.log(add()); justify-content: center;
A) 2 align-items: center;
B) 3 }
C) 5 A) Aligns top-left
D) NaN B) Centers horizontally only
C) Centers both
D) Breaks layout
45. Which CSS unit is relative to the font-size of the element? 46. What is the output of this code?
A) px console.log(typeof null);
B) em A) “null”
C) % B) “undefined”
D) vh C) “object”
D) “number”
47. What does the following return? 48. Which layout is most commonly used to align views in a
let arr = [1, 2, 3]; single row or column in Android?
console.log(arr.includes(2)); a) RelativeLayout
A) 1 b) LinearLayout
B) true c) FrameLayout
d) ConstraintLayout
C) false
D) undefined
49. Which HTML tag correctly embeds a JavaScript file? 50. What is the output?
html console.log(0 == ‘0’);
<script src="app.js"></script> console.log(0 === ‘0’);
A) <js src=”app.js”> A) true, true
B) <script link=”app.js”> B) false, false
C) <script src=”app.js”> C) true, false
D) <script file=”app.js”> D) false, true
51. Which method converts a string to an integer in JS? 52. Which module is used to create a server in Node.js?
let result = parseInt("42px"); A) http
A) Number() B) url
B) toNumber() C) fs
C) parseInt() D) net
D) Integer()
53. Which platform is Express.js built on? 54. What does this Express route log?
A) React app.get('/user/:id', (req, res) => {
B) Angular console.log(req.params.id);});
C) Node.js A) Query string B) Route param C) Header D) Cookie
D) Vue.js
55. What does this middleware do? 56. What does this query return?
app.use(express.json()); db.users.find({ age: { $gt: 25 } });
A) Parses headers A) All users
B) Parses form data B) Users > 25
C) Parses JSON body C) Users < 25
D) Handles routing D) Error
57. Which method sends data using POST in Express? 58. Default display of div is:
A) res.send() A) inline
B) app.post() B) block
C) req.send() C) flex
D) app.send() D) none
59. What is the purpose of res.send() in Express? 60. Which function handles routing in Express?
A) Handles request A) router.use
B) Sends response B) app.get
C) Reads file C) useRouter
D) Makes query D) express.route

Q.No Ans Q.No Ans Q.No Ans Q.No Ans


1 B 16 C 31 D 46 C
2 B 17 B 32 B 47 B
3 A 18 A 33 A 48 B
4 B 19 B 34 B 49 C
5 A 20 B 35 C 50 C
6 B 21 B 36 B 51 C
7 C 22 B 37 D 52 A
8 B 23 D 38 C 53 C
9 A 24 C 39 B 54 B
10 B 25 C 40 A 55 C
11 B 26 C 41 C 56 B
12 A 27 D 42 C 57 B
13 B 28 C 43 C 58 B
14 A 29 B 44 C 59 B
15 A 30 D 45 B 60 B

You might also like