WorksheetsPython Basics 1
Total questions: 20
Worksheet time: 10mins
A main difference between the terminal and an IDE (Integrated Development Environment) is you can run a program in an IDE instead of going back and forth between windows
True
False
The terminal or text editor cannot run individual lines, so it would not be used to test individual commands.
True
False
The symbols >>> are called
much greater than
the interactive prompt
command
string
In the following: print('Hello World'), the word print is considered the
command
interactive prompt
parameter
string
In the following: print('Hello World'), ('Hello World') is a(n)
command
parameter or argument
interactive prompt
string
In the following: print('Hello World'), 'Hello World' is a(n)
command
interactive prompt
parameter
string
In the following, x = 7 the x would be considered a(n)
command
parameter
string
variable
Variables can be single letters or symbols as well as words
True
False
When designating a variable, if more than one word is used, there needs to be a(n) ____________________ between the words
space
hyphen (-)
hashtag (#)
underscore (_)
What would be the output?
x = 7
x
7
Syntax error
What is the file extension for Python files?
.pyt
.pt
.py
.ptn
What would be the result if Python version 3.*.* were on the screen above >>> and you entered print ('Hello World')
>>>
print: Hello World
Hello World
Syntax Error
#Display welcome message
Is an endline comment that would print above what every string you enterd
Should not ever be entered on the same line as your command
is an endline comment description for developers and programmers and would not print out when the program was run
Pops up when you load Python
Notepad++ is
Is a high level IDE
For HTML only
Runs and debugs code
Is a text editor used by some programmers
Why would print('Waldo's World') result in an error?
" always has to be used
Python thought the ' in Waldo's was closing the argument
' can't be used in Python
Ways to fix the error in print('Waldo's World') (PICK 2)
Put / in front of ' in Waldo's
Use " (double quote) in Waldo's
Use " (double quotes) for the opening quote
put \ in front of ' in Waldo's
The symbol \ is called a(n) _____________ in Python
backslash
interupter
escape character
variable
In Python a whole number
Is a float
Needs to have # ahead of it
Is an integer
Is a decimal
In Python a float is
An Integer
A decimal
A fraction
A whole number
In Python White Space (PICK TWO)
Is visible only in a ext editor
is only visible in an IDE
Can be tabs or spaces
Can indicate a new line instead of a symbol
