###### Week 1

## Code Questions of the Week

###### QUESTION 1

## Bytes

What will be the output of the following?

if 9 > 6:

print("True")

else:

print("False")

###### QUESTION 1

## Kiloytes

If every coding camper writes 3 lines of code every minute, how many lines of code will a camper write in an hour?

###### QUESTION 1

## Megabytes

What would be the output of the following code?

fruits = ["apple", "banana", "cherry"]

print(fruits[1])

###### QUESTION 2

## Megabytes

What would be the output of the following code?

def larger_number(a, b):

if a > b:

return a

else:

return b

result = larger_number(12, 8)

print("The larger number is:", result)

###### QUESTION 1

## Gigabytes

If a coding competition has 8 participants and each participant must compete against each other exactly once, how many matches will there be in total?

###### QUESTION 2

## Gigabytes

You have a 4-digit code to unlock your computer. If the first digit cannot be zero, how many possible combinations are there?

###### QUESTION 1

## Terabytes

Given the string "codingcamp", what is the result of the substring from index 2 to 5?

###### QUESTION 2

## Terabytes

What is the value of “ !(true and false) or (false or true) ” ?

###### Week 2

## Code Questions of the Week

###### QUESTION 1

## Bytes

Sarah always wears a green scarf on rainy days. Today, Sarah is not wearing a green scarf. What can you say about today’s weather?

###### QUESTION 1

## Kiloytes

During a debugging session, you find that every 5th line of code has a bug. If your program has 150 lines, how many bugs will you find?

###### QUESTION 1

## Megabytes

In a competition, you score 10 points for each correct answer and lose 3 points for each incorrect answer. If you answer 12 questions correctly and 5 questions incorrectly, what is your total score?

###### QUESTION 2

## Megabytes

There are three houses. One is red, one is blue, and one is green. The red house is to the left of the green house. The blue house is to the right of the red house. What is the order of the houses from left to right?

###### QUESTION 1

## Gigabytes

If the sum of two coding projects’ completion times is 12 hours and one project takes twice as long as the other, how long does each project take?

###### QUESTION 2

## Gigabytes

In a class of 30 coding students, 18 students prefer Python, 15 prefer Java, and 10 prefer both. How many students do not prefer either Python or Java?

###### QUESTION 1

## Terabytes

In a game, if you press a red button, the score doubles. If you press a blue button, the score increases by 5. If your starting score is 1, what sequence of button presses will result in a score of 19?

###### QUESTION 2

## Terabytes

If you have a string of 6 characters and each character can be either a letter or a number, how many different strings can be created?

###### Week 3

## Code Questions of the Week

###### QUESTION 1

## Bytes

If you start with the number 5 and double it, then subtract 3, what is the result?

###### QUESTION 1

## Kiloytes

If you have a game character that gains 10 points for collecting a coin but loses 5 points for hitting an obstacle, what is the character’s score after collecting 3 coins and hitting 2 obstacles?

###### QUESTION 1

## Megabytes

Question: If a train leaves the station at 3:00 PM and travels at 60 km/h, how far will it have traveled by 6:00 PM?

###### QUESTION 2

## Megabytes

If x + y = 10 and y - z = 5, and x = 7, what is z?

###### QUESTION 1

## Gigabytes

You have a list of 10 different coding problems and you want to choose 3 to solve. How many different combinations of problems can you choose?

###### QUESTION 2

## Gigabytes

Emma is designing a webpage and wants to ensure that her navigation bar is fixed at the top of the page, even when the user scrolls down. Which CSS property and value combination should she use?

###### QUESTION 1

## Terabytes

Style a div class “infobar” with a left margin of 40 pixels and a right margin 45 pixels.

###### QUESTION 2

## Terabytes

How many times will the following loop execute?

* for int i = 2; i less than 9; i++ *

###### Week 4

## Code Questions of the Week

###### QUESTION 1

## Bytes

If you have 8 marbles and you give away 5, but then later receive 2, how many marbles do you now have?

###### QUESTION 1

## Kiloytes

If you send an email to three friends and ask each to forward it to two more friends, how many people in total have received the email?

###### QUESTION 1

## Megabytes

Identify the pattern and find the missing letter: A, C, F, J, ___?

###### QUESTION 2

## Megabytes

If a light flashes every 4 seconds and another light flashes every 6 seconds, how often do both lights flash together?

###### QUESTION 1

## Gigabytes

What is the result of *true AND false OR true*?

###### QUESTION 2

## Gigabytes

Maria, Jake, and Sarah each have a different favorite fruit. Their favorite fruits are apple, banana, and cherry, but not necessarily in that order. Use the following clues to determine whose favorite fruit is which:

1. Maria does not like cherries.

2. Jake’s favorite fruit is not apple.

3. Sarah loves red fruits.

Who likes which fruit?

###### QUESTION 1

## Terabytes

In robotics, an ultrasonic wave travels at 340 meters per second. If a wave leaves the ultrasonic sensor and gets back in 1 second, how far is the nearest object?

###### QUESTION 2

## Terabytes

You are exploring the Enchanted Forest, and you come across three magical creatures: a Dragon, a Griffin, and a Unicorn. Each creature can only answer one type of question:

1. The Dragon always tells the truth.

2. The Griffin always lies.

3. The Unicorn can either tell the truth or lie, but you don’t know which one it will do at any given time.

You need to find out which creature is which. You are allowed to ask one yes/no question to each creature, and you can only ask each creature once.

Question:

What single yes/no question can you ask each creature to correctly identify which creature is the Dragon, which is the Griffin, and which is the Unicorn?

Hint: Think about asking questions that force each creature to reveal their true nature based on their answering behavior.