Ask Programiz - Human Support for Coding Beginners
Explore questions from fellow beginners answered by our human experts. Have some doubts about coding fundamentals? Enroll in our course and get personalized help right within your lessons.

Hey! In programming, fixed values are values you write directly into your code — they don't change while the program runs. These are called literals.
For example:
5
→ an integer literal3.14
→ a floating-point (double) literal"Hello"
→ a string literal
They're called "fixed" because you're using them directly in your code, without assigning them to variables (yet).
Let me know if you want to see how to use them in a C++ program!

So, in Python, you don't need to use curly braces {}
when printing a variable like this:
name = input("Enter your name: ")
print("Your name is", name)
That works because print()
can take multiple things, separated by commas. It just puts spaces between them automatically, so you don't have to do anything fancy.
Now, curly braces do show up when you're using something like an f-string. That looks like this:
print(f"Your name is {name}")
In that case, the {name}
is inside the string, and Python replaces it with the actual value of the name
variable — but only because the string starts with an f
.
So yeah, curly braces are just for special formatting stuff like f-strings. If you're just printing normally with commas, you don’t need them at all.

Whitespaces are just empty spaces in your text.
For example:
text = " Hello "
This has extra spaces before and after Hello
.
Those extra spaces are called whitespaces.
We usually remove them to make the text look clean.

Simply put,
Memory location refers to a specific spot in the computer’s memory where data is stored. Think of it as a unique address where your data lives while your program is running. Every variable in your program is stored in one of these memory locations.
Data type is about the kind of data that goes into a memory location. For example, if you’re storing a number, the data type could be an int (integer) or a float (decimal number). If you’re storing text, the data type would be char or string.
So, in simple terms: Memory location is where data lives, and data type is what kind of data it is.
It’s okay if it's not 100% clear right now. As you continue with the course, this concept will make more sense.
Let me know if you need help with anything else.

In programming, input simply means getting information from the user.
As you progress through the course, you'll learn how to take input in Python and use it in your programs.
Let me know if anything is unclear or if you'd like to explore this further.

Yes, console.log()
in JavaScript is similar to print()
in Python — both are used to display information to the console or terminal.

When performing arithmetic operations in Python, the result will be a floating-point number if you use the /
operator for division. For example, 5 / 2
will give you 2.5
.
If you're using operations like addition (+
), subtraction (-
), or multiplication (*
), the result will be in floating-point only if any of the values involved are floating-point numbers. For example, 5 + 2.2
will give you 7.2
.
If you use the //
operator for integer division, like 5 // 2
, the result will be an integer (in this case, 2
).
This distinction helps you get the result you expect, depending on the type of operation and the numbers involved.

Hi there! Multiplying numbers in Python is quite straightforward, and it's great that you're diving into this lesson on data types.
To perform multiplication, you'll use the asterisk symbol (*
), which serves as the multiplication operator in most programming languages, including Python.
Let's update the code you're working with to perform an actual multiplication:
result = 2 * 2
print("2 * 2 =", result)
This code assigns the result of 2 * 2
to the variable result
and then prints it out, showing the numerical answer to the calculation.
Output
2 * 2 = 4
You can multiply any numbers using the same approach by replacing 2
with any other numbers you want to multiply.
You'll learn more about this as you follow the course, so for now, just click the Next Lesson button and continue your journey.
Hope this helps! Let me know if you have more questions about numbers or anything else you're curious about.

Yes, there’s an important difference between public class
and just class
in Java. Here’s what you need to know:
1. Accessibility Difference
public class
: The class can be accessed from anywhere in your program (even from other packages/folders).
public class Main { // Can be used everywhere
public static void main(String[] args) {
System.out.println("Hello!");
}
}
class
(no modifier): The class is only accessible within its own package/folder.
class Helper { // Only usable in this package
void doSomething() { ... }
}
2. File Naming Rule (For public Classes)
If you declare a class as public
, the filename must match the class name.
Name of the file containing
public class Main { ... }
should be Main.java.Name of the file containing
public class MyProgram { ... }
can't be Main.java.
3. When to Use Which?
Use
public
for classes that need to be shared across your project (likeMain
).Use default (
class
withoutpublic
) for helper classes that only one package uses.
// File: Main.java (Public, so filename matches)
public class Main {
public static void main(String[] args) {
Helper.help(); // Can only call if Helper is public or in same package
}
}
// File: Helper.java (No 'public' = package-private)
class Helper {
static void help() {
System.out.println("Assisting...");
}
}
Key Takeaway:
public
means anyone can use this class.No modifier means only my package/folder can use this class.

That's a good question!
When you look at the output, it can be difficult to notice extra spaces. That's why it's better to check the code carefully.
For example:
print("godfrey sami")
Here, there are no extra spaces before or after the text.
But:
print(" godfrey sami ")
In this case, there are spaces before and after the text — and you can clearly see that by looking at the code.
There are other ways to check for spaces automatically, but for now, we don't want to overwhelm you.
Just click on Next Lesson to keep going!