Simple Python programs

Write a Python program to input 2 Integer number and find its Sum:

num1=int(input("Enter First Number "))
num2=int(input("Enter Second Number "))
ans=num1+num2
print("Sum is : ",ans)


Write a Python program to input 2 Float Number and Find its multiplication:

num1=float(input("Enter First Number "))
num2=float(input("Enter Second Number "))
ans=num1*num2
print("Product (multiplication ) is : ",ans)


Qus. 1 : What will be the output of the following pseudo code, where &amp; represent AND operation ?<br><pre>Integer a, b, c<br>Set b= 5, a = 1<br>c= a &amp; b<br>Print c</pre>

  1. 1
  2. 3
  3. 5
  4. 7
Qus. 2 : Which of the following is a feature of DocString?

  1. Provide a convenient way of associating documentation with Python modules, functions, classes, and methods.
  2. All functions should have a docstring.
  3. Docstrings can be accessed by the ___doc_attribute on objects.
  4. All of the mentioned.
Qus. 3 : <p>What will the following code output?</p><p> <pre>a=55 <br>b=55 <br>print( a is not b)</pre></p>

  1. True
  2. False
  3. 55
  4. TypeError

Programs

python program to input a welcome message and print it

View Solution


python program to print number of seconds in year

View Solution


Python program to calculate GST Goods and Service Tax

View Solution


python program to find the ASCII Value of entered character

View Solution


python program that display a joke but display the punch line only when the user presses enter key

View Solution


python program to generate the following output 5 10 9

View Solution


python program to print 5@10@9

View Solution


Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad