
Sudip Bhandari
Head of Growth/Marketing @Programiz
Answered 18 questions
About
Hi, I’m Sudip, Head of Growth & Marketing at Programiz. I’m that guy who studied Engineering, got into content writing, and somehow ended up in marketing. Next stop? Probably running a café somewhere in the Himalayas. Some of the answers you see here? I might’ve written them while riding across the country on my bike or during halftime of a football match.

The reason the numbers 25 and 100 aren’t inside quotes is because they are being treated as numeric values, not text (strings).
In Python, when you put a number inside quotes, it becomes a string—which is a different data type.
If you want to perform calculations like addition, subtraction, or division, you should keep numbers without quotes so Python knows they are numeric values.
In your example:
age = 25
print(age)
age = 100
print(age)
Here, age
is initially assigned the numeric value of 25 and later changed to 100. That's why you see them without quotes and why they print as numbers.
Hope this helps! Let me know if you have more questions.

That's a great question!
In Python, int
is actually a class, and any number you create (like 1
) is an object of that class.
For example, when you write:
number = 1
Here, number
is an object of the int
class. You can check this using the type()
function:
print(type(number)) # Output:
This shows that int
is a class, and every integer you create is an object (or instance) of that class.
Hope this helps!

Fixed values are constants that cannot be changed after they are created, and in the context of strings, they are specific sequences of characters.
For example, when you define a string with either "Python"
or 'Python'
, that exact sequence of characters is what's stored. These strings are fixed values because if you tried to change them—say, by altering the capitalization or adding extra spaces—you would end up with something entirely different.
For instance, "python"
(with lowercase 'p'
) or "Python "
(with an extra space after the text and before "
) are not the same as "Python"
.
Hope this helps! If you have any more questions, feel free to ask.

In C, %d
is a format specifier used to print integer values. It tells printf()
, "Insert an integer here."
For example:
#include
int main() {
// Declare and assign an int variable
int age = 25;
// Print the value of the variable
printf("John's age is %d", age);
return 0;
}
Output
John's age is 25
In printf("John's age is %d", age);
, the %d
is replaced by the value of age
, formatting the output correctly.
You'll come across more format specifiers as you progress in the course.
Let me know if anything is unclear. I'm happy to help.

A string in Python is essentially a sequence of characters. It's used to represent text, and you can think of it as just another way of saying "text" in the programming world.
Whenever you want to work with text data, such as names, messages, or any kind of written content, you would use a string. Strings are enclosed in either single ('...'
) or double quotes ("..."
), and there is no functional difference between using one or the other:
# Examples of strings
name = "Ada" # Using double quotes
message = 'Hello!' # Using single quotes
You will learn more about strings in the upcoming chapters. For now, I suggest you continue the course.
Hope this helps!

Great question! In Python, def
is a keyword used to define a function.
A function is a block of reusable code that performs a specific task—you define it once and can use it as many times as you like.
Example:
def greet(name):
print(f"Hello, {name}!")
In the code:
def
tells Python that you're defining a function.greet
is the name of the function.(name)
is a parameter the function takes.The indented line below it is the function body, which runs when the function is called.
To actually use the function, you'd call it like this:
greet("Alice") # Output: Hello, Alice!
Why use functions?
They help you avoid repeating code.
They make your programs easier to read and maintain.
You can break a complex task into smaller parts.


Good question!
In programming, parentheses (the rounded brackets ()
) are used in different ways depending on the context.
Here are two common uses:
Grouping expressions to control the order of operations:
Example:(5 + 19) / 6 * (2 + 5)
Parentheses make sure that the additions happen before division and multiplication.
Defining function calls and passing arguments:
Example:// function definition int main() { ... } // Function call addNumbers(10, 5);
Here, parentheses are used to define and call functions, and to pass values into them.
You'll be using parentheses a lot as you continue learning to code, and it will start feeling more natural as you progress.
So I suggest you keep moving forward step-by-step.
Let me know if you have any more questions—happy to help!

Here, greeting
is a variable. When you print a variable, you get the value stored inside it as the output.
That’s why when you print greeting
, you see Merry Christmas—because that's the value stored in the variable.
If you want to print the word greeting itself (not the value), you need to enclose it in quotes, like this:
print("greeting")
In this case, "greeting"
is treated as a string, not a variable. So the output will simply be:
greeting
Quick reminder:
Without quotes → Python treats it as a variable and shows its value.
With quotes → Python treats it as plain text (a string).
Hope this clears things up! Let me know if you have any other questions.

In Python, we use the if...else
statement to make decisions. For example:
age = 19
if age >= 18:
print("The person can enter inside the club.")
else:
print("The person cannot enter inside the club.")
We have a dedicated lesson on if...else
, so you’ll learn more about it as you continue the course.
For now, I recommend just keeping the flow and moving forward step-by-step.
If you want to jump ahead and learn about it right now, you can visit: if...else Statement | Programiz PRO
Hope this helps!


Hi there! ROWS BETWEEN can be a bit confusing at first, so let’s break it down together.
First, ROWS BETWEEN
is not actually a window function itself. Instead, it's a clause used inside a window function to define which rows should be considered for the calculation. It's like setting the boundaries or frame for your data analysis.
When you see the code
AVG(closing_price) OVER (
ORDER BY date
ROWS BETWEEN 6 PRECEDING AND CURRENT ROW
)
The part "ROWS BETWEEN 6 PRECEDING AND CURRENT ROW" tells SQL to calculate the average of the current row and the past six rows, effectively allowing us to compute a 7-day moving average.
By specifying these boundaries, SQL knows how far back or forward to look from each row in the dataset when performing the calculation.
Hope this helps make things clearer! Feel free to ask if you have any more questions.