0% found this document useful (0 votes)
21 views4 pages

Computer Chap # 3 Notes NBF Class 11th-1

The document discusses the applications of computer programming in daily life, highlighting its role in social media, email services, and banking. It also provides Python programming examples for generating mathematical tables, checking odd numbers, and creating applications in web development, data science, and machine learning. Additionally, it covers basic list functions in Python and includes steps for using the debugger in IDLE.
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)
21 views4 pages

Computer Chap # 3 Notes NBF Class 11th-1

The document discusses the applications of computer programming in daily life, highlighting its role in social media, email services, and banking. It also provides Python programming examples for generating mathematical tables, checking odd numbers, and creating applications in web development, data science, and machine learning. Additionally, it covers basic list functions in Python and includes steps for using the debugger in IDLE.
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/ 4

Short Response Questions (SRQs)

Q1. What are the applications of computer programming in daily life?


Ans. Computer programming has become an integral part of our daily lives, influencing a vast
array of activities and industries. Here are some of the primary applications:
 Social Media Platforms like Facebook, Twitter, Instagram, and Linkedin are powered by
complex algorithms and code that enable us to connect with friends, family, and
professionals globally.
 Gmail, Outlook, and other email services rely on programming to manage the sending,
receiving, and organizing of emails efficiently.
 Banking apps and websites use programming to facilitate transactions, track account
balances, and ensure secure access to financial information.

Q2. Write code to take input a number from user and print its mathematical table on
screen from 1 to 10,
Ans. Program:
x = eval (input (‘Enter a number to get its table: '))
for i in range (10):
print (x, 'x’, i+1, '=', x* (i+1))

03. Take an odd number as input from the user, check if it is odd, otherwise ask the user
to reenter an odd number,
Ans. while True:
x = eval (input ('Enter an Odd Number: '))
if (x % 2! = 0):
print ("You Entered an Odd Number")
break
else:
print ("Number is Even, Re Enter the Number")
04. Write down the main examples of Python based application.
Ans. Following are some examples of python-based applications:
i. Web Development

a. Django: Instagram, Pinterest.


b. Flask LinkedIn, Netflix.
ii. Education

a. Jupyter Notebooks: Teaching and research.


b. Code Combat: Learning through games.

iii. Data Science

a. Pandas, NumPy: Data manipulation.


b. Matplotlib, Seaborn: Visualization.

iv. Machine Learning

a. TensorFlow, PyTorch: Deep learning.


b. Scikit-lean, Keras: ML libraries.

0.5 Differentiate between global and local variables with the help of suitable
Extended Response Questions (ERQs)
Q1. Explain the applications of Python in different business and technical domains.

Ans. Python is a versatile programming language widely used across various business and
technical domains due to its simplicity, readability, and extensive library support. Here are
some key applications:

i. Web Development
a. Frameworks: Django, Flask, Pyramid.
b. Use: Building robust websites, web applications.
c. Examples: Instagram, Pinterest, and Spotify use Django.

ii. Data Science and Analytics.


a. Libraries: Pandas, NumPy, SciPy.
b. Use: Data manipulation, statistical analysis, data cleaning.
c. Examples: Financial analysis, market research, data visualization.

iii. Machine Learning and Artificial Intelligence


a. Libraries: TensorFlow, PyTorch, Scikit-learn, Keras.
b. Use: Predictive analytics, natural language processing, image recognition.
c. Examples: Recommendation systems, fraud detection, autonomous vehicles.

iv. Game Development


a. Libraries: Pygame, Panda3D,
b. Use: Creating simple to moderately complex games.
c. Examples: Prototyping game ideas, educational games, small indie games.

v. Desktop Applications
a. Libraries: Tkinter, PyQt, Kivy.
b. Use: Building cross-platform desktop applications with graphical user interfaces.
c. Examples: Text editors, file management tools, custom utilities.

vi. Blockchain Development


a. Libraries: Web3.py, Brownie.
b. Use: Interacting with blockchain networks, developing and testing smart contracts.

Q2. What are basic functions that 'List' provides? Elaborate each of them with an example.
Ans. Len() Function
It provides with the total number of elements in a list
Min() Function
It is used to extract the smallest number from the elements in the list.
Max() Function
It is used to extract the largest number from the elements in the list.
Sum() Function
It sums up all the elements of the list.
Insert() Function
It inserts an element in the list.
Index() Function
It returns the position of the number in a list. In case of multiple occurrences of the
number, the placement of first match is returned.
Randint() Function
It is used to generate a random number in the given range.
03. Write a program for Dice Rolling Race Game for 2 Players.
Ans. Python Code
import random
target 100
p1, p2 = 0,0

while p1 < target and p2 < target:


p1+= random. randint(1, 6)
print("P1: {𝑝1})")

if p1 >= target:
print ("P1 wins!")
break
p2 += random.randint(1, 6)
print (f " P2 : {𝑝2}")

if p2 >= target:
print("P2 wins!")
break
Q.4 How to locate and select Debugger in IDLE? Write steps by taking an example into
consideration.
Ans. Step1: Open "Python IDLE" from start menu,
Step2: Write your computer program using python language.
Step3: From the IDLE menu Bar, Click on Debug option, Select "Debugger" from the
drop-down menu.
Step4: A window titled as ‘‘Debug Control’’ will pop-up on screen.
Step5: Notice a ‘‘Debug On’’ message on the shell prompt.
Step6: Watch variables and their corresponding values.

You might also like