0% found this document useful (0 votes)
2 views2 pages

First Year Computer Chapter2 Python Notes

This document provides an overview of Chapter 2 of a First Year Computer Science course focused on Python programming. It includes short questions and answers about Python concepts, solved programs demonstrating basic operations, and important multiple-choice questions. Key topics covered are Python's definition, variables, data types, comments, and simple programming examples.
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)
2 views2 pages

First Year Computer Chapter2 Python Notes

This document provides an overview of Chapter 2 of a First Year Computer Science course focused on Python programming. It includes short questions and answers about Python concepts, solved programs demonstrating basic operations, and important multiple-choice questions. Key topics covered are Python's definition, variables, data types, comments, and simple programming examples.
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

First Year Computer Science - Chapter 2 Python

Programming

This PDF contains short questions, MCQs, and solved Python programs for First Year Computer Science Chapter 2.

Short Questions

Q: What is Python?
Ans: Python is a high level programming language.

Q: What is a Variable?
Ans: A variable is used to store data.

Q: What are Data Types?


Ans: Common data types are int, float, str, and bool.

Q: What is a Comment?
Ans: Comments explain code and start with #.

Solved Programs

Hello World

print("Hello World")

Addition of Two Numbers

a = 5
b = 3
print(a + b)

Square of Number

num = int(input("Enter number: "))


print(num * num)

Area of Rectangle

length = int(input("Enter length: "))


width = int(input("Enter width: "))
print(length * width)

Important MCQs

Question Correct Answer


Python is a ____ language. High level language
Comments in Python start with? #
Which function displays output? print()

You might also like