Help with Fortran: Get Assistance with Programming Assignment

  • Comp Sci
  • Thread starter Kafros
  • Start date
  • Tags
    Fortran
In summary, the conversation is about someone seeking help with a homework assignment in Fortran programming. They are having trouble with a program that calculates the mean value of a sum of random numbers. They are using the Silverfrost FTN95 Plato3 IDE compiler and have encountered a problem with the random function. They have attached a photo for reference and are seeking assistance from others. The conversation also mentions the importance of using comment cards and error trapping in programming.
  • #1
Kafros
1
0
help with fortran please

i'm new with programming and i have a problem with a homework I've been assigned from university. it's quite a simple programm but I'm stuck and going crazy . can anyone please help. there seems to be a problem with the random function. but i couldn't fix it. I'm using silverfrost ftn95 plato3 ide compiler. the scope of this programm is to calculate the mean value of a sum of random numbers and as a seed is used a default number. i have attached to this post a pic of what the problem appears to be. take a look please and help me if you can. going crazy
 

Attachments

  • problem.JPG
    problem.JPG
    43 KB · Views: 441
Physics news on Phys.org
  • #2
Kafros said:
i'm new with programming and i have a problem with a homework I've been assigned from university. it's quite a simple programm but I'm stuck and going crazy . can anyone please help. there seems to be a problem with the random function. but i couldn't fix it. I'm using silverfrost ftn95 plato3 ide compiler. the scope of this programm is to calculate the mean value of a sum of random numbers and as a seed is used a default number. i have attached to this post a pic of what the problem appears to be. take a look please and help me if you can. going crazy

Comments:

* Learn to use comment cards (yes I am that old ;), while it may seem pointless with simple programs it will be of great value in the future (in particular to those looking at your code).
* What happens if the user inputs 5 for N ? You need some error trapping, (i.e. you need to tell them they goofed since N must be between 10 and 100000 and re-request the value of N).
* Is there really a need for a vector (M) and 2 do loops in this program ?
* Since you have declared "Implicit none" how does the compiler to know
(i.e. how do you tell it) that random is a REAL function ?
 
  • #3


Hello there,

I understand that you are having difficulties with your Fortran programming assignment and are in need of assistance. I would be happy to provide some guidance and support for your project.

Firstly, it is important to remember that programming can be challenging, especially when you are new to it. Don't get discouraged and know that it takes time and practice to become proficient in any programming language.

To address the issue with the random function, it would be helpful if you could provide more details about the specific error or problem you are encountering. Without this information, it is difficult to provide specific guidance. However, in general, when troubleshooting issues with a random function, it is important to check the syntax and ensure that the function is being called correctly.

Additionally, I recommend utilizing online resources such as forums, tutorials, and documentation to help troubleshoot and better understand the language. There are also many online communities and forums dedicated to Fortran where you can seek guidance from experienced programmers.

Lastly, I suggest reaching out to your professor or classmates for assistance. Collaboration and peer support can be incredibly beneficial in solving programming problems.

I hope this helps and wish you the best of luck with your assignment. Keep practicing and don't give up, you will get there!
 

1. What is Fortran and what is it used for?

Fortran is a high-level programming language that was developed in the 1950s for scientific and engineering applications. It is widely used for numerical and scientific computing, as well as in fields such as weather forecasting, computational physics, and computational chemistry.

2. What are the benefits of using Fortran?

Fortran is a highly efficient and fast language, making it ideal for complex mathematical and scientific calculations. It also has a large library of built-in functions and data types specifically designed for scientific computing, which can save time and effort for programmers.

3. How can I get help with my Fortran programming assignment?

There are several options for getting assistance with Fortran programming assignments. You can reach out to your professor or classmates for help, join online forums or communities dedicated to Fortran programming, or hire a professional tutor or programmer for one-on-one assistance.

4. What are some common challenges when learning Fortran?

One common challenge when learning Fortran is understanding its syntax and structure, which may be different from other programming languages. Another challenge may be finding resources and support since Fortran is not as widely used as other languages like Python or Java.

5. Is it necessary to learn Fortran for a career in science or engineering?

While Fortran is still used in many scientific and engineering fields, it is not the only language used for these applications. However, having knowledge of Fortran can be beneficial, especially if you plan to work with legacy code or in a field where it is the primary language used.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
8
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Computing and Technology
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
2K
  • Programming and Computer Science
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
Back
Top