DATATYPES2024-25

DATATYPES2024-25

University

43 Qs

quiz-placeholder

Similar activities

QUIZ PBO 2

QUIZ PBO 2

University

40 Qs

10th Grade 10  - IT Programming - 2nd Cycle Exam

10th Grade 10 - IT Programming - 2nd Cycle Exam

10th Grade - University

40 Qs

C++ Basics

C++ Basics

University

40 Qs

Câu hỏi về xâu kí tự trong Python

Câu hỏi về xâu kí tự trong Python

10th Grade - University

44 Qs

CS Recape 2

CS Recape 2

11th Grade - University

39 Qs

first quiz ICT

first quiz ICT

University

48 Qs

Final Coverage_Quiz 1

Final Coverage_Quiz 1

University

42 Qs

CIA VIVA- Practical & Theory

CIA VIVA- Practical & Theory

University

40 Qs

DATATYPES2024-25

DATATYPES2024-25

Assessment

Quiz

Computers

University

Hard

Created by

Ruchi Talwar

FREE Resource

43 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in Python?

A reserved word

A data type

A location in memory to store data

A function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in Python?

var x

x = variable

declare x

x = 4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to comment a single line in Python?

// This is a comment

# This is a comment

/* This is a comment */

-- This is a comment

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

1variable

my_variable

global

variable-1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you swap the values of two variables in Python without using a third variable?

x = y; y = x

x, y = y, x

temp = x; x = y; y = temp

x + y; y = x; x = y

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data types is immutable in Python?

List

Tuple

Set

Dictionary

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? x = 10 y = 5 z = x + y print(z)

10

15

"10+5"

Error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?