Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~ extra blank (space) & 's' #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/part-1/4-arithmetic-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ A string can be converted into an integer with the function `int`. The following
```python
input_str = input("Which year were you born? ")
year = int(input_str)
print(f"Your age at the end of the year 2021: {2021 - year}" )
print(f"Your age at the end of the year 2021: {2021 - year}")
```
<sample-output>

Expand All @@ -119,7 +119,7 @@ year = int(input("Which year were you born? "))
print(f"Your age at the end of the year 2021: {2021 - year}" )
```

Similarly, a string can be converted into a floating point number with the function `float`. This programs asks the user for their height and weight, and uses these to calculate their BMI:
Similarly, a string can be converted into a floating point number with the function `float`. This program asks the user for their height and weight, and uses these to calculate their BMI:

```python
height = float(input("What is your height? "))
Expand Down