Search Header Logo

Girls Who Code Lesson 3 review

Authored by Hari Ganesh

Other

6th Grade

Used 1+ times

Girls Who Code Lesson 3 review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this program when the user writes: "red"

color = input("Favorite color: ")

print("my favorite color is " + color)

red

my favorite color is red

my favorite color is color

red is my favorite color

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Correct this code

x = "input("What grade are you in?"

input = ("What grade are you in")

input("What grade are you in)"

x = input("What grade are you in?)"

x = "input("What grade are you in?")

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when the program reaches the `input()` line?

The program immediately ends.

The program will continue running infinitely.

The program waits for the user to write input in the prompt.

The program prints an runtime error.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `print()` function in this code?

To take input from the user.

To display the user's input.

To pause the program.

To end the program.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fix the following code

x = input(Length of rectangle: )

y = input(Width of rectangle: )

print("Area: " + x * y)

x = input("Length of rectangle: ")

y = input("Width of rectangle: ")

print("Area: " + (x*y))

x = int(input("Length of rectangle: "))

y = int(input("Width of rectangle: "))

print("Area: " + str(x*y))

x = int("Length of rectangle: ")

y = int("Width of rectangle: ")

print("Area: " + str(x * y))

The code runs without any errors.

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?