Most voted "function" questions
The function (also called procedure, method, subprogram, or routine) is a portion of code intended to perform a single, specific task.
Learn more…1,309 questions
Sort by count of
-
-4
votes1
answer76
viewsProblems in PYTHON end result
I am a beginner in Python and I am developing a calculator, creating a class, within it there are 4 functions, being the 4 operations. And in the main only the basic input. My goal in this program…
-
-4
votes1
answer86
viewsError when calling a function, Cannot set Property 'src' of null
Hello, I’m doing a project for study. When I call the function, the code presents an error. The only thing I want to do in this function is just swap one image for the other when clicking and so…
-
-5
votes2
answers443
viewsThe "pay()" function does not return the correct result
I have the following statement: A parking lot charges a minimum fee of R$2.00 to park by three hours. An additional R$0.50 per hour does not necessarily is charged after the first three hours. The…
-
-5
votes3
answers59
viewsHow to create a function that divides two numbers into C?
How to create a function that divides two numbers into C?
-
-5
votes1
answer835
viewsFunction that converts string to lowercase and compares
struct registro{ /*Estrutura para guardar os dados do usuário*/ char usuario[50]; }atual[1000], *ptr; main() { int v = 0; verific = 0; //posicao e variavel para comp. de string volta_usuario:…
-
-5
votes3
answers111
viewsHow to do a function to calculate and alert the number of lamps needed to illuminate a particular room
function alertarNumeroDeLampadas(){ var potencia = prompt ("Digite o valor da potência da lâmpada em watts: "); var largura = prompt ("Digite o valor da largura do local(Metros): "); var comprimento…
-
-5
votes2
answers161
viewsComplete the URL
Create a function called domain that will receive a String br.NOMEDOSITE.com and its function will be to return "http://br.NOMEDOSITE.com". I did so: function dominio ("br.NOMEDOSITE.com" ){…
-
-5
votes5
answers266
viewsHow to create a function that repeats a certain value
I want to create a function that takes two values, the first will be any word, and the second will be the amount of times the system will print that word. var valor = "palavra" // exemplo var qtd =…
-
-5
votes1
answer43
viewsI have a script that I enter the number of months and returns the date of the deadline. But I need to decrease one day of the result
Dev’s good afternoon! I am trying to create a script that calculates the final date from an initial date and its term in months. Ex: Initial date: 01/08/2018 Deadline: 60 months End date: 31/07/2023…