Intro to programming, Part 2, Exercise - Number of characters

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
testing-qa

Research direction

Review the exercise statement and its existing testing setup, which the issue identifies as accepting the shown program. Check how the character-count condition is evaluated; done means a program that only accepts three or more characters no longer passes, while the stated more-than-one-character behavior does.

Written by the indexing model from the issue text.

Description

Task asked for "Please write a program which asks the user for a word and then prints out the number of characters, if there was more than one typed in."

during testing i thought it said 3 characters so wrote this code:

input_word = str(input("Please type in a word:"))
letters = len(input_word)
if letters >= 3:
print(f"There are {letters} letters in the word {input_word}")
print("Thank you!")

This passed the testing, yet doesn't actually solve the problem!

Dominant language
JavaScript
Stars
77
Forks
30
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rage/programming-26

All issues in rage/programming-26

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.