Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,360 members, 7,800,728 topics. Date: Thursday, 18 April 2024 at 03:53 AM

First Thing First, Learn To Program! - Programming (3) - Nairaland

Nairaland Forum / Science/Technology / Programming / First Thing First, Learn To Program! (34749 Views)

Learn How To Program For Free / How To Program Outseal Arduino PLC / Here Is Why You Should First Learn Python As A Beginner In Programming (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (11) (Reply) (Go Down)

Re: First Thing First, Learn To Program! by Nobody: 2:42am On May 04, 2019
progeek37:
Sample Question 2

In the Nigerian Federal universities, the grading system is used to calculate the performance of the students. In one particular university the grading system is as follows:

Course code: This is the shorthand representation of the course name. For instance, in the university "An Introduction To Calculus" is given the course code MTH121.

Credit hour: This is the contact hour or weight assigned to the course, as an example MTH121 is given the credit hour of 4.
Workload: Workload is the sum of all the credit hours of the courses offered by the student in a semester. Students are allowed a minimum of 15 units and maximum of 24 units per semester.

Letter grade: These are the letters attached to a score bracket. A scores within a particular range is given the same letter grade: For instance the score bracket in % of the university is given as follows: (70-100) = A, (60-69) = B, (50-59) = C, (45-49) = D, (40-44) = E and (1-39) = F.
Grade points: These are the point values assigned to eache letter grade. For instance, in the same university the grade points are as follows:
A = 5, B = 4, C = 3, D = 2, E = 1 and F = 0.

Quality point: The quality point is the product of credit hours and its corresponding grade point. This means multiplying the credit hour by its grade point. In our example, if a student scores 75 (A) in MTH121 the grade point will be 4 * 5 = 20.

Grade Point Average(GPA): This is calculated as follows, GPA = Total quality point/total workload for the semester

Cumulative Grade Point Average(CGPA): Mathematically, this is expressed as CGPA = (First semester GPA + Second semester GPA) / 2.

If you are still confused about grading system, browse the internet for details.
Note: the grading system may vary in different universities, but the algorithm for calculating GPA (grade point average) and CGPA (cumulative grade point average) remains the same.

Write a program that can calculate the GPA of any semester and the CGPA of the session, your program should be able to allow one to write the result to file and read result from file as well. You may consider making the output visually appealing by using string methods. For instance the output may appear like this:

MTH121----------------------A
PHY121---------------------- B
CHM121-------------------- D
.
.
.
GPA ------------------------3.00
I try?
That the GPA... NOT CGPA

TYPO ON THE HTML


Number one question:

Solving with JavaScript.

One could easily do.
For(var i=1000000; i<9999999; i++){
Console.log("numPref"+i)}
The problem there is the zeros.
Lemme see it sha....
Plus printing this alone hangs my browser console

Re: First Thing First, Learn To Program! by Nobody: 4:02am On May 04, 2019
Will add options for adding second semester results 2.
And calculating CGPA
Re: First Thing First, Learn To Program! by Sixtytwo62: 8:40am On May 04, 2019
OP, No system I had to use my phone.

Re: First Thing First, Learn To Program! by Sixtytwo62: 8:41am On May 04, 2019

Re: First Thing First, Learn To Program! by Sixtytwo62: 8:46am On May 04, 2019
The list of possible numbers beginning with the same prefix and ending with the same suffix continues....
My phone is freezing as the counting continues.

Re: First Thing First, Learn To Program! by Sixtytwo62: 8:53am On May 04, 2019
I had to break out of loop when the counting reach 200 to take a screen shot. It was impossible at first, as each count updates the screen, throwing me to the bottom continuously.

Re: First Thing First, Learn To Program! by Sixtytwo62: 9:00am On May 04, 2019
Tested on more phone numbers.

Re: First Thing First, Learn To Program! by progeek37(m): 9:21am On May 04, 2019
modestbrowser:

You said CGPA is never rounded up or down
But u rounded yours up
There's no valid calculation in the question. I just used 3.00 to show how the output should look like.
Re: First Thing First, Learn To Program! by progeek37(m): 9:33am On May 04, 2019
Sixtytwo62:
I had to break out of loop when the counting reach 200 to take a screen shot. It was impossible at first, as each count updates the screen, throwing me to the bottom continuously.
How can one know that such program outputs the correct phone numbers? I mean how many numbers are you going to manually test to verify that the program is printing correct numbers. That's not how I intended the program to display. Check my previous screenshots on how the output should appear. Your phone can display all the numbers that end with "3431" but it cannot display all the result. Please modify the program.
Re: First Thing First, Learn To Program! by progeek37(m): 10:00am On May 04, 2019
modestbrowser:

I try?
That the GPA... NOT CGPA

TYPO ON THE HTML


Number one question:

Solving with JavaScript.

One could easily do.
For(var i=1000000; i<9999999; i++){
Console.log("numPref"+i)}
The problem there is the zeros.
Lemme see it sha....
Plus printing this alone hangs my browser console
I never intended the problem to be solved on the pre-knowledge that the the total number is 10 000 000. Your program itself should be able show the total number.
Re: First Thing First, Learn To Program! by Nobody: 10:16am On May 04, 2019
progeek37:

I never intended the problem to be solved on the pre-knowledge that the the total number is 10 000 000. Your program itself should be able show the total number.
What u think of my attached picture though.
i.length can show the total number.
Plus JavaScript isn't fit for it.
Will do with python and send
Re: First Thing First, Learn To Program! by progeek37(m): 11:08am On May 04, 2019
modestbrowser:

What u think of my attached picture though.
i.length can show the total number.
Plus JavaScript isn't fit for it.
Will do with python and send
Okay.
Re: First Thing First, Learn To Program! by Nobody: 11:24am On May 04, 2019
progeek37:

Okay.
Okay Asin.
Just tell me you don't want to rate it
Re: First Thing First, Learn To Program! by progeek37(m): 11:45am On May 04, 2019
modestbrowser:

Okay Asin.
Just tell me you don't want to rate it
Please note that you are there already. I said you should modify your algorithm to be print the whole number. It should be like
0813 000 3431
0813 001 3431
0813 002 3431
...etc
I hope you understand me now. Have you joined our WhatsApp group?
Re: First Thing First, Learn To Program! by Nobody: 11:48am On May 04, 2019
progeek37:

Please note that you are there already. I said you should modify your algorithm to be print the whole number. It should be like
0813 000 3431
0813 001 3431
0813 002 3431
...etc
I hope you understand me now. Have you joined our WhatsApp group?
08164412295.
I sent a picture to question 2... Didn't u see it bro
Re: First Thing First, Learn To Program! by progeek37(m): 12:29pm On May 04, 2019
modestbrowser:

08164412295.
I sent a picture to question 2... Didn't u see it bro
Let me check it.
Re: First Thing First, Learn To Program! by progeek37(m): 12:35pm On May 04, 2019
modestbrowser:
Will add options for adding second semester results 2.
And calculating CGPA
Wow! This is great. The output looks really appealing. I think I will start studying JavaScript. Please share the source code on the WhatsApp group.
Re: First Thing First, Learn To Program! by Nobody: 1:28pm On May 04, 2019
progeek37:

Wow! This is great. The output looks really appealing. I think I will start studying JavaScript. Please share the source code on the WhatsApp group.
JavaScript+ CSS +bootstrap.
Please add me to the group
Re: First Thing First, Learn To Program! by Sixtytwo62: 1:58pm On May 04, 2019
progeek37:

How can one know that such program outputs the correct phone numbers? I mean how many numbers are you going to manually test to verify that the program is printing correct numbers. That's not how I intended the program to display. Check my previous screenshots on how the output should appear. Your phone can display all the numbers that end with "3431" but it cannot display all the result. Please modify the program.
You mean something like this??

Re: First Thing First, Learn To Program! by progeek37(m): 3:56pm On May 04, 2019
Sixtytwo62:

You mean something like this??
I think this is near to perfection. But it is printing 12-digit numbers? Can you screenshot the very beginning of the output? Your coding skill is needed. Have you been added to our WhatsApp group?
Re: First Thing First, Learn To Program! by Sixtytwo62: 6:18pm On May 04, 2019
progeek37:

I think this is near to perfection. But it is printing 12-digit numbers? Can you screenshot the very beginning of the output? Your coding skill is needed. Have you been added to our WhatsApp group?
Modified.
Add me to the WhatsApp group
09014730337

Re: First Thing First, Learn To Program! by Nobody: 6:22pm On May 04, 2019
Re: First Thing First, Learn To Program! by progeek37(m): 7:11pm On May 04, 2019
Sixtytwo62:

Modified.
Add me to the WhatsApp group
09014730337
Perfect!
Re: First Thing First, Learn To Program! by asalimpo(m): 7:33pm On May 04, 2019
modestbrowser:



Stop saying you work on projects that takes months without solving a breeze project.... And yes, you were bragging! the context you used to buttress your point was a bragging context.... A showoff context, typical of those with nothing to place on the table when it matters.
I bet most of this your socalled big projects involves building a wordpress blog or setting up a simple E-com website...
Sorry dude but I'm above biting your bait.
As for you saying I'm bragging, you are simply misinterpreting my statements. I do work on multi month projects. I have never brought that up here ,I only mentioned it to make a point,about the nature of the quiz the op posed. I've seen devs who work on multi year projects. 10+ years! So working on multi month stuff is child's play to them. I never had the thought in my mind that they were bragging. About what? The work took 10yrs. That's it! None of them brought up the issue cuz they were comparing code sizes but they brought it up as a side issue,to illuminate a point. Maybe u r intimidated by hearing me say I work on multi month stuff,get over it . It's typical in this industry and any true coder will in time do projects that spans months or years.
Re: First Thing First, Learn To Program! by progeek37(m): 8:17pm On May 04, 2019
Welcome to Coding Ask and Answer!


Coding Ask and Answeris a place to learn programming by solving problems. Though you may be guided on difficult algorithm, you must learn to struggle with the problem yourself. Anyone can ask questions and answer questions. If you who successfully tackle any problem do us a favour by sending to the group some screenshots of the sample run and a description of the algorithm used.

Here, no one is going to teach you how to develop website or mobile/desktop apps. If need such things consider joining other groups for assistance

Coding Ask and Answer is a place for programmers to consult, share ideas, and solve programming problems. Here we solve problems only!
Solutions from any language is acceptable since any program can easily be translated into other languages once the algorithm is understood.

Drop your number to be added to our WhatsApp group

TIPS

It is never beneficial to browse the Internet for solutions. It is never advisable because it will render you unproductive and turn you into programming dummy. If you encounter any difficulty in solving programming problems. Browse for How to to do certain things in your programming language in the Internet. Never browse for the Solution itself.
If a certain algorithm or method/formula is required, visit Wikipedia to learn more about the algorithm, like the case of Horner Scheme.

Once again welcome!

1 Like

Re: First Thing First, Learn To Program! by Nobody: 9:18pm On May 04, 2019
asalimpo:

Sorry dude but I'm above biting your bait.
As for you saying I'm bragging, you are simply misinterpreting my statements. I do work on multi month projects. I have never brought that up here ,I only mentioned it to make a point,about the nature of the quiz the op posed. I've seen devs who work on multi year projects. 10+ years! So working on multi month stuff is child's play to them. I never had the thought in my mind that they were bragging. About what? The work took 10yrs. That's it! None of them brought up the issue cuz they were comparing code sizes but they brought it up as a side issue,to illuminate a point. Maybe u r intimidated by hearing me say I work on multi month stuff,get over it . It's typical in this industry and any true coder will in time do projects that spans months or years.
Sorry bro.... apologise
Re: First Thing First, Learn To Program! by progeek37(m): 12:11pm On May 05, 2019
QUESTION

In the beginning, at the birth of computing, there were no programming languages. Programs looked something like this:

001100010000000000000000001100010000000100000001001100110000000100000010010100010000101100000010001000100000001000001000010000110000000100000000010000010000000100000001000100000000001000000000011000100000000000000000

That is a program to add the numbers from 1 to 10 together and print out the result: 1 + 2 + ... + 10 = 55. How tedious could this be? This is difficult to understand and write without errors by human beings, but unfortunately that's the only language computer understands the so-called machine language. A we know Computer understands only 0 and 1 and nothing more. Luckily we now have high level languages that human beings can understand and write without errors and compilers/interpreters that can translate the high level languages to the machine language.
As far as computing is concerned the most important things are the two bits: 0 and 1 the so-called binary notation any other things can be converted from from binary notation.

(1 ) Write a program that converts a given number from decimal to binary notation.

(2) Write a program that converts a given number from binary to decimal notation.

(3) Write a program that converts a given number from decimal to hexadecimal notation.

(4) Write a program that converts a given number from hexadecimal to decimal notation.

(5) Modify question number (2) by:

Writing a program that converts a binary number to decimal using the Horner scheme(a.k.a Horner Method )
Search Wikipedia for details on Horner Method.
Horner method is fast and code-efficient. This is how Horner scheme works.
1001 (base two) = ((1 × 2 + 0) × 2 + 0) × 2 + 1 = 2 × 2 × 2 + 1 = 9 (base 10)
Re: First Thing First, Learn To Program! by asalimpo(m): 4:09pm On May 05, 2019
modestbrowser:
Sorry bro.... apologise
it's alright ... Slate cleaned.
Re: First Thing First, Learn To Program! by asalimpo(m): 4:11pm On May 05, 2019
modestbrowser:
Sorry bro.... apologise
it's alright ... Slate cleaned.
Re: First Thing First, Learn To Program! by AdolphBrian: 9:25pm On May 05, 2019
Here's my resolution

Re: First Thing First, Learn To Program! by progeek37(m): 10:10pm On May 05, 2019
AdolphBrian:
Here's my resolution
Things seem to be working fine though I can't prove everything with that screenshot alone. Run it and print out certain prefixed-numbers that end with certain 4-digit numbers.
Re: First Thing First, Learn To Program! by Desires: 10:03pm On May 06, 2019
Please add me up 09030486753

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (11) (Reply)

How To Make A Simple Calculator In Notepad Using .bat Format / Share Your Remote Job Experience As A Developer / Ethical Hackers

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 60
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.