Posts

Showing posts from December, 2019

Program to insert a number from the user and tells the number is odd or even

Program to insert a number from the user and tells the number is odd or even source code print('Program to insert a number from the user and tells the number is odd or even') a = int(input('Enter a number = ')) print('your entered number is ',a) if a%2==0:     print("The entered number is even") else:          print("The entered number is odd")

Program for taking name and age from user and show them in which year they will move to 100 years

Program for taking name and age from user and show them in which year they will move to 100 years Source code print("Program for taking name and age from user and show them in which year they will move to 100 years") from datetime import datetime a = (input("Enter your Name = ")) print('Hello', a       ) b = int(input("Enter your age = ")) c = int((100-b) + datetime.now().year) print("You will turn to 100 years in = ", c )