So I'm trying to add lives in my game on Android, and when I run my if else block, the lives will only decrement by 1 or add by 1 but won't go any further than just going down or up by one, I need it to go down every time a guess is wrong but it…
In my Fortran program I have something similar to this do loop
do i = 1,imax
if(period) then
call g_period()
else
call g()
endif
enddo
I have this several places and sometimes several If loops within a do loop which…
I have some VBA code written that runs quite slowly. I have a series of different loops in my code. I know that loops aren't always the most efficient way to manipulate data, so I think they are the problem. I need ideas for how to either alter the…
When I code in Fortran language, I find when I set REAL value as control-var in do-loop, the outputs are strange, for example:
do i=0.1,1.0,0.1
write (13,"(F15.6)") i
end do
The out puts are: 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0.But when I set…
When running this code;
varCheck=True
Do While varCheck
Pass=InputBox("Enter Password")
Do
If IsEmpty(pass) Then
WScript.quit
Exit Do
End If
If Pass = "123" Then
varCheck=False
…
New to Mathematica, I am trying to print the out the first 50 Fibonacci numbers using a Do loop, but can't seem to make it work. I know there is a built-in function that returns the Fibonacci sequence given a number but I want to implement it using…
I want to create horizontal surfaces along the y-direction that follow the exponential growth function: y = 3.1268*e^(0.7234*x)
The program that I use implements scheme language, which I am not much familiar with.
The x values change from 1 to 10,…
I have the following code. I am trying to test a paragraph (descr) for a list of keywords (key_words). When I execute this code, the log reads in all the variables for the array, but will only test 2 of the 20,000 rows in the do loop (do i=1 to 100…
I have a workbook with several sheets.
One of the sheets "Calc" summarizes the data for 8 spark lines I have presented on a summary page based on an employee ID number entered on the summary page.
I have a created DO-loop macro to run this summary…
The following code gives the error
Expected 'while' in 'do-while' loop
if let path = NSBundle.mainBundle().pathForResource("Chapters", ofType: "txt"){
do {
let stringFromFile = try String(contentsOfFile:path, encoding: NSUTF8StringEncoding)
…
I am working on a piece of legacy F77 code and trying to convert it
to equivalent F90 code. I ran into these lines below and could some
one advise if my conversion is correct?
Fortran 77 code:
Subroutine area(x,y,z,d)
do 15 j=1,10
if (a.gt.b)…
In the data set Work.Invest, what would be the stored value for Year?
data work.invest;
do year=1990 to 2004;
capital+5000;
capital+(capital*.10);
end;
run;
a. missing
b. 1990
c. 2004
d. 2005
The correct ans given in…
For my method, partition, for my quick sort, it is okay when I run it. However, whenever I upload on the project submit page, the testing returns negative result for the design of this code. which is like
static long partition(DataArray array, long…
I have the following data set:
data have;
input x10 x22 x13 x64;
cards;
20 10 30 1
;
run;
I want to create four new columns called log_x10, log_x22, log_x13, log_x64 which are the logs of the original columns. I know this is probably a fairly…
Here's a question I've been meaning to ask for a long time, but have just accepted it as "Rails magic" up to this point. As the title states, why does the Rails form helper look like a do loop? If you check the official Rails documentation, it…