thecrazyprogrammer.com thecrazyprogrammer.com

Solve “control reaches end of non-void function” Error

Hello everyone, In this article, we are going to discuss a common problem faced by beginners and also experienced programmers. Often when we run into the warning saying warning: control reaches end of non-void function. Generally, we ignore this error because most of the time as the program still runs the same even if this warning is coming. Let’s first see a simple example then this kind of error can occur.#include...

thecrazyprogrammer.com thecrazyprogrammer.com

Solve “ValueError: invalid literal for int() with base 10” in Python

Hello everyone, So today we’re going to see the possible reasons and solutions for the error “ValueError: invalid literal for int() with base 10” in Python. The main reason for this error is that in our program, we’re passing a non-integer value to a place where the interpreter expects an integer value. To understand the above lines, let’s take an example.age = int(input("Enter your age: "))When you run the above...