python basics

python basics

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

Code HS Computer SCi 114.1.1 JavaScript Final Exam Pt. 1

Code HS Computer SCi 114.1.1 JavaScript Final Exam Pt. 1

9th - 12th Grade

25 Qs

Predromantizam i romantizam

Predromantizam i romantizam

12th Grade

18 Qs

bài 26

bài 26

10th Grade

15 Qs

Database Fundamentals Assessment

Database Fundamentals Assessment

10th Grade

20 Qs

CHAPTER 1 AND 2 REVIEW QUIZ

CHAPTER 1 AND 2 REVIEW QUIZ

11th Grade

20 Qs

Grade 12B Midterm Exam: ERDs, EHR, and SQL

Grade 12B Midterm Exam: ERDs, EHR, and SQL

12th Grade

20 Qs

SUMMATIVE TEST IN MEDIA AND INFORMATION LITERACY

SUMMATIVE TEST IN MEDIA AND INFORMATION LITERACY

12th Grade

25 Qs

Understanding Variables and Constants

Understanding Variables and Constants

9th Grade

20 Qs

python basics

python basics

Assessment

Quiz

Information Technology (IT)

9th - 12th Grade

Medium

Created by

Filzah Amjad

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol is used in python to assign values to a variable?
equals =
plus + 
forward slash /
asterisk *

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image
In the following code, "city" is an example of a what?
List
Loop
Variable
Array

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

x = 5

y = 6

print(x*y)


The code above displays the following:

11

x*y

Syntax Error

30

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? myAge = int (myAge)

Converts the var (variable) myAge to a string

Converts the var (variable) myAge to a integer

Converts the var (variable) myAge from a integer to a string

Converts the var (variable) myAge to if statement

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the output be from the following code?
print("Hello world!" * 2)
TypeError
Hello world world!
Hello world!Hello world!
Hello world! * 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

people = ["John", "Rob", "Bob"]

print (people[-1])

what would this result be?

John
Rob
Bob

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of program below?


mariana_islands = ['Saipan', 'Tinian', 'Rota']

mariana_islands.remove('Tinian')

print(mariana_islands)

['Saipan', 'Tinian', 'Rota']

['Tinian', 'Rota']

['Saipan', 'Tinian']

['Saipan', 'Rota']

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?