a- The blood Glucose fasting reference range is between 4.7-5.6 ; Therefore, you are required to write a python program which is prompting the user to enter the records of sugar diabetes test for 7 days, and write them to the text file.

Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA work):

 

I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized any other person’s work. I have provided all references of information that I have used and quoted in my TMA work.

Name of Student:………………………………..

Signature:……………………………………………

Date:……………………………………………………

 

 

Question 1:(10 marks)

Dealing with files in Python:

a- The blood Glucose fasting reference range is between 4.7-5.6 ; Therefore, you are required to write a python program which is prompting the user to enter the records of sugar diabetes test for 7 days, and write them to the text file. Make sure to keep each record on a separate line in the file. You should also include a screenshot of the code and the output.

N.B: Each record will be composed of the sugar reading test result in the morning.

You should enter at least 7 records for 7 days. Moreover, the text file should hold your name.

Example:

 

 

 

 

 

b- Write a python program that does the following:

1- Read the lines of the created file YourName.txt using a loop.

4- Count how many reading test will be higher than the reference normal range.

5- Print the records of only the highest reading

6- Include proper screenshots of the code and the output, in addition to the text file.

 

Important Notes:

1- You are not allowed to use Lists.

2- The whole program should include one loop and one If statement.

3- The format of the output should be identical to the given one.

4- The screenshots should also show part of your desktop in addition to the code/output.

5- Copy and paste your code from IDLE to the Answer booklet (don’t put your code as a screenshot)

Expected Output:

 

 

 

 

 

 

 

Question 2:(20 marks)

Turtle Graphics is a Python feature like a drawing board, which lets us command a turtle to draw all over it! We can use functions like forward(…) and right(…) which can move the turtle around. Commonly used turtle methods are found in the posted pdf file “turtle — Turtle graphics — Python 3.7.1rc1 documentation

To make use of the turtle methods and functionalities, we need to import turtle. “turtle” comes packed with the standard Python package and need not be installed externally. The roadmap for executing a turtle program follows 3 steps:

  1. Import the turtle module
  2. Create a turtle to control.
  3. Draw around using the turtle methods.

 

Problem:

Based on your transcript grades; you are required to do the following:

  • A prompting message asks you how many grades you are going to enter.
  • Enter your real grades for all terms that you have done as an integer numbers, and then you need to store the input grades in a list.
  • Find your GPA with 2 decimal points
  • You are required to show your grades’ scale as the below graph and print the GPA (with 2 decimal points) with comments. Hence, if your GPA is greater than 70 then you will get comments “YOUR GPA is V.GOOD”; if your GPA between 50-69 then the message will be “YOUR GPA is LOW”; otherwise (less than 50) the message will be “You have first warning”

Based on what you have learned in this course and using the appropriate commands, you are asked to Design the algorithm and implement a python program that draws the below diagram using the turtle.

 

You should consider the following points in your solution:

  • The x-axis has a length of 180 units, while the y-axis is 150 units.
  • When you are plotting the values, make sure to multiply the value of the number of grade by 20 in order to make an acceptable distance between the dots. The value of the grades should remain the same.
  • The dots should be in red.
  • Over each dot, you need to write the grade.
  • In your graph, you should hide the turtle prompt.
  • Make sure to set properly the starting position (x & y) of your drawing, to maintain the above diagram.
  • Copy and paste your code from IDLE to the Answer booklet (don’t put your code as a screenshot)
  • Provide Screenshots for the output

 

End of the Questions

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!