Skip to content

Ravi203a/Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Python

''' Exercises: Level 1


  1. Inside 30DaysOfPython create a folder called day_2. Inside this folder create a file named variables.py
  2. Write a python comment saying 'Day 2: 30 Days of python programming'
  3. Declare a first name variable and assign a value to it
  4. Declare a last name variable and assign a value to it
  5. Declare a full name variable and assign a value to it
  6. Declare a country variable and assign a value to it
  7. Declare a city variable and assign a value to it
  8. Declare an age variable and assign a value to it
  9. Declare a year variable and assign a value to it
  10. Declare a variable is_married and assign a value to it
  11. Declare a variable is_true and assign a value to it
  12. Declare a variable is_light_on and assign a value to it
  13. Declare multiple variable on one line

Exercises: Level 2


  1. Check the data type of all your variables using type() built-in function
  2. Using the len() built-in function, find the length of your first name
  3. Compare the length of your first name and your last name
  4. Declare 5 as num_one and 4 as num_two
  5. Add num_one and num_two and assign the value to a variable total
  6. Subtract num_two from num_one and assign the value to a variable diff
  7. Multiply num_two and num_one and assign the value to a variable product
  8. Divide num_one by num_two and assign the value to a variable division
  9. Use modulus division to find num_two divided by num_one and assign the value to a variable remainder
  10. Calculate num_one to the power of num_two and assign the value to a variable exp
  11. Find floor division of num_one by num_two and assign the value to a variable floor_division
  12. The radius of a circle is 30 meters.
  13. Calculate the area of a circle and assign the value to a variable name of area_of_circle
  14. Calculate the circumference of a circle and assign the value to a variable name of circum_of_circle
  15. Take radius as user input and calculate the area.
  16. Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names
  17. Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords '''

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors