logo codesdope
Level 1
1.
Print anything you want on the screen.
Answer
print "I want to be a programmer"
									

2.
Store three integers in x, y and z. Print their sum.
Answer
x = 10
y = 15
z = 20
print x+y+z
									

3.
Store three integers in x, y and z. Print their product.
Answer
x = 5
y = 10
z = 20
print x*y*z
									

Print again

4.
Check type of following:
"CodesDope"
15
16.2
9.33333333333333333333
Answer
print type("CodesDope")
print type(15)
print type(16.2)
print type(9.33333333333333333333)
									

5.
Join two string using '+'.
E.g.-"Codes"+"Dope"
Answer
print "Codes"+"Dope"
									

6.
Store two values in x and y and swap them.
Answer
x = 10
y = 20
x,y = y,x
print x
print y
									
Doubt? Ask question
Close

Welcome.please sign up.

Close

Welcome.please login.