Assignment 123123
Assignment 123123
CHAPTER 4: PROGRAMMING
ASSIGNMENT 2: BUILT-IN FUNCTIONS
1. Write a program that asks the user to enter their age
in years as input (assume that the user enters a
positive integer) and calculates and prints how old
the user is in terms of days. Assume that there are
365 days in a year.
For example: if the user enters 22
Sample Output You are 8030 days old
2. Write a program that asks the user to enter two float
numbers and display output in following format:
Sample Output:
a b a+b a-b a*b a/b sqrt(a)
5.5 4.0 9.5 1.5 22.0 1.38 2.345
3. Write a Python program to display the current date
and time.
Sample Output:
Current date and time
Tuesday, 23/10/2019, 13:15:20