Skip to main content

Q & A Chapter 1 | Python | Class 10 CBSE | Computer Application

Solutions of Computer Science with Python Class 10


A. Multiple Choice Questions(Tick the correct options) - 

1. (d)
2. (c)
3. (b)
4. (a)
5. (b)
6. (b)
7. (c)
8. (a)
9. (a)
10. (a)

B. Very short answer type questions -

  1. To exit from python editor press ctrl + z from keyboard or exit().
  2. Operators are the symbols which perform the operation on some values. There are two types of operators Unary and Binary Operator.
  3. Python is available for free anybody can download and make programs in python. Also you can add or update modules or functions in python library.
  4. Tokens are smallest unit of a python program. Python breaks each lines into a sequence of meaningful component.
  5. Punctuators are symbols that are used in programming languages to organize sentence structures. The most common punctuators are ' " #

C. Short Answers -

  1. Escape Sequence is a character that contains a special meaning. There are various types of escape sequence some of them are '\n' used to insert new line and \" is used to assign double quotation in the string.
  2. A comment is used to write user's notes and description which helps to understand the program. The comment line starts with # symbol. Comments are not compiled by compiler because these are not executable statement.
  3. In statically typed language the values are constant while executing the program, while in dynamically typed language the variable are dynamic user have to enter the values at runtime for the execution of the program.
  4. Input statements are used to input values at runtime during the program execution while output statements are used to print the statement on the screen. For inputting the values input() function is used and for output print() function are used.
  5. Identifiers in python are nothing but user defined names to represent variables, functions, classes, etc. But there are few rules that we have to follow while defining an identifier:
    • You can define the variable using letters (a to z), numbers (0 to 9) or an underscore (_).
    • You cannot use digits to begin an identifier.
    • You cannot use reserve words to declare an identifier.
    • Other than underscore (_) you cannot use any other special characters, like !, @, #, $, etc. in an identifier.
  6. Python contains one special literal i.e. None. None is same as null in other language. We use None to assign null or empty value in some variable. E.g. message=None
  7. A data type represents the type of data stored into a variable or memory. There are five main data types: Numeric, String, List, Tuple and Dictionary
  8. Python programs can be executed in two ways interactive mode and scripting mode. In interactive mode the python programs are executed at python prompt. 
  9. In arithmetic operation, the operators are used for arithmetical calculation like addition, subtraction, multiplication, etc. while in relational operation, the operators are used to compare the value between two or more.
  10. Logical operator is used to check two or more than two conditions. The logical operator also returns the Boolean result either true or false. There are three logical operators: and, or and not. 'And' operator returns true if all the condition are true, while 'or' operator returns true if any of the condition returns true. 'Not; operator returns true if operand is false.

D. Application based questions - 

1. (a) Integer datatype
(b) Float datatype
(c) String datatype
2. #python code to display your name
name=input("Enter your name: ")
print(name)
3. #python code to input and display integer value
a=int(input("Enter any integer: "))
print("You have entered: ",a)
4. (i) -5
    (ii) 8, 16
5. #display the product of two number
a=int(input("Enter a number: "))
b=int(input("Enter another number: "))
print("Product of ",a, " and ",b," is ",a*b)

Comments

Popular posts from this blog

Q & A Chapter 1 | Internet Basics | Class 10 CBSE | Computer Application

 Q & A of Chapter 1 Internet Basics A. Tick the correct options – 1. (b) TCP/IP 2. (a) Internet Service Provider 3. (a) URL 4. (b) HTTP 5. (a) Bridge 6. (a) home page 7. (d) All of these 8. (b) Domain Naming System 9. (b) Rules 10. (d) ARPANET B. Very Short Answer Type Questions – 1. In the URL http://www.myfirm.co.in/about.html , what do the following components depict? (a) http                                                 (b) in (a) Http represents a type of server and the protocol on the Internet (b) ‘in’ represents the domain extension of the website. 2. In the URL http://www.favmusic.com/contactus.html what does www.favmusic stand for? www.favmusic represents the domain name i.e. favmusic in www. 3. What does FTP stands for? FTP stands for File Transfer Protocol. 4. Differentiate between webpage and home page. A webpage refers to an electronic page usually written in HTML. It may contain text, images, graphics or hyperlinks. Th

Q & A Chapter 2 | Internet Services | Class 10 CBSE | Computer Application

 Q & A of Chapter 2 A. Tick the correct option – 1. (b) Browser 2. (a) surfing 3. (a) downloading 4. (d) FTP 5. (b) e-mail 6. (c) chat 7. (a) @ 8. (c) Acronyms 9. (d) Emoticons 10. (a) newsgroup B. Very short answer questions – 1. Name a few search engines. Which is the most popular one? Some common search engines are Bing, Google, Ask, Yahoo and MSN. The most popular search engine is Google. 2. What is an Acronym of FTP? File Transfer Protocol. 3. What is a newsreader? Give an example. A newsreader is a software tool or utility used to browse through newsgroup postings. A very popular newsreader in use today is Microsoft Outlook Express. 4. Name three sites that support e-mail services. Gmail, Outlook and Yahoo are three sites that support e-mail services. 5. What is the difference between attachments and FTP? Attachments are the files which are send through an e-mail for communication, while in FTP transfer of files takes place between FTP server and FTP clients and no communicat

Bit by Bit | Chapter 6 - Graphics and Sound in QB64 | QBasic | Class 7 CBSE | Computer Application

Bit by Bit | Chapter 6 - Graphics and Sound in QB64 A. Tick the correct option. 1. (d) screen mode 0 2. (b) 640 x 350 3. (d) White 4. (a) Lower-Right 5. (c) PSET 6. (c) Generate a tone for a short duration B. Fill in the blanks. 1. CIRCLE 2. PAINT 3. PLAY 4. Graphic 5. Pixels 6. Box C. True or False. 1. True 2. False 3. False 4. True 5. True 6. True D. Answer the following questions. 1. What is the use of SCREEN statement? The SCREEN statement is used to set the screen mode for displaying graphics. There are many screen modes and each screen modes have their own number which is from SCREEN 1 to SCREEN 13. The various screen modes differ in resolution. 2. What is a pixel? How is it related to resolution? The graphics which is displaying on the computer screen is made up of thousands of dots called pixel. Pixel stands for picture element. The number of pixels in an image determines the resolution of the image. Higher the resolution, cleaner the image will appear. 3. What is the differenc