Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Fortran Good Programming Tips UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
30-03-2025
Written in
2024/2025

Fortran Good Programming Tips UPDATED ACTUAL Exam Questions and CORRECT Answers What should your stop statement do? - CORRECT ANSWER and return a code of 0. Done via the stop 0 command - Terminates the program What is one way of checking if your program ran sucessfully? - CORRECT ANSWER using the echo $? on command line. See if it prints out the value next to your stop statement What statement must all your programs have? - CORRECT ANSWER Your variable names should - CORRECT ANSWER - be very descriptive What should be included in your declaration section for more clarity with user? - CORRECT ANSWER - Variable dictionary that provides the name of the variable, and its units What is critical when naming variables? - CORRECT ANSWER value assigned to them before they can be used in an expression What errors occur when you fail to assign a value to a value and use it in an expression? - CORRECT ANSWER - Execution-time error or run-time error -

Show more Read less
Institution
Fortran
Course
Fortran

Content preview

Fortran Good Programming Tips
UPDATED ACTUAL Exam Questions and
CORRECT Answers
What should your stop statement do? - CORRECT ANSWER - Terminates the program
and return a code of 0.


Done via the stop 0 command


What is one way of checking if your program ran sucessfully? - CORRECT ANSWER -
using the echo $? on command line. See if it prints out the value next to your stop statement


What statement must all your programs have? - CORRECT ANSWER - implicit none



Your variable names should - CORRECT ANSWER - be very descriptive


What should be included in your declaration section for more clarity with user? - CORRECT
ANSWER - Variable dictionary that provides the name of the variable, and its units



What is critical when naming variables? - CORRECT ANSWER - Variables MUST have a
value assigned to them before they can be used in an expression


What errors occur when you fail to assign a value to a value and use it in an expression? -
CORRECT ANSWER - Execution-time error or run-time error


Say a program you want to write has a constant (g = 9.81 m/s^2), how would you use this in the
program? - CORRECT ANSWER - Make g a parameter that cannot change value. Done
via the statement


real, parameter :: G = 9.81

, Make your parameters uppercase to make them visually apparent


What are binary operators? - CORRECT ANSWER - They require two "operands" or two
inputs to work


+ (addition), - (subtraction), * (multiplication), / (division)


Unary Operators - CORRECT ANSWER - require only one operand. Includes only the +
and - operators to assign signs to numbers


Arithmetic Operator Rules - CORRECT ANSWER - 1) No two operators may occur
sequentially


2) Negative values cannot be exponentiated to a non-integer power or a negative power


3) Division by zero is not permissible


a*-b - CORRECT ANSWER - illegala



a*(-b) - CORRECT ANSWER - legal



a**-2 - CORRECT ANSWER - illegal



a**(-2) - CORRECT ANSWER - legal



(-1.0)**2 - CORRECT ANSWER - legal

Written for

Institution
Fortran
Course
Fortran

Document information

Uploaded on
March 30, 2025
Number of pages
9
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
Follow You need to be logged in order to follow users or courses
Sold
1390
Member since
2 year
Number of followers
105
Documents
87389
Last sold
9 hours ago
MGRADES (Genius Brains)

Welcome to MGRADES Exams, practices and Study materials The work speaks for itself Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

232 reviews

5
94
4
50
3
53
2
14
1
21

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions