File tree Expand file tree Collapse file tree 4 files changed +51
-8
lines changed Expand file tree Collapse file tree 4 files changed +51
-8
lines changed Original file line number Diff line number Diff line change 22## 1.2: Math Power
33
44** S-1: The problem**
5-
65Take two numbers from the users. Calculate the result of second number power of the first number.
76
87<details >
@@ -42,5 +41,8 @@ print('Your result is: ', result)
4241** [ Try It:] ( /# ) **
4342
4443  ;
45- ###### tags: ` programmig-hero ` ` python ` ` float ` ` int `
44+ [ ![ Next Page] ( ../assets/next-button.png )] ( Random-Number.md )
45+   ;
46+
47+ ###### tags: ` programmig-hero ` ` python ` ` float ` ` int ` ` math `
4648
Original file line number Diff line number Diff line change 1+
2+ ## 1.3: Create a random number
3+
4+ ** S-1: The problem**
5+ Create a random number between 0 to 10
6+
7+ <details >
8+ <summary ><b >S-2: Click Here For Show Hints</b ></summary >
9+ <p >To create a random number, you have to import a built-in library named random. And then you can call the randint method on it</p >
10+ </details >
11+ <br >
12+
13+ ##### result = 4** 3
14+
15+
16+ #### S-3: Solution
17+
18+ ``` python
19+ import random
20+
21+ random_num = random.randint(0 ,10 )
22+ print (random_num)
23+ ```
24+
25+ ** [ Try It:] ( /# ) **
26+   ;
27+
28+ #### S-4: Quiz
29+ How will you generate a random integer number?
30+
31+ 1 . math.random
32+ 2 . math.randint
33+ 3 . random.randomint
34+
35+ ** The answer is: 2**
36+
37+ * S-5: Take Away*
38+
39+ Use math.randomint to get a random integer.
40+
41+   ;
42+ [ ![ Next Page] ( ../assets/next-button.png )] ( # )
43+   ;
44+
45+ ###### tags: ` programmig-hero ` ` python ` ` float ` ` int ` ` math `
Original file line number Diff line number Diff line change 44### 1.1: User input to Number
55
66** S-1: The problem**
7-
87Take two inputs from the user. One will be an integer. The other will be a float number. Then multiply them to display the output.
98
109<details >
@@ -41,11 +40,9 @@ print('Your result is: ', result)
4140** [ Try It:] ( /# ) **
4241  ;
4342#### S-5: Going Forward
44-
4543Going forward, we will write input and conversion in one line.
4644
4745#### S-6: Quiz
48-
4946Which one is used to convert string to a number?
5047
5148
@@ -60,7 +57,6 @@ Which one is used to convert string to a number?
6057
6158Use int or float to convert user input to a number.
6259  ;
60+ [ ![ Next Page] ( assets/next-button.png )] ( /Easy-ones/Math-Power.md )
61+   ;
6362###### tags: ` programmig-hero ` ` python ` ` float ` ` int `
64-
65-
66- [ ![ Next Page] ( assets/next-button.png )] ( /Easy-ones/Math-Power.md )
You can’t perform that action at this time.
0 commit comments