stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Duplicate of Python Programming Grade 10 Flashcards | StudBud
Explore
/
Duplicate of Python Programming Grade 10
Duplicate of Python Programming Grade 10
30 terms
·
StudBud Administration
·
13 plays
An #Introduction to #Computer #Studies Grade 10 to practice #programming basic concepts.
Flashcards
30 cards
F
Practice quiz
P
Host live
L
Questions
30
Answers
1
What do two equal signs next to each other mean?
You assign a value to a variable
It means that two variables are equal
It has no meaning and will crash your code
It’s an indicator to show a space
2
Which function do you use to ask the user to enter a number?
print
import a number
raw_input()
input()
3
What is the output?
error
0 1 2
none of the mentioned
0 1 2 0
4
What is the symbol in python for less than or equal to?
<
=<
-=
<=
5
What is the meaning of sum = sum + 1 in Python?
The variable sum is renamed sum1.
The variable sum is not changing the value.
The variable sum is incremented by 1.
The variable sum is deleted from the computer's memory.
6
The basic variable types are:
strings
literal characters
strings and numbers
numbers
7
Which of the following variables is a strings?
1.567
“Hello World!”
[75,87]
75
8
Which code doesn’t work?
print “no this is the wrong one’
print “no this is wrong”
print “this is right”
print “this is wrong”
9
If number % 2 == 0: What is the condition of this if statement?
number is even
number has a 2 in it
number is odd
number is doubled
10
What needs to be changed in this code?
Add a colon after 10
“while” is spelt wrong
Switch the “<” and “=” around
Add another indent on the bottom line
11
What arithmetic operators can be used with strings ?
+ and *
- and *
**
%
12
How do you convert the number “46” into a string?
str(46)
convert(46)(string)
string(‘46’)
46 = “46”
13
Which of the following means “not equal to”?
!=
=!
-=
/=
14
What version of python do we use in class?
3.5.2
3.1.18
2.5.12
2.7.12
15
GHz is the unit of the:
RAM
number of pixels on the screen
CPU clock speed
size of the display
16
What is the greatest possible number that will be generated by random.randint(1,15)?
14
16
1
15
17
What is the symbol in python for greater than or equal to?
>=
==
>==
+=
18
Python got its name from
a snake at a Zoo
the person's name who invented the programming language.
a BBC comedy series, "MontyPython's Flying Circus".
a children's book
19
Is Python case sensitive when dealing with identifiers (variable names)?
sometimes only
yes
no
none of the mentioned
20
Identify the mistake in this python statement:
There should be 2 equal signs.
The print function is spelled incorrectly.
There’s no colon.
There should be an elif section.
21
What is the output when following statement is executed ?
bc
abc
a
bca
22
What operator do we use to concatenate strings?
+
==
++
-
23
How many times does a while loop run?
3 times
For as long as the condition is met
Forever
Once, when the condition is not met
24
With regards to computers, what does SSD stand for?
solid software drive
serial state drive
software state drive
solid state drive
25
To move up and down the screen to see all the info you use a:
Ladder
Click Bar
Scroll Bar
Scroll Line
26
What is the output when following statement is executed ? print "new", "line"
Output equivalent to print ‘new\nline’
newline
new line
Error
27
What syntax gives you the remainder of a number divided by another number?
/
-
%
*
28
Which of the following is invalid?
_a=1
_str_=1
none of the mentioned
__a=1
29
What operator do we use to repetition of string variables?
/
*
++
?
30
Which of the following is a float?
True
98
3.41
"3.4"