Search Header Logo

Python-M6-Term2-Q1-Finals

Authored by Mr. P.Imperio

Business

12th Grade

Used 11+ times

Python-M6-Term2-Q1-Finals
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this program if the user enters "Jan" and then "Lisa"?

def myname(first, surname):

name = first + " " + surname

return name

first = input("Enter your name")

surname = input("Enter your surname")

name = myname(first, surname)

print(name)

An error

Nothing

First surname

Jan Lisa

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this program if the user enters "apple" and then "banana"?

def fruitname(first, second):

name = first + " and " + second

return name

first = input("Enter your first fruit")

second = input("Enter your second fruit")

name = fruitname(first, second)

print(name)

An error

Nothing

First and second

apple and banana

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this program if the user enters "red" and then "blue"?

def colorname(first, second):

name = first + " and " + second

return name

first = input("Enter your first color")

second = input("Enter your second color")

name = colorname(first, second)

print(name)

An error

Nothing

First and second

red and blue

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this program if the user enters "dog" and then "cat"?

def animalname(first, second):

name = first + " and " + second

return name

first = input("Enter your first animal")

second = input("Enter your second animal")

name = animalname(first, second)

print(name)

An error

Nothing

First and second

dog and cat

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this program be when it is run?

def helloworld ():

       print (“ Hello, world”)

nothing

Hello,World

It will generate an error

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What would the following output be from this program?

def printmessage ():

       message =  message + “ , World”

       print(message)

message = “ Hello”

printmessage()

Error

Hello, World

Hello

World

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Actual values that the parameters take when the sub program is called.

parameters

subroutine

define

arguments

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?