stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Grade 7 Revision Practice Flashcards | StudBud
Explore
/
Grade 7 Revision Practice
Grade 7 Revision Practice
28 terms
·
StudBud Administration
·
37 plays
Imported from external platform
Flashcards
28 cards
F
Practice quiz
P
Host live
L
Questions
28
Answers
1
Which of the following is a valid variable name?
my_Name
@MyName
My Name
1Name
2
What would be the output of the below code:
error
15
510
5+10
3
What should you do to interpret and fix a syntax error in Python?
Read the error message from the interpreter and correct the mistake
Ignore the error and run the program
Restart the computer
Delete the line causing the error
4
How will you convert the below to one line of code?
firstname=input("What is your name?")
no such thing
Print("what is your name?")
firstname=input(What is your name?)
5
1) In the given program, what will the code print if firstname="John" and food="Pasta"?
firstname, "LIKES", food
John LIKES Pasta
JOHN LIKES PASTA
John, "LIKES", Pasta
6
What is the significance of sequencing instructions in programming?
It changes the programming language
It determines the font style
It adjusts the screen resolution
It controls the order of operations
7
What is the output if the 'age' input is 20 in the 'IF' syntax example?
Child
there will be an error
Adult
Adult, Child
8
In a binary search, which names would be examined to find Kasim?
Kasim, Maisie, Noah, Paul, Sue
Andrew, Bob, Cathy, Debra, Kasim
Maisie, Cathy, Debra, Kasim
Maisie,Kasim, Cathy, Debra
9
What is the result of 7 // 2 using arithmetic operators?
1
3
5
3.5
10
What is the purpose of 'print' function in Python?
To read user input
To save a file
To execute a program
To display text on the screen
11
How will the message appear on the users screen if animal = "Butterfly"
How would you describe a + animal?
How would you describe a Butterfly?
How would you describe a + Butterfly?
how would you describe a + Butterfly
12
What are the three selection statements introduced in the content?
grade >= 80
if, elif, else
Distinction, Merit, Pass
>=
13
If name=”Mr. John”, what would be the result of len(name)?
7
no such thing
8
11
14
Which function is used to take user input in Python?
input()
print()
read()
scan()
15
If shoeSize = 6.5 what would be its data type?
float
int
string
boolean
16
What is the result of 7 % 2 using arithmetic operators?
1
3.5
5
3
17
Is it possible to convert the below code to one line of code?
False
True
18
If name= "Joe" what would be its data type?
int
float
string
boolean
19
What is the purpose of the 'input' function in Python?
To display output on the screen
To perform mathematical calculations
To read user input
To create graphical interfaces
20
What is the outcome of running a Python program that contains the line 'print("Hello, World!")'?
HelloWorld!
Hello, World!
Hello, World
Hello World
21
What type of errors are caused by incorrect syntax in Python programs?
Syntax errors
Logic errors
Semantic errors
Runtime errors
22
When using the input() function in Python, what data type is assigned to the input by default?
float
string
integer
boolean
23
What is the origin of the term 'Bug' in computer programming?
Derived from a real insect causing a malfunction
Named after a famous programmer
Stands for 'Binary User Guide'
Refers to a feature in a program
24
If isFull= True what would be its data type?
string
int
boolean
float
25
How can you declare a comment
*
#
//
^^
26
What is the concept of concatenating in Python?
Joining together any types of data using a plus sign (+)
Joining together strings using a plus sign (+)
Joining together any types of data using a plus sign (,)
Joining together any types of data using a plus sign (-)
27
A list has to be sorted to perform a linear search?
False
True
28
How would you convert the data type of myNumber to integer in python?
str(myNumber)
int(myNumber)
no such thing
boolean(myNumber)