Python Basics with CodeCombat

Python Basics with CodeCombat

7th Grade

7 Qs

quiz-placeholder

Similar activities

Interstate Competition

Interstate Competition

7th - 10th Grade

11 Qs

CodeCombat CS2

CodeCombat CS2

7th Grade

7 Qs

Collecting Treasure with Laurel: Lesson 3

Collecting Treasure with Laurel: Lesson 3

6th Grade - University

10 Qs

Java year 7 (Karel the dog)

Java year 7 (Karel the dog)

7th - 8th Grade

10 Qs

Building Your First Sprite - Codesters

Building Your First Sprite - Codesters

6th - 8th Grade

12 Qs

Codecombat Computer Science

Codecombat Computer Science

6th - 9th Grade

12 Qs

Small Basic (Turtle)

Small Basic (Turtle)

KG - University

10 Qs

Greenfoot 1

Greenfoot 1

6th Grade - University

10 Qs

Python Basics with CodeCombat

Python Basics with CodeCombat

Assessment

Quiz

Computers

7th Grade

Medium

Created by

Paing Khant Naing

Used 3+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to move the hero to the right in CodeCombat using Python?

`hero.moveLeft()`

`hero.moveRight()`

`hero.moveUp()`

`hero.moveDown()`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following commands is used to make the hero attack an enemy in CodeCombat?

`hero.defend()`

`hero.attack()`

`hero.run()`

`hero.hide()`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In CodeCombat, which method would you use to make the hero move to the left?

`hero.moveRight()`

`hero.moveLeft()`

`hero.moveUp()`

`hero.moveDown()`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print? ```python for i in range(3): print(i) ```

0 1 2

1 2 3

0 1 2 3

1 2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a string variable `name` with the value "CodeCombat" in Python?

`name = 'CodeCombat'`

`name = CodeCombat`

`name := "CodeCombat"`

`string name = "CodeCombat"`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In CodeCombat, which command would you use to make the hero move up?

`hero.moveRight()`

`hero.moveLeft()`

`hero.moveUp()`

`hero.moveDown()`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to use the `hero.attack` method in CodeCombat?

`hero.attack("enemy")`

`hero.attack(enemy)`

`hero.attack()`

`hero.attack[enemy]`