G1Q1

G1Q1

Professional Development

20 Qs

quiz-placeholder

Similar activities

vpsdbs

vpsdbs

KG - Professional Development

20 Qs

Evaluación AUTH-ACCESS Attacks - Website Hacking

Evaluación AUTH-ACCESS Attacks - Website Hacking

Professional Development

18 Qs

1ºDAM/DAW - Entornos de Desarrollo - UD1-6 - Prof. C. Boni

1ºDAM/DAW - Entornos de Desarrollo - UD1-6 - Prof. C. Boni

University - Professional Development

20 Qs

Telco Practice Test 1

Telco Practice Test 1

Professional Development

15 Qs

Digital Electronics (Weekend Assignment - 3)

Digital Electronics (Weekend Assignment - 3)

University - Professional Development

20 Qs

Technical Training

Technical Training

Professional Development

15 Qs

20764 - SQL - Mod 5 and 6

20764 - SQL - Mod 5 and 6

Professional Development

18 Qs

business 1.4 revision

business 1.4 revision

KG - Professional Development

20 Qs

G1Q1

G1Q1

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

HASAN YIGIT

Used 3+ 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

__________ is the built-in function to know the type of a variable or function.

id()

type()

data_type()

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

__________ keyword is used for creating a function in Python.

define

 fun

 def

function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the best solution to repeated code? Select the correct answer.


All options are wrong.

Wrapping the code into one function.

Leave the code as is.

Split code into multiple functions.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following Python function:

def dbl_plus(x):

    return 2*x + 1

 What is the purpose of the function dbl_plus(x)?


Doubles the input and subtracts 1

Multiplies the input by 2

 Doubles the input and adds 1

Adds 1 to the input

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given the code snippet:

val = -5

if val < 0:

    result = -val

else:

    result = val

print(result) 

 What will be printed as the output?


5

-5

0

10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the code snippet for i in [30, 40, 50]: print(i), what is being printed? 


 Fahrenheit to Celsius conversion for each value

Values along with their square roots

Values along with their increments

Values as they are in the list

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Based on the provided code for the variable height: Suppose the variable height is given the value of 75. What will be printed?

if height > 100:

    print("space")

elif height > 50:

    print("mesosphere")

elif height > 20:

    print("stratosphere")

else:

    print("troposphere")


mesosphere

space

stratosphere

troposphere

Access all questions and much more by creating a free account

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?