C
C#

got this code that i wrote the get all score and print end score but i didnt read right help me

got this code that i wrote the get all score and print end score but i didnt read right help me

RRANI11/18/2023
exem is 40% assigments is 30% and participation is 30% using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _1.cs { class Program { static void Main(string[] args) { Console.Write("Enter the grade for exams (0-100):"); int exem = int.Parse(Console.ReadLine()); Console.Write("Enter the grade for assignments (0-100):"); int assignments = int.Parse(Console.ReadLine()); Console.Write("Enter the grade for participation (0-100)"); int participation = int.Parse(Console.ReadLine()); Console.WriteLine((exem + assignments + participation) / 3); Console.ReadLine(); } } } that is code how i do that exem are worth 40% of total score and assignments and participation are 30%
JJP11/18/2023
represent the weight as a decimal (e.g. 40% = 0.4), then multiply the weight of each grade category with the score for that category (e.g. if I got an average of 90 on my exams, 90*0.4 -- this get's you the "exam" category's contribution to the total weighted average). Do this for all grade categories and sum the results to get the final weighted average of all categories. Note, what I wrote assumes the weights of all categories total to 100%
RRANI11/18/2023
thanks was thinking about it but didnt know how to like do it using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _1.cs { class Program { static void Main(string[] args) { Console.Write("Enter the grade for exams (0-100):"); int exem = int.Parse(Console.ReadLine()); Console.Write("Enter the grade for assignments (0-100):"); int assignments = int.Parse(Console.ReadLine()); Console.Write("Enter the grade for participation (0-100)"); int participation = int.Parse(Console.ReadLine()); Console.WriteLine(((exem * 0.4) + (assignments * 0.3) + (participation*0.3)) / 3); Console.ReadLine(); } } }
JJP11/18/2023
The "Basic Example" in @mg's link better suits your scenario: because the weights don't sum to 100% (to be clear, that math will be off [for these weights] in the version following my original instructions) My dumbass did 40 + 30 + 30 = 110
Mmg11/18/2023
This is almost right, but you don't need to divide by 3 Each category contributes a certain amount to the final score. Exams contribute 40%, assignments 30%, and participation 30% Because everything is on the same scale (i.e. percentage points), you don't need to divide

Looking for more? Join the community!

C
C#

got this code that i wrote the get all score and print end score but i didnt read right help me

Join Server
Want results from more Discord servers?
Add your server
Recommended Posts
Assistance regarding deciding on what to use.Hello there, I want to port one of my macOS apps to a native windows app and would like to ask which✅ C# SMS/MMS BotI have a project I'm working on I have a working PBX that receives SMS and MMS messages to a web conHelp deciding Next.js/Node.js vs .NET API back-endHello. I really want to use .NET as my API back-end for a practice app I'm building. However, I dohow do i make it so when i press it this happens and if i do it again another thing happensive made a code in winforms so when i press with my left mouse button it hides everything, how do i Can't access object attributes using X.PagedListI have a search field that returns a list of movies. It works fine if I reference the model as @MoviTryin to install scriptscs but cinst is not a recognized commandI'm trying to install scriptcs but cinst isn't a recognized command. I have uninstalled and reinstalHow do I utilize Identity Framework and AspNetUser Table?Hello, I am building an MVC app where people will need to sign up. They can then upload stuff to th✅ Is there a way to run a commands method inside of another command? (DSharpPlus)Title explains it. ```c# #region RandomImage [SlashCommand("randomimage", "Visa en rhelpGood evening, I have a monolithic application completed, can someone help me migrate a monolithic apProject structure (MVC API, microservice arch.)https://github.com/classy-giraffe/BookshopHow can I insert my sortedlist into a listbox?I am new to C# and currently using a sortedlist<string, int> in order to store values that I need toHow to map Entity Framework entities containing circular references to DTOs?When querying data with Entity Framework, the result data appears to contain circular references. (✅ Typeorm doesnt get the name from entityI need that typeorm get the ```name: "noInfoMILeadsToDistribute"``` inside Entity, but it wants to gProcessing files as fast as possibleHi everyone! I have a question that I’m sure you can help me with. I’m making a library that needs t✅ [SOLVED] Does the 3rd line of code hold memory as a reference or does it hold the actual value?ayooo, quick question. pretty simple. Book is a custom class just so you know.... ```csharp Book boRequestsHello, i have never done something that i will say before, how can i send a request to an API Url, gWhy is my grid on Line 28 not calling back to my other script called Grid?✅ Visual Studio 2022 Failing to Create C# ProjectWhat's happening here?✅ Help with creating shapes on a windows form appI have created a windows form app to display shapes on a bitmap, my circle function works fine but mNo inbuilt functionsHello, im a year 1 student so my knowledge is not that massive. So i have this task for university w