Python Fundamentals SEC-AQ2

Python Fundamentals SEC-AQ2

University

15 Qs

quiz-placeholder

Similar activities

Python Round 3

Python Round 3

University

11 Qs

PSP Week 4

PSP Week 4

University

15 Qs

PROG3 - Chapter 6

PROG3 - Chapter 6

University

10 Qs

ITE 260 LEC

ITE 260 LEC

University

18 Qs

Kegiatan Belajar 6

Kegiatan Belajar 6

University

10 Qs

Python Lists Quiz

Python Lists Quiz

University

10 Qs

CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

University

15 Qs

Python_2R

Python_2R

KG - Professional Development

20 Qs

Python Fundamentals SEC-AQ2

Python Fundamentals SEC-AQ2

Assessment

Quiz

Computers

University

Hard

Created by

Ruchi Talwar

Used 5+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of variables in Python?

To store and manipulate data within a program

To create loops and conditions

To perform mathematical calculations

To display data on the screen

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the different data types in Python?

The different data types in Python include: int, float, complex, str, list, tuple, set, dict, bool, and NoneType.

integer, float, string, boolean

number, text, list, dictionary

int, str, bool, array

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the use of the '==' operator in Python?

To assign a value to a variable

To check if a value is greater than another

To add two values together

To compare two values and check if they are equal

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write an if-else statement in Python?

if condition: # code block else: # code block

if (condition) then { // code block } else { // code block }

if condition { // code block } else { // code block }

if (condition) { // code block } else { // code block }

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the function used to take user input in Python?

get_input()

user_input()

read_input()

input()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of 'print(5 + 3 * 2)' in Python?

15

16

10

11

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write a for loop in Python?

while item in sequence:

for i in range(sequence):

for item in range(sequence):

for item in sequence:

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?