Formatting
Formatting/error
Name me ...
Definitions
Explain the logic
100

How do you format a print statement?

print("")

100

How do you format a comment?

#type anything here : )

100

...an example of an input.

Keyboard, mouse, etc...

100

What is input?

Data that the computer takes in.

100

Explain the logic behind the print statement.

Whatever is put into the quotation marks will be outputted.
200

How do you format user input?

input("")

200

What is the error?

Print('hi')

The capital P

200

...an example of an output.

Screen, printer, etc...

200

What is output?

Data that the computer gives out.

200

Explain the logic behind how a user input variable works.

The user is asked the prompt, the input is then saved in the variable.

300

How do you format the changing of a data type?

int(), str(), or float()

300

What is the error?

_greeting1 = "HI, THERE"

print (_greeting1)

There is no error.

300

...the five rules for variables / variable naming 

1) cannot be a keyword

2) Cannot contain spaces

3) 1st character cannot be a number

4) Can only have letters, numbers, and underscores.

5) Variables are case-sensitive.

300

What is a function?

A body of prewritten code that performs the same operation once called.

300

Explain the logic behind string concantenation.

When two strings are added together through a "+" sing, the two strings are combined.

400

How do you format an escape character?

\n  ,  \t  ,  \'  ,  \"  ,  \\

400

What is the error?

name = Jhonny

print("Hi there", \t, name)

The escape characters go inside the string literals.

400

...the five components of a computer.

1) input

2) output

3) CPU

4) Main Memory

5) Secondary memory

400

What does string concatenation mean?

The combination or addition of two strings.

400

Explain the logic behind escape characters.

Once the computer detects a backlash in the print statement, it reads what is after the backlash, performs the intended action, and then continues outputting the output.

500

How do you format custom end characters?

print("something", "something", end = ".")

500

How do you format the statement that checks the datatypes of a variable?

print(type(variable))

500

...a low-level language

Binary language/ machine language

500

What are escape characters?

Special characters proceeded by a backlash that appear inside a string.

500

You are brave.

Choose one. Answer the question for 500 or retreat and receive 100 points.

Question: What does the ^ format specifier specify in f-strings?


That the placeholder will be centered.

M
e
n
u