0% found this document useful (0 votes)
24 views3 pages

JavaScript and Python Code Answers

The document provides a list of answers to various programming and design-related questions, covering topics such as Python, JavaScript, HTML, CSS, and design thinking. Key points include the use of keywords in function definitions, error handling, data structures, and the importance of user involvement in app development. Additionally, it addresses concepts related to mobile apps, GitHub, and the Software Development Life Cycle.

Uploaded by

zenginakho03
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)
24 views3 pages

JavaScript and Python Code Answers

The document provides a list of answers to various programming and design-related questions, covering topics such as Python, JavaScript, HTML, CSS, and design thinking. Key points include the use of keywords in function definitions, error handling, data structures, and the importance of user involvement in app development. Additionally, it addresses concepts related to mobile apps, GitHub, and the Software Development Life Cycle.

Uploaded by

zenginakho03
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

Here are the answers to all the questions from the provided images, presented in a single list:

1.​ A tuple can be changed after it's created.


○​ Answer: False
2.​ Which keyword is used to define a function in Python?
○​ Answer: def
3.​ What is the purpose of a try / except block in Python?
○​ Answer: To handle errors and prevent the program from crashing
4.​ Which of the following is a valid way to declare a variable in JavaScript?
○​ Answer: var x = 5;
5.​ JavaScript can change HTML content dynamically.
○​ Answer: True
6.​ What data structure stores key-value pairs?
○​ Answer: Dictionary
7.​ In Python, 5 + "5" results in 10.
○​ Answer: False
8.​ What is the output of 5 / 2?
○​ Answer: 2.5
9.​ In the shopping cart project, what would a list typically store?
○​ Answer: Items in the cart
10.​What will be the output of the following line of code? print("Hello" + "World")
○​ Answer: HelloWorld
11.​You can have multiple except blocks for different error types.
○​ Answer: True
12.​In the shopping cart project, which function is used to display information to the
user?
○​ Answer: print()
13.​The shopping cart project runs in a web browser.
○​ Answer: False
14.​Which of the following will create a list with the numbers 1 through 5?
○​ Answer: [1, 2, 3, 4, 5]
15.​What is the result of 10 / 2 in JavaScript?
○​ Answer: 5
16.​JavaScript code runs in the browser's server.
○​ Answer: False
17.​How do you call a function named addNumbers?
○​ Answer: addNumbers();
18.​Which of the following is a valid variable name in Python?
○​ Answer: total_price
19.​How do you import a module named math?
○​ Answer: import math
20.​Fear of idea theft is valid and justifies not talking to users.
○​ Answer: False
21.​What is the core focus of design thinking?
○​ Answer: Solving problems through a human-centered, empathetic, and creative
approach
22.​What is the main purpose of the USERS framework in user-centric app
development?
○​ Answer: To ensure users are involved from the beginning to build relevant apps
23.​Which function from the math module returns the square root of a number?
○​ Answer: [Link]()
24.​What is the main goal of the Empathize stage in design thinking?
○​ Answer: To deeply understand user needs, emotions, and challenges
25.​To display the result of a calculation on the page, you would typically update:
○​ Answer: An element's innerHTML
26.​What function would you use to get the value from an input field?
○​ Answer: ("element").value
27.​Which of the following best describes the overall mindset encouraged by design
thinking?
○​ Answer: Empathetic, experimental, and iterative
28.​You can apply more than one CSS class to an element.
○​ Answer: True
29.​JavaScript is case-sensitive.
○​ Answer: True
30.​A good business plan should include the problem you're solving, your solution,
pricing, and target audience.
○​ Answer: True
31.​In content marketing, what is the main goal of giving away free, valuable content?
○​ Answer: To build brand recognition
32.​Where can you include CSS in your HTML file?
○​ Answer: Inline, internal, or external
33.​Which attribute allows you to give an element a unique identifier in HTML?
○​ Answer: id
34.​What tag would you use to insert an image?
○​ Answer: img src=...
35.​Mobile web apps are easier to update than native apps.
○​ Answer: True
36.​Which piece of code can be used to set the background color of the body to light
blue?
○​ Answer: body { background-color: lightblue; }
37.​A user interface (UI) refers to the internal logic of an app and how the database
interacts with the front end.
○​ Answer: False
38.​Which tag is used to create a hyperlink in HTML?
○​ Answer: a
39.​What is GitHub primarily used for?
○​ Answer: Hosting and managing coding projects with version control
40.​Why is it important to test your app in different screen sizes?
○​ Answer: To ensure it works and looks good across devices
41.​What is the Software Development Life Cycle (SDLC)?
○​ Answer: A step-by-step to design, build, test, and improve software
42.​What is a key limitation of native apps?
○​ Answer: They lack portability and require more time and cost to develop
43.​Which tool do developers commonly use to inspect and test their HTML and CSS
code in the browser?
○​ Answer: Browser Developer Tools
44.​Which app type offers a balance of device integration and lower development
costs?
○​ Answer: Hybrid apps
45.​What is a repository (repo) in GitHub?
○​ Answer: A project folder containing code and history

You might also like