INTRO: Writing Our First Code Flashcards

1
Q

Do all coding languages have the same syntax for displaying something on the screen?

A

Every language has a different syntax for displaying or printing something on the screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s a terminal?

A

A terminal is the screen where we see the code or the output of our program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s an output of a program?

A
  • The action of showing the product or result of a code after it is executed or run.
  • It refers to the information or results that the program produces or generates when it is executed or run.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can we print multiple pieces of Data in a single print command?

A

Yes, we just have to separate them using commas.

print(50, 1000, 3.142, “Hello World”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is the text “Hello World” bounded by quotation marks?

A

Because it is a string or a group of characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

By default, each print statement prints text where?

A

On the next line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

If we want multiple print statements to print on the SAME LINE, what do we do?

A

print(“Hello”, end=””)
print(“World”)

print(“Hello”, end=” “)
print(“World”)

HelloWorld
Hello World

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What’s the purpose of the code with end=” “

A

The purpose of end=” “ is to

  • print (add) different characters or values
    at the end of the first print statement.
  • we want multiple print statements to
    print on the SAME LINE.

print(“Hello”, end=” “)
print(“World”)

Hello World

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s the purpose of comments?

A

Comments are pieces of text used to:

  • make computers ignore certain parts of the program

-DESCRIBE WHAT’S HAPPENING in the code.

-They have no effect on the code whatsoever.

print(50) # This line prints 50
print(“Hello World”) # This line prints Hello World

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Is Python a general-purpose programming language?

A

-Yes, Python is designed to be :

-flexible and versatile,
-capable of solving a wide range of problems
-across various domains and industries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What the versatility of Python means?

A

It means, it can be applied

-to various tasks, domains, and industries

-due to its extensive ecosystem, adaptability, flexibility and ease of use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Valiable and value

A

age = 25 - the age variable is created and it’s storing 25
print(age) - prints the value stored in the age variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly