[Bug]: Python Challenge 2.1 Display number of dots for a given number of cards #2595
Open
1 task done
Labels
bug
Something isn't working
Description of the bug
Hello,
The hint here says:
"""
In this challenge, use the input() function to receive input from the user. Place text inside the brackets of input with your question. The user input will be stored whichever variable you assign it to. Set the value of variable number_of_cards to the input you received. Use a for loop, repeating the blocks inside (displaying the number of dots) number_of_cards times.
"""
But you need to convert to integer before you can loop through the value. I think it's missing and can be confusing. It should say:
"""
In this challenge, use the input() function to receive input from the user. Place text inside the brackets of input with your question. The user input will be stored whichever variable you assign it to. Set the value of variable number_of_cards to the input you received, then use int() to convert the string to a number. Use a for loop, repeating the blocks inside (displaying the number of dots) number_of_cards times.
"""
Thanks for this amazing project,
T
Steps To Reproduce
number_of_cards = input("Number of cards?")
number_of_dots = 1
for num in range(number_of_cards):
print(number_of_dots)
number_of_dots *= 2
What device/software are you seeing this problem on?
No response
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: