0% found this document useful (0 votes)
4 views

HTML Basics

The document contains multiple-choice questions (MCQs) covering HTML, CSS, JavaScript, and Python, along with their answers. Each section includes fundamental concepts and syntax relevant to each programming language. Additionally, there is a section on digital electronics with questions related to logic gates and binary operations.

Uploaded by

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

HTML Basics

The document contains multiple-choice questions (MCQs) covering HTML, CSS, JavaScript, and Python, along with their answers. Each section includes fundamental concepts and syntax relevant to each programming language. Additionally, there is a section on digital electronics with questions related to logic gates and binary operations.

Uploaded by

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

HTML Basics (7 Questions)

1. What does HTML stand for?


a) Hyper Text Marking Language
b) High Text Markup Language
c) Hyper Text Markup Language
d) Hyperlink and Text Markup Language
Answer: c) Hyper Text Markup Language

2. Which tag is used for the largest heading in HTML?


a) <heading>
b) <h6>
c) <h1>
d) <head>
Answer: c) <h1>

3. What is the correct HTML tag for inserting a line break?


a) <br>
b) <break>
c) <lb>
d) <hr>
Answer: a) <br>

4. Which attribute is used to provide a tooltip in HTML?


a) alt
b) tooltip
c) title
d) hint
Answer: c) title

5. Which tag is used to link an external CSS file?


a) <style>
b) <css>
c) <script>
d) <link>
Answer: d) <link>

6. What is the correct tag to make text italic?


a) <italic>
b) <i>
c) <emphasis>
d) <it>
Answer: b) <i>

7. Which element is used to create an unordered list?


a) <ol>
b) <ul>
c) <li>
d) <list>
Answer: b) <ul>
CSS (7 Questions)

8. What does CSS stand for?


a) Computer Style Sheets
b) Creative Style Sheets
c) Cascading Style Sheets
d) Colorful Style Sheets
Answer: c) Cascading Style Sheets

9. Which property is used to change text color in CSS?


a) font-color
b) text-color
c) color
d) text
Answer: c) color

10. Which symbol is used for class selectors in CSS?


a) #
b) .
c) @
d) *
Answer: b) .

11. How do you center text in CSS?


a) align: center;
b) text-align: center;
c) text: center;
d) center-text: true;
Answer: b) text-align: center;

12. Which CSS property controls the size of text?


a) text-size
b) font-style
c) font-size
d) text-style
Answer: c) font-size

13. What is the default position value of an HTML element in CSS?


a) relative
b) absolute
c) fixed
d) static
Answer: d) static

14. Which of the following is a correct way to apply CSS to HTML?


a) Inline
b) Internal
c) External
d) All of the above
Answer: d) All of the above
JavaScript (6 Questions)

15. Which keyword is used to declare a variable in JavaScript?


a) var
b) let
c) const
d) All of the above
Answer: d) All of the above

16. What is the output of typeof "Hello"?


a) string
b) text
c) word
d) char
Answer: a) string

17. Which method is used to write content to the webpage in JavaScript?


a) console.log()
b) document.write()
c) window.alert()
d) print()
Answer: b) document.write()

18. How do you create a function in JavaScript?


a) function myFunction()
b) def myFunction()
c) func myFunction()
d) create myFunction()
Answer: a) function myFunction()

19. What is the correct syntax for referring to an external JavaScript file?
a) <script href="script.js">
b) <script ref="script.js">
c) <script src="script.js">
d) <js src="script.js">
Answer: c) <script src="script.js">

20. Which operator is used to assign a value in JavaScript?


a) ==
b) =
c) ===
d) :=
Answer: b) =
Python Tech Trivia – 20 MCQs

🔹 Basics (10 Questions)

1. Who developed Python?


a) Dennis Ritchie
b) Bjarne Stroustrup
c) Guido van Rossum
d) James Gosling
Answer: c) Guido van Rossum

2. What is the correct file extension for Python files?


a) .pyth
b) .pt
c) .py
d) .pyt
Answer: c) .py

3. Which keyword is used to define a function in Python?


a) function
b) define
c) def
d) func
Answer: c) def

4. What is the output of print(2 ** 3)?


a) 6
b) 8
c) 9
d) 5
Answer: b) 8

5. Which of the following is a correct variable name in Python?


a) 2name
b) name_2
c) @name
d) name-2
Answer: b) name_2

6. What does the input() function do?


a) Displays output
b) Terminates the program
c) Takes user input
d) Reads a file
Answer: c) Takes user input

7. What is the data type of: x = "Hello"?


a) int
b) char
c) str
d) bool
Answer: c) str

8. Which keyword is used for loops in Python?


a) repeat
b) while
c) foreach
d) loop
Answer: b) while

9. How do you comment a single line in Python?


a) <!-- comment -->
b) // comment
c) # comment
d) /* comment */
Answer: c) # comment

10. Which of these is not a core data type in Python?


