Jump to content

Help with Computer Science homework


Eddard Stark19

Recommended Posts

This is an extra credit assignment for my Intro to Computer Science class, it's the only Computer Science class I've taken so far. I do not even understand what this assignment is asking me to do. My professor is terrible at answering questions. What kind of format am I even supposed to answer this in? I'm not looking for the answers I just don't even understand where to start or what it's asking of me. Any help would be monumentally appreciated.

 

 

"This assignment can be done in any way that is most comfortable for you.
At the beginning of your program, be sure to provide comments that give your name, the nature of the assignment, the name of you program, and due date. You should have at least four lines.
You are going to write a programmed test that asks the user 10 questions. The program begins by your introducing yourself (you don’t have to use your real name) to the user and asking what his/her name is. All of your questions will have a “personal” touch to them, i.e., you’ll use the user’s name when asking the questions and using the user’s name when informing him or her whether he or she got the answer correctly. Give the user the correct answer, if he or she missed it, except for Question 9, which you will give after Question 10.
After the test is completed, you will use the user’s name to tell him or her how many questions were answered correctly. You will also tell the user whether he or she passed the test. To pass the test, the user will have to answer six of the questions correctly.
All answers requiring decimal notation should be rounded to two decimal-point numbers (e.g., 2.01, not 2.014).

Here are the questions you will ask:
1) What is the value of π? (Ans.: 3.14)
2) What is the value of φ? (Ans.: 1.61)
3) What is the value of e, the Euler number? (Ans.: 2.72)
4) What is the value of C, the Euler constant? (Ans.: 0.58)
5) What is the largest digit in Base 2? (Ans.: 1)
6) What is the largest digit in Base 8? (Ans.: 7)
7) What is the largest digit in Base 16? (Ans.: f or F)
8) What is the value of the multiplier effect in economics? (Ans.: 2.50)
9) If 100 is reduced by 10%, what is the result? (Ans.: 90)
10) If the result of question 9 is increased by 10%, what is the new result? (Ans.: 99)"

Link to comment
Share on other sites

I presume you make functions for each question and call them in your program.

 

def pi(c,d):

return c/d

 

print pi(31.415, 10)

print pi(78.5375, 25)

 

Thats an example of pi i think. Percentages are easy total / 100 * percent.

 

Follow the same steps for all the examples required.

 

Regards.

Edited by DevilSolution
Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.