Introduction

This commit is contained in:
Asabeneh 2020-07-09 12:12:41 +03:00
parent a4b0a6b0a5
commit 93e3fa4d56
3 changed files with 21 additions and 12 deletions

View File

@ -1,5 +1,5 @@
<div align="center">
<h1> 30 Days Of Python: Day 2 - Variables</h1>
<h1> 30 Days Of Python: Day 2 - Variables, Builtin Functions</h1>
<a class="header-badge" target="_blank" href="https://www.linkedin.com/in/asabeneh/">
<img src="https://img.shields.io/badge/style--5eba00.svg?label=LinkedIn&logo=linkedin&style=social">
</a>
@ -21,13 +21,15 @@
![30DaysOfPython](../images/30DaysOfPython_banner3@2x.png)
- [📘 Day 2](#%f0%9f%93%98-day-2)
- [📘 Day 2](#-day-2)
- [Built in functions](#built-in-functions)
- [Variables](#variables)
- [Data Types](#data-types)
- [Checking Data types and Casting](#checking-data-types-and-casting)
- [Numbers](#numbers)
- [💻 Exercises - Day 2](#%f0%9f%92%bb-exercises---day-2)
- [💻 Exercises - Day 2](#-exercises---day-2)
- [Exercises: Level 1](#exercises-level-1)
- [Exercises: Level 2](#exercises-level-2)
# 📘 Day 2
@ -252,8 +254,12 @@ Number data types in python:
Example:
1 + j, 2 + 4j, 1 - 1j
🌕 You are awesome. You have just completed day 2 challenges and you are two steps ahead on your way to greatness. Now do some exercises for your brain and for your muscle.
## 💻 Exercises - Day 2
### 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
@ -267,10 +273,13 @@ Number data types in python:
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
14. Check the data type of all your variables using type() built-in function
15. Using the _len()_ built-in function find the length of your first name
16. Compare the length of your first name and your last name
17. Declare 5 as num_one and 4 as num_two
### Exercises: Level 2
1. Check the data type of all your variables using type() built-in function
1. Using the _len()_ built-in function find the length of your first name
1. Compare the length of your first name and your last name
1. Declare 5 as num_one and 4 as num_two
1. Add num_one and num_two and assign the value to a variable \_total
2. Subtract num_two from num_one and assign the value to a variable \_diff
3. Multiply num_two and num_one and assign the value to a variable \_product
@ -278,12 +287,12 @@ Number data types in python:
5. Use modulus division to find num_two divided by num_one and assign the value to a variable \_remainder
6. Calculate num_one to the power of num_two and assign the value to a variable \_exp
7. Find floor division of num_one by num_two and assign the value to a variable \_floor_division
18. The radius of a circle is 30 meters.
1. The radius of a circle is 30 meters.
1. Calculate the area of a circle and assign the value to a variable _area_of_circle_
2. Calculate the circumference of a circle and assign the value to a variable _circum_of_circle_
3. Take radius as user input and calculate the area.
19. 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
20. Run help('keywords') in python shell or in your file to check for the reserved words
1. 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
1. Run help('keywords') in python shell or in your file to check for the reserved words
🎉 CONGRATULATIONS ! 🎉

View File

@ -23,7 +23,7 @@
</div>
[Day 2 >>](./02_Day_Variables/02_variables.md)
[Day 2 >>](./02_Day_Variables_builtin_functions)
![30DaysOfPython](./images/30DaysOfPython_banner3@2x.png)
@ -394,4 +394,4 @@ To run the python file check the image below. You can run the python file either
🎉 CONGRATULATIONS ! 🎉
[Day 2 >>](./02_Day_Variables/02_variables.md)
[Day 2 >>](./02_Day_Variables_builtin_functions)