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:
Problem:
Based on your transcript grades; you are required to do the following:
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:
End of the Questions
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.
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 moreEach 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 moreThanks 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 moreYour 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 moreBy 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
Recent Comments