Search Header Logo
Function Parameters

Function Parameters

Assessment

Presentation

Instructional Technology

6th Grade

Practice Problem

Hard

Created by

ANDRES FELIPE GOMEZ-CASSERES ESPINOSA

Used 87+ times

FREE Resource

8 Slides • 5 Questions

1

Functions with Parameters

By Andrés

2

Multiple Choice

What is the correct way to declare a variable in Python?

1

int x = 10

2

let x = 10

3

var x = 10

4

x = 10

3

Multiple Choice

Which of the following is not a valid variable name in Python?

1

my_var

2

var123

3

123var

4

_var

4

Multiple Choice

What will be the output of the following Python code?

x = 10

y = x

y = 5

print(x)

1

5

2

10

3

15

4

None

5

Multiple Choice

What is the purpose of the input() function in Python?

1

To take input from the user.

2

To display output to the user.

3

To perform mathematical operations.

4

To declare a variable.

6

Multiple Choice

What will be the output of the following Python code?

x = input("Enter a number: ")

print(x * 2)

1

The input number multiplied by 2.

2

The input number repeated twice.

3

An error.

4

None of the above.

7

media

Does all machines work the same?

Do they need more information to do what they are intended for?

Machine's Parameters

8

comp_energy(5)

greetings()

What is the difference?

input("What is your age?")

print(answer)

9

How do you use parameters?

media

10

Let's practice...

In pairs, explain each line of the following function. Also, answer the following questions:

  1. What does the function do?

  2. What information does the function need or require?

  3. What is the result?

  4. Which Datatype does the result belong to?

11

How do you use parameters?

media

12

Activity

  • ​Now that you created a function that greets the user, define the three elements that you use the most in your daily life.

  • After, try to find how much energy is saved when these items are recycled.

  • Create a function to calculate the energy savings for each item.

13

Example

media

Functions with Parameters

By Andrés

Show answer

Auto Play

Slide 1 / 13

SLIDE

Discover more resources for Instructional Technology