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

Lab 2.01. The bonus seems out of place #420

Open
Dan-TEALS opened this issue Jun 27, 2022 Discussed in #330 · 0 comments
Open

Lab 2.01. The bonus seems out of place #420

Dan-TEALS opened this issue Jun 27, 2022 Discussed in #330 · 0 comments
Assignees
Labels
Bug IntroCS.2 Low Severity Cosmetic issue that doesn't affect usability of a lesson

Comments

@Dan-TEALS
Copy link
Contributor

Discussed in #330

Originally posted by jdonwells February 3, 2022
The bonus to lab 2.01 has to use conditional statements which the kids don't know yet.

So I changed it to this:
In your editor
Create a program that will take an input and print out that input multiplied by 2.
Does it work if you enter a float like 1.6? Can you fix it?
Make your program print the result as an integer, then as a float, and again as a string that is repeated twice.

Printing as an integer will require them to cast twice. 1.6*2 as an integer should print 3, not 2. Example solution:

number = input('Enter a number: ')
print(int(float(number) * 2))
print(float(number) * 2)
print(number * 2)
@Dan-TEALS Dan-TEALS added Bug IntroCS.2 Low Severity Cosmetic issue that doesn't affect usability of a lesson labels Jun 27, 2022
@Dan-TEALS Dan-TEALS self-assigned this Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IntroCS.2 Low Severity Cosmetic issue that doesn't affect usability of a lesson
Projects
None yet
Development

No branches or pull requests

3 participants