Skip to main content

Questions tagged [input]

The tag has no usage guidance.

2 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

Test code with sample input file

I'm working on some Python dictionary practice, and I have a bunch of info to toe in as user input to populate my dictionaries so that I can use debug50 and test the code. It's time consuming. How do ...
Joseph J Filoramo's user avatar
0 votes
1 answer
23 views

Prints " Invalid vote " for " code 1 " as vote function But works fine for " code 2 " as vote function. Whats wrong with " code 1 "?

// CODE 1 :- bool vote(string name) { // TODO for (int i = 0; i < candidate_count; i++) { if ( candidates[i].name == name ) { candidates[i].votes = candidates[i].votes + 1 ; return true ; } } ...
Shubham Thori's user avatar