Module 3 Worksheet 1 & 2

Module 3 Worksheet 1 & 2

University

10 Qs

quiz-placeholder

Similar activities

Methods

Methods

University

11 Qs

1D Array

1D Array

University

10 Qs

Cpp programming quiz 1 : get started with basics

Cpp programming quiz 1 : get started with basics

University

11 Qs

Algoritma dan Pemrograman Bab 2

Algoritma dan Pemrograman Bab 2

University

10 Qs

Sains Komputer Tingkatan 4 - 1.7.1 Menghuraikan setiap fasa

Sains Komputer Tingkatan 4 - 1.7.1 Menghuraikan setiap fasa

1st Grade - Professional Development

11 Qs

Round 1

Round 1

University

15 Qs

Progaming Language

Progaming Language

University

15 Qs

ระบบฐานข้อมูลเบื้องต้น

ระบบฐานข้อมูลเบื้องต้น

7th Grade - University

10 Qs

Module 3 Worksheet 1 & 2

Module 3 Worksheet 1 & 2

Assessment

Quiz

Computers

University

Hard

Created by

Murugeswari.k Murugeswari.k

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

choose the correct output for the following python code

 

for i in range(0,3,-1):
    print("Welcome")

Welcome Welcome Welcome

WelcomeWelcomeWelcome

Welcome

No output

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the correct python code

if x>=45 :

if (x >= 45)

if (x => 45)

if x >= 45

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following Python code snippets correctly swaps the values of two variables, a and b without temporary variable?

a = b b = a

temp = a a = b b = temp

a, b = b, a

swap(a, b)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the range() function in Python when used for counting?

To generate a list of numbers in a specified range

To calculate the length of a list

To iterate over a sequence of numbers

To count the occurrences of a specific element in a list

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you attempt to calculate the factorial of a negative number in Python?

It calculates the factorial without any issues.

Python raises a ValueError

It returns 0

It returns 1

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function can be used to convert a character to its corresponding integer value without using ASCII codes?

char_to_int(char)

int(char)

convert(char)

num(char)

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

________________keyword can be used instead of if in else part of the conditional statement?

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?