stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
BIT Final Review Python Flashcards | StudBud
Explore
/
BIT Final Review Python
BIT Final Review Python
45 terms
·
StudBud Administration
·
16 plays
Imported from external platform
Flashcards
45 cards
F
Practice quiz
P
Host live
L
Questions
45
Answers
1
What would the output of this code be if the user entered the value 70?
Merit
Fail
Pass
Distinction
2
Loops
are always infinite
cannot operate outside of functions
repeat for a known amount of times
iterate (repeat) through a set of statements.
3
Which decision statement will be triggered if the variable x is less than 20?
if x == 20:
if x > 20:
if x < 20:
if x <> 20:
4
What does input do?
It allows users to change the program
It allows a user to solve a task
It converts data types
It allows users to enter data
5
Identifiers can NOT begin with... (may be more than one correct answer)
underscore
periods
letter
hyphens
6
Which command will correctly ask the user for their age?
age = input(How old are you?)
How old are you = input()
input("How old are you?") = age
age = input("How old are you?")
7
Python is a language used for web development
True
False
8
Loops do what in coding?
do a command once
repeat a command until the program stops running
repeat a command the amount of times specified
do nothing
9
myName = input() - Is myName a string, a function, a variable, or a method
Method
Function
String
Variable
10
Which function will convert a string containing only digits into a number?
ord()
int()
str()
chr()
11
leap over a gap & land on other side
jump()
Jump()
Jump():
jump():
12
move in a counter clockwise direction
turn_Left()
turn_left()
turn_left():
turnLeft()
13
15. Which of these tests whether the variable x is the same as 'Hello'?
x == "Hello"
x <> "Hello"
x != "Hello"
x = "Hello"
14
What words are part of a Conditional Code
if, else
is, else
can be
was to
15
move in a clockwise direction
turn_right():
turn_Right()
turn_right()
turnRight()
16
Syntax
rules that govern how a language is spoken
rules that govern what types of loops you can use
rules that govern how a language is structured
rules that govern how you can walk your dog
17
A conditional checks to see...
if a statement is a loop
if a statement has errors
if a statement is true
if a statement has correct syntax
18
Which function will convert a number to a string?
int()
ord()
chr()
str()
19
Which command will display the text 'Hello world!' on the screen?
print(Hello world!)
print = "Hello world!"
print("Hello world!")
print "Hello world!"
20
In coding to do something again.
Command
Loop
Repeat
21
Camel Case is...
a type of hieroglyphics
a drought tolerant laptop case
a way of naming variables, arrays, and other elements
related to Llama Type
22
Which begins a single line comment?
''' '''
#
/* */
//
23
move one space ahead
forward():
foward()
forward
forward()
24
A command is basically a loop
False
True
25
What would the outcome of this program be?
Nothing, it won't run due to errors in the code
22
50
38
26
How would we fix this code?
Remove the '='
Remove the ( ) around name
Make 'Name' lower case
Removed the ' ' from around Bob
27
what data type is 3.95?
Intager
Character
String
Float
28
What effect does the # character have?
It does nothing, Python ignores this character.
Tells Python to tweet when this line of code gets run.
Tells Python that this is a really important line of code.
Tells Python to ignore the rest of the line.
29
In coding, uppercase and lowercase DOESN'T matter
True
False
30
What is coding?
Instructing a machine what we want it to do
Instructing a machine to work
Instructing a machine to stop
Instructing a machine what we don't want it to do
31
What is a logic operator?
A symbol like "and", "or" and "not"
Someone that has all the knowledge and operates
A statement
A series of questions
32
I love coding!
False
True
33
Boolean logic
peanut butter and jelly
true or false
red or green
1 or 0
34
turn_left
turtle case
cat case
camel case
snake case
35
Which is NOT an arithmetic operator?
?
/
+
**
36
Indentation is not required
True
False
37
What is a conditional statement?
the language that people use in daily conversation
a description of a program that can change based on inputs
a symbol in code that tells a computer to perform
a programming statement that evaluates Boolean expression
38
launch an arrow for 5 blocks
fire():
Fire()
fire()
Fire():
39
What is the result of this command? print ("5" + "3")
"5" + "3"
53
"8"
8
40
Why do coding?
Enables non-logic thinking skills
It enables no skills
Enables logic thinking skills
What is coding?
41
What is a variable?
A coding technique
A piece of data you cannot change
A special file
A piece of data that can change
42
Why should you use loops in coding?
It sounds better
All algorithms need loops
It's more likely to work
To make the code more efficient
43
Can while loops go forever?
Yes
No
44
A loop allows you to execute the same code repeatedly
True
False
45
Which is NOT a reserved word?
for
else
loop
if