NATIONAL UNIVERSITY OF SCIENCE AND TECHNOLOGY
FACULTY OF APPLIED SCIENCES
DEPARTMENT OF INFORMATICS AND ANALYTICS
PROGRAMMING CONCEPTS AND DEVELOPMENT USING PYTHON SIA 1204
1a) Fix the syntax error in this code:
print "Welcome to Python!"
b) What will be the output of this code?
x = 10
y=5
print (x + y)
c) What data type is used in the following variables?
age = 25
height = 5.9
is_student = True
d) Convert the string "123" into an integer and print its type.
e) What is the result of 5 * 2 - 3?
f) Write a program that takes two numbers from the user and prints their sum, difference, product.
g) What will be the output of:
print (10 // 3)
print (10 % 3)