0% found this document useful (0 votes)
8 views7 pages

Computers Grade 6

The document contains a series of questions and prompts related to programming concepts, specifically focusing on Python. It covers topics such as programming languages, syntax errors, variables, data types, and coding practices. Additionally, it includes multiple choice and true/false questions to assess understanding of Python programming.

Uploaded by

D Madan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views7 pages

Computers Grade 6

The document contains a series of questions and prompts related to programming concepts, specifically focusing on Python. It covers topics such as programming languages, syntax errors, variables, data types, and coding practices. Additionally, it includes multiple choice and true/false questions to assess understanding of Python programming.

Uploaded by

D Madan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

1

1.​ Differentiate between block based and text based programming.


Block based Programming Text based Programming

2.​ Every programming language has a syntax. What does this statement mean?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
3.​ Write a syntax error in Python.
____________________________________________________________________________
4.​ What are editors?
____________________________________________________________________________
5.​ What is IDE?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
6.​ What is IDLE?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
7.​ What is PyCharm?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
8.​ Give an example of output in Python.
____________________________________________________________________________
9.​ Give an example of output of multiple statements.
2

10.​

11.​Answer the following questions:


3

1.___________________________________________________________________________
2.___________________________________________________________________________
3.___________________________________________________________________________
4.___________________________________________________________________________
5.___________________________________________________________________________
6.___________________________________________________________________________
7.___________________________________________________________________________

PYTHON CODING
1.​ What is a variable? Give an example.
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
2.​ What are Reserved Words? Give an example.
____________________________________________________________________________

3.​
____________________________________________________________________________
____________________________________________________________________________
4.​ What is an Assignment Statement?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
5.​ What are Arithmetic Operators? Give examples.
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
6.​ How do you change the value in a variable?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
7.​ What is Initialising?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
8.​ Give an example of Variables and Output.
4

9.​ What are the four types of Integers?

Integer

Real or Float

Character

String
10.​What are the Data Types in Python?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
11.​What is Casting? Give an example.
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
12.​What is Input in Python?
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________

13.​
14.​Write the answers of the following questions:
Learn the common errors.
5

______________________________________________________________________
______________________________________________________________________
______________________________________________________________________
15.​

### Multiple Choice Questions

1. What does the print function do in Python?


a) Creates a variable
b) Displays output on the screen
c) Takes input from the user
d) None of the above
6

2. Which of the following is a valid variable name in Python?


a) 1st_variable
b) my_variable
c) my-variable
d) my variable

3. What will be the output of the following code?


```python
print(3 + 4)
```
a) 7
b) "3 + 4"
c) 34
d) Error

4. Which of the following data types is used to represent text in Python?


a) int
b) float
c) string
d) list

5. How do you start a comment in Python?


a) //
b) #
c) /*
d) <!--

6. What will be the output of the following code?


```python
x = 10
print(x)
```
a) x
b) 10
c) Error
d) "x"

7. Which symbol is used to create a list in Python?


a) {}
b) []
c) ()
d) <>

8. How do you define a function in Python?


7

a) function myFunction():
b) def myFunction():
c) create myFunction():
d) myFunction():

9. What will be the output of the following code?


```python
for i in range(3):
print(i)
```
a) 0 1 2 3
b) 1 2 3
c) 0 1 2
d) 3 2 1

10. What does the 'len' function do in Python?


a) Checks the type of a variable
b) Calculates the length of a string or list
c) Converts a string to uppercase
d) None of the above

---

### True or False Questions

11. T/F: Python is a case-sensitive programming language.

12. T/F: You can use spaces in variable names in Python.

13. T/F: The keyword 'def' is used to define a new function.

14. T/F: Lists in Python can only contain integers.

15. T/F: Indentation is important in Python.

You might also like