Unit 1 Post Test: Basic Python

Unit 1 Post Test: Basic Python

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

OOP 1 Undiksha

OOP 1 Undiksha

12th Grade - University

13 Qs

test 3.6

test 3.6

11th Grade

10 Qs

 Unit 4 Advanced AP CSP

Unit 4 Advanced AP CSP

9th - 12th Grade

10 Qs

Bài 12: Tạo biểu mẫu

Bài 12: Tạo biểu mẫu

12th Grade

10 Qs

8525 AQA GCSE  3.1.1 Pseudo-code

8525 AQA GCSE 3.1.1 Pseudo-code

10th - 11th Grade

14 Qs

Programs and Variables in Code and Play

Programs and Variables in Code and Play

5th - 9th Grade

7 Qs

Inspire - AI Trivia

Inspire - AI Trivia

11th Grade

10 Qs

Parcial-Dibujo

Parcial-Dibujo

12th Grade

10 Qs

Unit 1 Post Test: Basic Python

Unit 1 Post Test: Basic Python

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Daniel Clark

Used 9+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct syntax to display "Hello, World!" in Python?

echo 'Hello, World!'

print("Hello World!")

console.log("Hello, World!")

print("Hello, World!")

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct way to create a variable in Python and assign the value 10 to it?

int x = 10

var x = 10

num = 10

x := 10

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?
print(4 + 5 * 2)

20
12
9
14

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is an example of type conversion in Python?

x = str(5)

x = int("5")

x = float("3.14")

All of the above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the following code output?

name = "John"

age = 25

print("My name is " + name + " and I am " + str(age) + " years old.")


My name is John and I am 25 years old.

My name is John and I am age 25.

My name is name and I am age 25 years old.

Error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will the following code output if the user inputs "5"?

<class 'int'>

<class 'str'>

<class 'float'>

Error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to get user input in Python and store it as an integer?

user_input = int(input("Enter a number: "))

user_input = input("Enter a number: ")

user_input = float(input("Enter a number: "))

user_input = eval(input("Enter a number: "))

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?