Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 11, 2021. It is now read-only.

Commit f39cf9a

Browse files
✨ Booleans
1 parent 7a00501 commit f39cf9a

15 files changed

+32
-18
lines changed

β€Ž05_Numbers/01_float_method.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Solution: float()
44
x = float(x)
55

6+
print(x)
67
'''
78
The float() method can be used to transform an int to float.
89
Read more here: https://www.w3schools.com/python/python_numbers.asp
9-
'''
10+
'''

β€Ž05_Numbers/02_int_method.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# Solution: int()
44
x = int(x)
55

6+
print(x)
7+
68
'''
79
The int() method can be used to transform a float to an int.
810
Read more here: https://www.w3schools.com/python/python_numbers.asp
9-
'''
11+
'''

β€Ž05_Numbers/03_numbers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Solution: complex()
44
x = complex(x)
55

6+
print(x)
67
'''
78
The complex() method can be used to transform an int to complex.
89
Read more here: https://www.w3schools.com/python/python_numbers.asp
9-
'''
10+
'''

β€Ž06_Strings/02_strings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Instructions: Get the first character of the string txt.
22
txt = "Hello World"
3-
# Solution:
3+
# Solution:
44
x = txt[0]
5-
6-
# More information here: https://www.w3schools.com/python/python_strings.asp
5+
print(x) # "H"
6+
# More information here: https://www.w3schools.com/python/python_strings.asp

β€Ž06_Strings/03_strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
txt = "Hello World"
33
# Solution:
44
x = txt[2:5]
5-
6-
# Read More Here: https://www.w3schools.com/python/python_strings.asp
5+
print(x)
6+
# Read More Here: https://www.w3schools.com/python/python_strings.asp

β€Ž06_Strings/04_strip_method.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Instructions: Return the string without any whitespace at the beginning or the end.
2-
txt = " Hello World "
2+
txt = " Hello World "
33
# Solution:
44
x = txt.strip()
5-
5+
print(x)
66
# Read More Here: https://www.w3schools.com/python/python_strings.asp

β€Ž06_Strings/05_upper_method.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
txt = "Hello World"
33
# Solution: upper() method convert the text to uppercase
44
txt = txt.upper()
5-
6-
# Read More Here: https://www.w3schools.com/python/python_strings.asp
5+
print(txt)
6+
# Read More Here: https://www.w3schools.com/python/python_strings.asp

β€Ž06_Strings/06_lower_method.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
txt = "Hello World"
33
# Solution: lower() method convert the text to lowercase
44
txt = txt.lower()
5-
6-
# Read More Here: https://www.w3schools.com/python/python_strings.asp
5+
print(txt)
6+
# Read More Here: https://www.w3schools.com/python/python_strings.asp

β€Ž06_Strings/07_replace_method.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
txt = "Hello World"
33
# Solution:
44
txt = txt.replace("H", "J")
5-
6-
# Read More Here: https://www.w3schools.com/python/python_strings.asp
5+
print(txt)
6+
# Read More Here: https://www.w3schools.com/python/python_strings.asp

β€Ž06_Strings/08_brackets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
# Solution:
44
txt = "My name is John, and I am {}"
55
print(txt.format(age))
6-
7-
# Read More Here: https://www.w3schools.com/python/python_strings.asp
6+
# Read More Here: https://www.w3schools.com/python/python_strings.asp

0 commit comments

Comments
(0)

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /