You are on page 1of 1

CETPA PYTHON LAB EXERCISES

TOPIC : USER INTERACTION


1. Print Hello world!
2. Print 5 adjacent Stars in Single Line using 5 print statements.
3. Print 5 space separated stars in Single line using 5 print statement.
4. Print the Nos 1 to 5 at screen with a gap of two lines in between using 5 print
statements.
5. Take two inputs from the user and check their data types.
6. Add Two float Numbers input by user.
7. Take variables a,b,c,d,e,f = 2,3,4,5,6,7 Run the following statements and
validate the outputs.
• print(a,b,c,d,e,f,sep="cetpa",end="*")

• print(a,b,c,sep="#",end="abc")
print(d,e,f,sep="\n")

• print(a,b,sep="#")
print(c,d,sep="\t\t\t",end="\n\n\n")
print(e,f)

• print(a,b,c)
print(d,sep="cetpa")
print(e,f,end="CETPA")

• print(a,b,c,sep="",end="456")
print(d,end="")
print(e,f,sep="$")

• print(a,b,c,sep="5",end="\t\t\t")
print()
print(d)
print(e,f,sep="",end="")

CETPA INFOTECH PVT. LTD. – No. 1 Training Company


Visit: www.cetpainfotech.com

You might also like