filmov
tv
Absolute Beginners Programming Solution using Python(1-10)
Показать описание
Hey guys, Welcome to FORMAL INFINITY Channel, In this video we would discuss the solution for Codekata programing problems using python in Guvi. In this specific video we have discussed Input and Output related problems in Guvi. We would continue this series of video for covering all the topics under codekata.
If you find our videos useful, please like or comment and don't forget to subscribe our channel to follow frequent videos and regular updates posted in our channel.
And If you haven't checked Playlists available in our channel, The link for all the available playlists is given below:
___________________________________________________________
Question_1:-
You are given three numbers A, B & C. Print the largest amongst these three numbers.
Sample Input :
1
2
3
Sample Output :
3
*****************
arr = []
for i in range(3):
print(max(arr))
___________________________________________________________
Question_2:-
You are given with a number "N", find its cube.
Sample Input :
2
Sample Output :
8
*******************
N = int(input())
print(N**3)
___________________________________________________________
Question_3:-
You are given with a number A i.e. the temperature in Celcius. Write a program to convert this into Fahrenheit.
Sample Input :
12
Sample Output :
53.60
*******************
temp = int(input())
far = 1.8*(temp)+32
print(round(far,2))
___________________________________________________________
Question_4:-
You are given Two Numbers, A and B. If C = A + B. Find C.
Sample Input :
1
1
Sample Output :
2
********************
A = int(input())
B = int(input())
print(round(A+B,1))
___________________________________________________________
Question_5:-
You are given A = Length of a rectangle & B = breadth of a rectangle. Find its area “C”.
(A and B are natural numbers)
Sample Input :
2
3
Sample Output :
6
*******************
A = int(input())
B = int(input())
print(round(A*B,1))
___________________________________________________________
Question_6:-
The area of an equilateral triangle is ¼(√3a2) where "a" represents a side of the triangle. You are provided with the side "a". Find the area of the equilateral triangle.
Sample Input :
20
Sample Output :
173.21
********************
a = float(input())
area = 0.25*((3**0.5)*(a**2))
print(round(area,2))
___________________________________________________________
Question_7:-
You are provided with a number "N", Find the Nth term of the series: 1, 4, 9, 16, 25, 36, 49, 64, 81, .......
(Print "Error" if N = negative value and 0 if N = 0).
Sample Input :
18
Sample Output :
324
*********************
N = int(input())
print(N**2)
___________________________________________________________
Question_8:-
You are provided with a number, "N". Find its factorial.
Input Description:
A positive integer is provided as an input.
Output Description:
Print the factorial of the integer.
Sample Input :
2
Sample Output :
2
*********************
N = int(input())
product = 1
for i in range(1,N+1):
product *= I
print(product)
___________________________________________________________
Question_9:-
Write a code to get the input and print it 5 times.
Input Description:
A single line contains an integer N.
Output Description:
Output contains 5 lines with each line having the value N.
Sample Input :
4
Sample Output :
4
4
4
4
4
**********************
a = int(input())
for i in range(5):
print(a)
___________________________________________________________
Question_10:-
You are given a number A in Kilometers. Convert this into B: Meters and C: Centi-Metres.
Input Description:
A number "A" representing some distance in kilometer is provided to you as the input.
Output Description:
Convert and print this value in meters and centimeters.
Sample Input :
2
Sample Output :
2000
200000
**********************
A = int(input())
print(A*1000)
print(A*100000)
________________________________________________
If you find our videos useful, please like or comment and don't forget to subscribe our channel to follow frequent videos and regular updates posted in our channel.
And If you haven't checked Playlists available in our channel, The link for all the available playlists is given below:
___________________________________________________________
Question_1:-
You are given three numbers A, B & C. Print the largest amongst these three numbers.
Sample Input :
1
2
3
Sample Output :
3
*****************
arr = []
for i in range(3):
print(max(arr))
___________________________________________________________
Question_2:-
You are given with a number "N", find its cube.
Sample Input :
2
Sample Output :
8
*******************
N = int(input())
print(N**3)
___________________________________________________________
Question_3:-
You are given with a number A i.e. the temperature in Celcius. Write a program to convert this into Fahrenheit.
Sample Input :
12
Sample Output :
53.60
*******************
temp = int(input())
far = 1.8*(temp)+32
print(round(far,2))
___________________________________________________________
Question_4:-
You are given Two Numbers, A and B. If C = A + B. Find C.
Sample Input :
1
1
Sample Output :
2
********************
A = int(input())
B = int(input())
print(round(A+B,1))
___________________________________________________________
Question_5:-
You are given A = Length of a rectangle & B = breadth of a rectangle. Find its area “C”.
(A and B are natural numbers)
Sample Input :
2
3
Sample Output :
6
*******************
A = int(input())
B = int(input())
print(round(A*B,1))
___________________________________________________________
Question_6:-
The area of an equilateral triangle is ¼(√3a2) where "a" represents a side of the triangle. You are provided with the side "a". Find the area of the equilateral triangle.
Sample Input :
20
Sample Output :
173.21
********************
a = float(input())
area = 0.25*((3**0.5)*(a**2))
print(round(area,2))
___________________________________________________________
Question_7:-
You are provided with a number "N", Find the Nth term of the series: 1, 4, 9, 16, 25, 36, 49, 64, 81, .......
(Print "Error" if N = negative value and 0 if N = 0).
Sample Input :
18
Sample Output :
324
*********************
N = int(input())
print(N**2)
___________________________________________________________
Question_8:-
You are provided with a number, "N". Find its factorial.
Input Description:
A positive integer is provided as an input.
Output Description:
Print the factorial of the integer.
Sample Input :
2
Sample Output :
2
*********************
N = int(input())
product = 1
for i in range(1,N+1):
product *= I
print(product)
___________________________________________________________
Question_9:-
Write a code to get the input and print it 5 times.
Input Description:
A single line contains an integer N.
Output Description:
Output contains 5 lines with each line having the value N.
Sample Input :
4
Sample Output :
4
4
4
4
4
**********************
a = int(input())
for i in range(5):
print(a)
___________________________________________________________
Question_10:-
You are given a number A in Kilometers. Convert this into B: Meters and C: Centi-Metres.
Input Description:
A number "A" representing some distance in kilometer is provided to you as the input.
Output Description:
Convert and print this value in meters and centimeters.
Sample Input :
2
Sample Output :
2000
200000
**********************
A = int(input())
print(A*1000)
print(A*100000)
________________________________________________
Комментарии