Unit 1 Flashcards
Introduction to Python
1.3 - Basic Input and Output
What is text?
any output from a program using print()
1.3 - Basic Input and Output
What is a string?
any print()
statement
1.3 - Basic Input and Output
How do you use end=''
? What does it do?
keeps output on the same line connected by whatever is placed in single quotes
1.3 - Basic Input and Output
What are the print escape sequences?
\n
for new line\t
for tab
backslashes () can be used mid-string to input special characters that would interrupt code
1.3 - Basic Input and Output
What does input()
do?
reads input from the user
adding text inside the parentheses displays a prompt to the user
1.3 - Basic Input and Output
What does int()
do?
converts a string into a number (if applicable)