Aict 3
Aict 3
AICT
SECTION B
ASSIGNMENT 03
CE-141T Applications of Information and Communication Technologies & Programming
Bloom’s
Sr. No. Course Learning Outcome PLO
Taxonomy
Apply the concepts of object-oriented paradigm. Rewrite PLO_2
C3
CLO 3 basic programs of I/O and control structures using python. (Problem Analysis)
Applying
Take input for force (in Newtons) and area (in m²)
Stress=Force/Area
Solution:
Use the math module to calculate the two real roots and display them
Solution:
import math
a = float(input("Enter a: "))
b = float(input("Enter b: "))
c = float(input("Enter c: "))
discriminant = b**2 - 4*a*c
text = "CIVIL"
print(“text”)
print(text)
print(text[0])
print(text[2:5])
print(text[2:])
print(text * 2)
print(text + "ENGG")
Q4. The following Python code contains errors. Identify and correct them.
message = "ENGINEER"
print message
print(message + 2)
Solution:
message = "ENGINEER"
print(message) ◇Add parentheses for print (Python 3 syntax)
print(message + "2") ◇ Convert number to string before concatenation