Search Header Logo

Python Basics

Authored by Josan Tamayo

Computers

University

Used 14+ times

Python Basics
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Insert the missing part of the code below to output "Hello World".

____________("Hello World!")

print

x=

raw_input

input

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Create a variable named carname and assign the value Volvo to it.

carname = "Volvo"

carname = Volvo

Volvo="carname"

Volvo=carname

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Create a variable named x and assign the value 50 to it.

x=50

x="50"

50=x

"50"=x

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Create a variable called z, assign x + y to it.

x = 5

y = 10

_______

z=x+y

sum=x+y

x+y=sum

x+y=z

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Command to input a text or string?

raw_input

raw-input

input

print

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following lines has error?

  1. fname="josan"
  2. mi="d"
  3. age=30
  4. print("you are " +age + " years old")

4

1

2

3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following lines has error?

  1. x=15
  2. y=10
  3. difference=x-y
  4. print(diff)

4

1

2

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