Search Header Logo

Python0524

Authored by Rion Daneal

Computers

University

Used 1+ times

Python0524
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

60 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What function is used to take user input in Python?

input()
get()
read()
user()

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following code output? print(type(5.2))

int
float
str
bool

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you extract characters from a string in Python?

extract()
slice()
get()
substring()

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result of the expression 3 + 4.5?

7
7.5
34.5
3.4

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is a valid way to convert the string "42" to an integer?

int("42")
str(42)
float("42")
"42".toInt()

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does my_string[2:5] represent in Python?

Characters from 2nd to 5th
Characters from 2nd to 4th
Characters from 3rd to 6th
Characters from 3rd to 5th

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result of the expression 7 / 2 in Python?

3.5
3
4
3

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?

Discover more resources for Computers