Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Visual logic, help using loop and variables


  • Please log in to reply

#1
Graxin

Graxin

    New Member

  • Member
  • Pip
  • 1 posts
So I'm tasked with writing a program to find out students grade using 4 different sets of scores (tests,quiz,lab, La) I'm trying to use a forloop to do this but she wants us to use this formula:"

wLab*(Lab1+Lab2+Lab3)+wQ1_4*(Q1+Q2+Q3+Q4)+wQ5*Q5+ wLA*(LA1+LA2+LA3+LA4)+wTest1*Test1+wTest2*Test2+wCP*CP

According to our grading policy,

wLab = 0.08, wQ1_4=0.03, wQ5=0.08, wLA= 0.05, wTest1 =0.07, wTest2 = 0.14, wCP = 0.15"

What I'm having trouble with is using the for loop to give each quiz/test/ect a different variable name(Like quiz1, quiz2). I can make a chart that uses a for loop to get all the scores then add them for a total but in her formula she wants each score to have a seperate variable(I have no idea how I could attach a different variable to each input using a loop). Can someone lead me in the right direction to do that, or is it possible using a while loop?

Edited by Graxin, 12 November 2013 - 06:50 PM.

  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP