Introuduction of C
C++
Java
Python Basic Programs Questions
1)Write a program that take a word W as input and prints "Hello" followed by the given word W
#Write a program that take a word W as input and prints "Hello" followed by the given word W
W=input()
print("Hello"+" "+W)
2)#Write a program that reads a single line of input and print the given input
s=input()
print(s)
3)#For this problem, you need to write code to read a single line of input and print the line
#after the message "Given Input:"
s=input()
print("Given input: "+s)
4)# for this problem, you need to write code to read two lines of input and print the second line
#of input
d=input()
d=input()
print(d)
5)#Write a program that reads two lines of input and prints those two lines in the reverse order
#.(Print the message given in the second line of input before the first line of input)
s=input()
d=input()
print(d)
print(s)
6)#Write a program to print the given input world three times in a single line seperated by
#spaces
s=input()
print((s +" ")*3)
7)#Write a program to reverse the digits of a given two-digit number
i=input()
print(i[1]+i[0])
8)# write a program to print the sum of two integeres inputs A and B
a=input()
a=int(a)
b=input()
b=int(b)
print(a+b)
9)#Given a word W and an integer N, write a program to print the character present at the
#index N in the word W
n=input()
m=input()
m=int(m)
print(n[m])
10)#Write a program which prints the last character of given word
n=input()
lenght=len(n)
msg=n[lenght-1: ]
print(msg)
11)# Write a program which prints the first half of the given input string. you can assume
#that the length of the input string will always be an even number
i=input()
lenght=len(i)
n=int(lenght/2)
msg=i[0: n]
print(msg)
12)# Given a word and a number N, write a program to print the given word, N number of times
#in a single line
i=input()
n=input()
n=int(n)
print(str(i*n))
13)#Given a word and a number N, write a program to print the last three characters of the word
#N times in a single line
i=input()
n=input()
n=int(n)
lenght=len(i)
msg=i[-3: ]
print(str(msg*n))
14)#Given a word and a number(N), write a program to print the last three characters of word
# N times in a single line.
i=input()
n=input()
n=int(n)
lenght=len(i)
msg=i[-3: ]
print(str(msg*n))
15)# Write a program that prints the sum of the digits of a given three digit number
i=input()
m1=i[0:1]
m1=int(m1)
m2=i[1:2]
m2=int(m2)
m3=i[2:3]
m3=int(m3)
n=m1+m2+m3
print(n)
PHP
Laravel
Dot Net
Web Designing
My Sql
Ms Sql
Oracle(SQL, PLSQL)
MS-Office
DTP
Live Projects