a) list
b) tuple
c) dictionary
d) character
Answer: d) character

🔸 Intermediate (10 Questions)

11. What is the output of: print(type([]))?


a) <class 'array'>
b) <class 'list'>
c) <class 'dict'>
d) <class 'tuple'>
Answer: b) <class 'list'>

12. Which keyword is used to handle exceptions in Python?


a) error
b) catch
c) try
d) debug
Answer: c) try

13. What is the result of: bool(0)?


a) True
b) False
c) 0
d) None
Answer: b) False

14. Which of these methods is used to add an item to a list?


a) append()
b) add()
c) insert()
d) push()
Answer: a) append()

15. What will be the output of: print("hello"[1])?


a) e
b) h
c) l
d) o
Answer: a) e

16. Which of the following can be used to define a block of code in Python?
a) Curly braces {}
b) Parentheses ()
c) Indentation
d) Angle brackets <>
Answer: c) Indentation

17. How do you create a dictionary in Python?


a) {}
b) []
c) ()
d) <>
Answer: a) {}

18. What is the output of: len("Python")?


a) 5
b) 6
c) 7
d) 0
Answer: b) 6

19. Which operator is used for floor division?


a) /
b) %
c) //
d) **
Answer: c) //

20. What is the correct way to define a class in Python?


a) define ClassName:
b) class ClassName:
c) Class ClassName
d) new ClassName:
Answer: b) class ClassName:
Python Tech Trivia – Short MCQs with Answers

1. Who developed Python?


➤ Guido van Rossum

2. File extension for Python files?


➤ .py

3. Keyword to define a function?


➤ def

4. Output of 2 ** 3?
➤8

5. Valid variable name?


➤ name_2

6. Purpose of input() function?


➤ Takes user input

7. Data type of "Hello"?


➤ str

8. Loop keyword in Python?


➤ while

9. Single-line comment symbol?


➤#

10. Which is not a core data type?


➤ character

11. Output of type([])?


➤ <class 'list'>

12. Keyword to handle exceptions?


➤ try

13. Result of bool(0)?


➤ False

14. Method to add item to a list?


➤ append()

15. Output of "hello"[1]?


➤e

16. What defines code blocks in Python?


➤ Indentation

17. Symbol for a dictionary?


➤ {}

18. Output of len("Python")?


➤6
19. Operator for floor division?
➤ //

20. Keyword to define a class?


➤ class

HTML, CSS, JavaScript – Short MCQs with Answers

🔶 HTML (7 Questions)

1. HTML stands for?


➤ Hyper Text Markup Language

2. Tag for largest heading?


➤ <h1>

3. Tag for line break?


➤ <br>

4. Attribute for tooltip?


➤ title

5. Tag to link external CSS?


➤ <link>

6. Tag for italic text?


➤ <i>

7. Element for unordered list?


➤ <ul>

🔷 CSS (7 Questions)

8. CSS stands for?


➤ Cascading Style Sheets

9. Property to change text color?


➤ color

10. Symbol for class selector?


➤.

11. Property to center text?


➤ text-align

12. Property for text size?


➤ font-size

13. Default position value?


➤ static

14. Ways to apply CSS?


➤ All of the above
(Inline, Internal, External)
🟢 JavaScript (6 Questions)

15. Keyword to declare variable?


➤ var, let, const (All valid)

16. Output of typeof "Hello"?


➤ string

17. Method to write on webpage?


➤ document.write()

18. Syntax to define a function?


➤ function myFunction()

19. Tag to link external JS file?


➤ <script src="script.js">

20. Assignment operator in JS?


➤=

Digital Electronics – Short MCQs with Answers

1. Binary equivalent of decimal 10?


➤ 1010

2. Logic gate with output HIGH only when all inputs are HIGH?
➤ AND gate

3. Which gate gives output HIGH when any input is HIGH?


➤ OR gate

4. Full form of IC?


➤ Integrated Circuit

5. Basic building block of digital circuits?


➤ Logic gates

6. 1's complement of 1010?


➤ 0101

7. 2's complement of 1001?


➤ 0111

8. Flip-flop used for storing 1-bit data?


➤ SR flip-flop

9. Decimal equivalent of binary 1101?


➤ 13

10. Which number system uses digits 0-9 and A-F?


➤ Hexadecimal

11. NAND gate is a combination of?


➤ AND + NOT
12. Which gate acts as universal gate?
➤ NAND

13. Which circuit adds two binary numbers?


➤ Adder

14. Output of XOR gate when both inputs are same?


➤0

15. What does a multiplexer do?


➤ Selects one input from many

16. Clock signal is required in?


➤ Sequential circuits

17. Half adder adds?


➤ Two bits

18. Which flip-flop toggles its output?


➤ T flip-flop

19. Memory used to store a single binary digit?


➤ Flip-flop

20. A logic 1 represents?


➤ High voltage level

You might also like