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

Introduce elif concept #59

Open
khoivan88 opened this issue Mar 26, 2020 · 2 comments
Open

Introduce elif concept #59

khoivan88 opened this issue Mar 26, 2020 · 2 comments

Comments

@khoivan88
Copy link
Contributor

khoivan88 commented Mar 26, 2020

Hi, thank you for the tutorial. I just have a suggestion on the use of elif clause instead of just if clause in this block:
https://github.com/MolSSI-Education/python_scripting_cms/edit/gh-pages/_episodes/02-file_parsing.md#L256-L268

...
for line in saptlines:
    if 'Electrostatics    ' in line:
        electro_line = line
        important_lines.append(electro_line)
    if 'Exchange       ' in line:
        exchange_line = line
        important_lines.append(exchange_line)
    if 'Induction      ' in line:
        induction_line = line
        important_lines.append(induction_line)
    if 'Dispersion     ' in line:
        dispersion_line = line
        important_lines.append(dispersion_line)
...
khoivan88 added a commit to khoivan88/python_scripting_cms that referenced this issue Mar 26, 2020
to avoid introducing too many new concepts. Introduce in this issue [MolSSI-Education#59](MolSSI-Education#59)
@janash
Copy link
Member

janash commented Mar 26, 2020

Thank you! I think we may be able to introduce elif (and else in lesson 1 under the heading "making choices"). We use an if statement to get number less than 0, elif could be used to capture numbers equal to zero, and else to get all else.

https://github.com/MolSSI-Education/python_scripting_cms/edit/gh-pages/_episodes/01-introduction.md#L344-384

@Nandini1071
Copy link

is this issue still open ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants