Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
155 views

Python assignment

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views

Python assignment

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT

1) Write a Python program that asks the user for their name, age,
and height. Then, print these values and display the data type
of each input.
2) Write a Python program that takes two numbers as input and
performs addition, subtraction, multiplication, and division on
them.
3) Write a Python program that asks the user to enter their first
name and last name, and then prints a message saying "Hello,
[first name] [last name]!".
4) Write a Python program that asks the user to enter their
favorite number, then print a message that says "Your favorite
number is [number]".
5) Write a Python program that takes two inputs from the user:
their birth year and the current year. Calculate and print the
user's age.
6) Write a Python program that calculates the square and cube of
a given number using the exponentiation operator (**).
7) Take a user input values and find the area of rectangle and print
that area.
8) Take user input value and find the area of square and print that
area of square.
9) Take a user input value and find the area of circle and print the
area of circle (3.14)

You might also like