You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Computations/Gravitational-Force.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Compute gravitational force between two objects.
6
6
## Hint
7
7
The formula for gravitational force is
8
8
9
-
**F = G m1m2/r2**
9
+
`F = G m^1m^2/r^2`
10
10
11
11
Here G is the gravitational constant. Its value is 6.673*10-11
12
12
@@ -31,13 +31,13 @@ print("The gravitational force is:", round(force, 5),"N")
31
31
## Explanation
32
32
The calculation is simple. Only two things need to be learned from this.
33
33
34
-
**Have a look, how we wrote 6.673*10-11**
34
+
`Have a look, how we wrote 6.673*10-^11`
35
35
36
-
> Also, note that while displaying the force, we used a round function. In the round function, we passed the force, the variable we want to display. Then we passed another parameter to tell, how many decimal points we want to display.
36
+
Also, note that while displaying the force, we used a round function. In the round function, we passed the force, the variable we want to display. Then we passed another parameter to tell, how many decimal points we want to display.
Copy file name to clipboardExpand all lines: Conversions/Decimal-to-binary.md
+6-17Lines changed: 6 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,17 +21,6 @@ While dividing, you will keep the remainder. These remainders will be used to bu
21
21
22
22
Then, reverse the order of the reminder, to get the binary number.
23
23
24
-
**Give me more: non-premium**
25
-
Let's say, you want to get the binary number of 233. You will start dividing by 2, store the remainder on a list. And then, set the number by the result of the division
26
-
27
-
So, if you divide 233 by 2, the result will be 116 and the remainder will be 1.
28
-
29
-
Keep doing it until the number becomes 0.
30
-
31
-
Then you will reverse the list.
32
-
33
-
Finally, you have to put the binary bits (0 and 1) in one number to get the final binary.
34
-
35
24
## Solution
36
25
I looked into the below code 7 times to understand. Still trying to figure it out...So, spend some time here to look at the code:
37
26
@@ -89,10 +78,10 @@ If you keep trying and revisiting , again and again, these will start making sen
89
78
90
79
## Quiz
91
80
92
-
1.What is a binary number?
93
-
2. Numbers written on a trash bin
94
-
3. Numbers that use 0,1 only
95
-
4. Numbers with any 2 digits
81
+
What is a binary number?
82
+
1. Numbers written on a trash bin
83
+
2. Numbers that use 0,1 only
84
+
3. Numbers with any 2 digits
96
85
97
86
<details>
98
87
<summary><b>Show Answer</b></summary>
@@ -105,7 +94,7 @@ Binary numbers use 0 and 1 only.
Copy file name to clipboardExpand all lines: Easy-ones/Floor-Division.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,10 @@ print(result)
27
27
When you divide one number by another you get two things. One is called the integer part of the division. Another is the remainder.
28
28
29
29
To get the quotient (result without the remainder), you can use two-division symbols.
30
-
30
+
```python
31
31
print(37//10)
32
+
37=3*10+7
33
+
```
32
34
33
35
## Think different
34
36
Another alternative approach is to use the floor method from the math module. If you pass a number with a fraction to the math.floor function, it will return you the integer part of the number.
0 commit comments