Quotation marks are used to wrap around strings. (T/F)
True
Ex. validString = "hello"
alsoValidString = 'hello'
What is a function?
A function is an encased block of code that only runs when the function's name is called. It is a reusable block of programming statements designed to perform a certain task.
What is the error in the code below?
number=int(input("Enter a number:"))
x=4*number
(number)
There is no error, hehe >:)
How do you open the chat?
Press 'T' or 'Return'
How do you add a single line comment in Python?
Use the # before the comment
What is the % symbol mean in python?
It represents the modulus and takes the remainder from division.
Find the problem in the code below:
name=input("Enter name: ")
hobby=int(intput("How many hobbies do you have(enter a number): "))
1answer = hobby-hobby
print(name,"has",1answer,"hobbies.")
A variable cannot start with a number.
What key do you press to open up the Make Code Studio in Minecraft Education Edition?
"C"
You use the number of asterisks to the power you want to raise the base number to (2**2 = 4 or 2***3 = 8)
(T/F)
False
What is the difference between a for loop and a while loop?
A for loop is used to repeat code for a fixed number of times. A while loop is used to repeat code until a specific condition is false.
What is the error in the code?
print(Hello World!)
Hello World should be wrapped in quotes.
How do you get your agent to follow you?
Set your code to teleport your agent to your location.
You must include an else statement when using an if statement, but elif statements are optional (T/F)
False
How can you save user input into a variable?
Initialize a variable and use parentheses to ask the user a question. The question must be in double or single quotes.
Ex. feedback = input("Insert your question here: ")
What is the error in the code below
animal = input("Enter an animal: ")
sound = input("Enter a sound: ")
e = " E-I-E-I-O"
print("Old Macdonald had a farm," + e)
print("And on his farm he had a", animal + "," + e)
print("With a " + sound + "-" + sound + " here and a " + sound + "-" + sound, 'there")
print("I showed my mercy by not writing the rest of the song", e)
On the third print statement the string "there" had mismatched quotation marks: 'there". Correct way to write it would be "there" or 'there'
What does this block do?
_______________________________
| agent [place on move ▼] { {ON}} |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
or
agent.set_assist(PLACE_ON_MOVE, True)
When the agent moves forward, if there is an active slot, it will place the items in the active slot in the area it moves to.