Unit 1 Flashcards

Introduction to Python

1
Q

1.3 - Basic Input and Output

What is text?

A

any output from a program using print()

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

1.3 - Basic Input and Output

What is a string?

A

any print() statement

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

1.3 - Basic Input and Output

How do you use end=''? What does it do?

A

keeps output on the same line connected by whatever is placed in single quotes

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

1.3 - Basic Input and Output

What are the print escape sequences?

A

\n for new line
\t for tab
backslashes () can be used mid-string to input special characters that would interrupt code

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

1.3 - Basic Input and Output

What does input() do?

A

reads input from the user

adding text inside the parentheses displays a prompt to the user

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

1.3 - Basic Input and Output

What does int() do?

A

converts a string into a number (if applicable)

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