This exercise is to understand the basic concepts of python.
1.For the below questions write what is the result and give a reason why that is the result.
1.a) abc=123
1.b) abc*2
1.c) print(abc)
1.d) none
1.e) break = abc
1.f) print(Break)
1.g)print("The value of break is",break)
1.h) Name = 'Saitech Informatics'
1.i) Name
1.j) print(name)
1.k)Name *2
2. In the below program, identify the components asked
# Python program to find the multiplication table (from 1 to 10)
num = 12
# To take input from the user
# num = int(input("Display multiplication table of? "))
# use for loop to iterate 10 times
for i in range(1, 11):
print(num,'x',i,'=',num*i)
2.a) Number of expressions in the above code and what are the list of expressions
2.b) What are the statements in the above code
2.c) Number of functions in the above code
3. Following code intends to obtain a number in variable x and then print its 5 multiples. example :x,2x,3x,4x and 5x. Fill the below code and write the output.
x=________(input('___________'))
firstmultiple = ________
secondmultiple = _______
thirdmultiple = x * 3
fourthmultiple=_________
fifthmultiple=___________
print('x=',________)
print(_________________________________________)
4.Create data of following types using value 22. Give 2 examples foreach type of data.
4.a) Floating Point
4.b) Integer
4.c) Complex number
5. Write a program to get input of 10 numbers and print them in a reverse order.
Hint : You can use List, Integer or any functions or methods.
1.For the below questions write what is the result and give a reason why that is the result.
1.a) abc=123
1.b) abc*2
1.c) print(abc)
1.d) none
1.e) break = abc
1.f) print(Break)
1.g)print("The value of break is",break)
1.h) Name = 'Saitech Informatics'
1.i) Name
1.j) print(name)
1.k)Name *2
2. In the below program, identify the components asked
# Python program to find the multiplication table (from 1 to 10)
num = 12
# To take input from the user
# num = int(input("Display multiplication table of? "))
# use for loop to iterate 10 times
for i in range(1, 11):
print(num,'x',i,'=',num*i)
2.a) Number of expressions in the above code and what are the list of expressions
2.b) What are the statements in the above code
2.c) Number of functions in the above code
3. Following code intends to obtain a number in variable x and then print its 5 multiples. example :x,2x,3x,4x and 5x. Fill the below code and write the output.
x=________(input('___________'))
firstmultiple = ________
secondmultiple = _______
thirdmultiple = x * 3
fourthmultiple=_________
fifthmultiple=___________
print('x=',________)
print(_________________________________________)
4.Create data of following types using value 22. Give 2 examples foreach type of data.
4.a) Floating Point
4.b) Integer
4.c) Complex number
5. Write a program to get input of 10 numbers and print them in a reverse order.
Hint : You can use List, Integer or any functions or methods.