Professional Documents
Culture Documents
ASSIGNMENT
ASSIGNMENT
ASSIGNMENT
SUBJECT
COMPUTER PROGRAMMING
CREDIT
3
HOUR
LECTURER PUNITHA TURUMUGON
ASSESSMENT ASSIGNMENT
NAME Miraj Md
ID NUMBER EB0986842
Section A
Use loop concept to solve the following questions.
a. Using loop, print the multiples of 6 from 350 down to 6.
ANS:
for num in range(350,5,-1):
if num % 6==0:
print(num)
d.Write a program to ask for a name until the user enters END. Print the name each time.
When you are done, print "I am done."
ANS:
while True:
ask=input("What is your name?")
if ask=="END":
break
print("I am done" )
e. Write a program which gives a multiplication table as per request by the user. Ask for
the input for which the user wants the multiplication table and display the table. The
output should be like below.
ANS:
num=3
#to take input from user
#num = int(input("display multiple table of?"))
# iterate 10 times from i=1 to 3
for i in range (1,13):
print(num, 'x', i, '=',num*i)