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 & represent AND operation ?<br><pre>Integer a, b, c<br>Set b= 5, a = 1<br>c= a & b<br>Print c</pre>
- 1
- 3
- 5
- 7
- Provide a convenient way of associating documentation with Python modules, functions, classes, and methods.
- All functions should have a docstring.
- Docstrings can be accessed by the ___doc_attribute on objects.
- All of the mentioned.
- True
- False
- 55
- TypeError
Programs
python program to input a welcome message and print it
python program to print number of seconds in year
Python program to calculate GST Goods and Service Tax
python program to find the ASCII Value of entered character
python program that display a joke but display the punch line only when the user presses enter key
python program to generate the following output 5 10 9
python program to print 5@10@9