Python and MySQL Fundamentals

Python and MySQL Fundamentals

12th Grade

20 Qs

quiz-placeholder

Similar activities

Ôn tập kỳ 2 tin 6

Ôn tập kỳ 2 tin 6

1st - 12th Grade

15 Qs

Technology trends

Technology trends

7th - 12th Grade

15 Qs

Trắc nghiệm excel - 1

Trắc nghiệm excel - 1

KG - University

20 Qs

City & Guilds Award in Business Processes

City & Guilds Award in Business Processes

12th Grade

20 Qs

Pengayaan Informatika

Pengayaan Informatika

12th Grade

20 Qs

STARFIELD MID-TERM 2

STARFIELD MID-TERM 2

9th - 12th Grade

15 Qs

CPA MS-Office Hotkeys Quiz

CPA MS-Office Hotkeys Quiz

8th Grade - Professional Development

21 Qs

Quiz on Misinformation and Bias

Quiz on Misinformation and Bias

10th Grade - University

18 Qs

Python and MySQL Fundamentals

Python and MySQL Fundamentals

Assessment

Quiz

Computers

12th Grade

Practice Problem

Easy

Created by

Aghata Dhiwi Ashita

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in Python?

var mynumber = 10

my number = 10

def mynumber = 10

my_number = 10

my-number = 10

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you take user input in Python?

input()

user_input()

read_input()

get_input()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to print output to the console in Python?

print()

output()

write()

console.log()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for an if statement in Python?

if (condition) { code }

if condition then code

if: condition { code }

if condition: # code to execute if condition is true

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a for loop in Python?

for i in range(5): print(i)

for (i = 0; i < 5; i++): print(i)

for i in range(5) print(i)

for i in 5: print(i)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'break' statement in a loop?

To skip the current iteration of the loop.

To continue the loop without interruption.

To pause the loop temporarily.

To exit a loop prematurely.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a function in Python?

function_name(parameters) =>

create function_name(parameters)

function_name: parameters()

def function_name(parameters):

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?