Most voted "mathematics" questions
Mathematics is the science of logical and abstract reasoning that studies quantities, structure, measurements, spaces and variations. Any math questions on this site should be related to programming.
Learn more…369 questions
Sort by count of
-
-2
votes2
answers39
viewsScalate a value in a given range
My programming teacher asked this question and I couldn’t understand why I have to use one of these formulas to scale the temperature. And I couldn’t identify the right answer either. You have the…
-
-2
votes1
answer642
viewsCalculate speed Km/h latitude and longitude
People if every 5 minutes I cover 10 kilometer how many miles per hour I am traveling ? If anyone can help there thank you follow the code: function distancia($lat1, $lon1, $lat2, $lon2) { $lat1 =…
-
-2
votes3
answers4592
viewsHow to do exponentiation using multiplication in Portugol as arithmetic operation?
I need to make a pseudocode that has numero1 and numero2 (have to be natural numbers less than 50), need to raise the numero1 at the numero2, just using the multiplication operation, and show the…
-
-2
votes1
answer71
viewsResolve Operation with Set
Question 1 - Consider the set X = {x Z : 1 x 32}. Implement a program in C that performs the following instructions. Create three integer-type vectors of size 12: vector 0[12], vector 1[12] and…
-
-2
votes1
answer153
viewsWhat areas of mathematics should a game developer know?
In the development of a game something essential is mathematics. With it several amazing things are done both in the games and elsewhere. The difference between knowing or not this content is…
-
-2
votes0
answers36
viewsdivision by 1/value
I’m doing some work that needs complex mathematical equations. And I’m having a problem early on, when I try to do the 1/result split, the answer is always 0,000. I have tried using double, float,…
-
-2
votes2
answers109
viewsJavascript Calculator(Returns no value)
My simple javascript calculator design (containing some buttons),does not return any value. Even with Alert nothing works. function testResults (form) { var operacao= form.operacao.value; //entrada…
-
-2
votes1
answer48
viewsHow can I print my results in a text file?
Well, I need to solve some linear systems through the Jacobi method using Python 3.8 programming, I made the code (which I’ll leave below), but I can’t make a print file that stores my results in an…
python-3.x mathematics file-system computer-vision programming-principlesasked 4 years, 6 months ago Victor Cunha 1 -
-2
votes1
answer117
viewsHow to make Fibonacci sequence through matrix?
I’m developing a C algorithm that displays a Fibonacci sequence on the screen, but first I built a spreadsheet in Excel to understand how this sequence works and realized that it is a 3 column…
-
-2
votes2
answers175
viewsReturn of prime numbers?
I’m having trouble with some returns stating that some prime numbers are not primes. What is the error in my code? package capitulo4.laboratorio; import java.util.Scanner; public class Laboratorio1…
-
-2
votes1
answer33
viewsHow to solve product scalar without using numpy library (python)
Hello, I’m trying to do this operation without using the Numpy library, which in itself is already a tragedy. I get from the user two vectors of equal sizes, and need to do the scalar product…
-
-3
votes1
answer107
viewsUsing Math Tricks, can you speed up Python accounts?
An example of code about my doubt. %timeit lambda : 10000000000000000*10000000000000000 40.4 ns ± 0.592 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) %timeit lambda :…
-
-3
votes4
answers623
viewsPrint ranges of numbers with final 5
I’m trying to print the numbers from 0 to 200 that have only the number 5 as the last digit. package Exercícios; public class NumerosQueComeçamComAlgarimo5 { public static void main (String [] args)…
-
-3
votes1
answer342
viewsComputational Geometry - How to check if two lines intersect only at the anchor?
Good guys, I need to do a show in C++ that receives a point A(x,0) a point B(x,0) that point To and B they are on the x-axis, always with y = 0. After receiving the point To and the point B, I have…
-
-3
votes0
answers37
viewsHow to create random variables in normal distribution with mean and standard deviation in Javascript?
I have a problem creating a variable with normal distribution in JS, I know the option math.random() is limited and that the chance of each value between 0 and 1 is equal (rectangular distribution),…
-
-4
votes1
answer523
viewsHow to know how many numbers there are from x to y?
For example from 0 to 60. Obviously I know how many numbers there are, but what I know is how to make my algorithm figure that out mathematically.
-
-4
votes3
answers748
viewsURI 1021 gives 5% error
Read a floating point value to two decimal places. This value represents a monetary value. Then calculate the fewest possible banknotes and coins in which the value can be broken down. The banknotes…
-
-4
votes1
answer84
viewsHow to use While in Python 3?
My doubt is about the bow while, I can’t understand how it works. Write a Python function that takes, by argument, two integers and returns the sum of all integers between the two (including the…
-
-15
votes2
answers128
viewsAdjust the value of cents
I have a variable with the following information: 100.3 What better alternative to make 100.3 to 100.03?