GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Coding Questions You may not use any concepts (including bu…

Coding Questions You may not use any concepts (including built-in functions) which we have not covered in Modules 1 – 11. You can find all material allowed in this exam at the end of these instructions. Other restrictions apply per function.  Use of coding standards and language syntax, type annotations, code clarity, and logic of the solution are part of the grade. You do not need to include main or a docstring, but you do need to include type annotations in the function definition. You should identify tasks that address a specific part of the problem and implement them as helper functions Coding questions are graded for correct syntax, proper use of coding standards, and design, (Use the space bar, not the Tab key to provide indentation) Quiz #3 Notes Data types intfloatstrboollisttuple Type Casting type(value) returns the data type of value>>> type(5) Arithmetic Operators i + j -> The sumi – j -> The differencei * j -> The producti / j -> Divisioni ** j -> i to the power of ji // j -> the quotient when i is divided by ji % j -> the remainder when i is divided by j   Relational Operators x > y      Is x greater than y?x < y      Is x less than y?x >= y     Is x greater than or equal to y?x >> len(‘hello’)5>>> len([1, 8, 2, 8])4 y in x: Returns True if y is in sequence x; False otherwise (works on strings and lists)>>> 2 in [1, 8, 2, 8]True>>> “r” in “Penn State”False   A-Z: ASCII values = 65 -> 90a-z: ASCII values = 97 -> 122ord(char): Returns an integer with the code for char>>> ord(“A”)65chr(code): Returns the character with the given code>>> chr(65)’A’   abs(value): Returns the magnitude of the given value>>> abs(5.6)5.6>>> abs(-9)9   Slicing Syntax sequence[start : end], end is exclusive   List Operations and Methods x.append(y): Adds y at the end of list x>>> lst = [1, 8, 2, 8]>>> lst.append(‘hi’)>>> lst[1, 8, 2, 8, ‘hi’] k * x: Returns the list x repeated k times>>> 3 * [0][0, 0, 0] x + y: Returns a new list that contains all elements in both lists>>> [1,2,3] + [2,3,4][1,2,3,2,3,4] pop and del remove the element at position i.>>> lst = [1, 8, 2, 8]>>> lst.pop(1)8>>> del lst[0]>>> lst.pop()  # Removes the last element8>>> lst[2]   String Operations and Methods k * x: Returns the string x repeated k times>>> 3 * ‘hello”hellohellohello’ x + y: Returns a new string that contains all elements in both strings>>> ‘hello’ + ‘world”helloworld’ Formatted string literals>>> v1=’Sam’>>> v2= 5>>> f'{v1} has {v2} coins”Sam has 5 coins’ ”.join(sequence): Takes all items in an sequence of strings and joins them into one string:>>> ‘-‘.join([‘1’, ‘2’, ‘3’])’1-2-3′ split(separator): breaks down a string into a list of substrings using a chosen separator>>> s = “hello,here,there”>>> s.split(“,”)[‘hello’, ‘here’, ‘there’]>>> s = “hello here there”>>> s.split()[‘hello’, ‘here’, ‘there’] strip(): removes any leading, and trailing whitespaces.>>> s = ”   hello    there    “>>> s.strip()’hello    there’

Read Details

Congratulations, you are almost done with Exam 2.  DO NOT en…

Congratulations, you are almost done with Exam 2.  DO NOT end the Honorlock session until you have submitted your work to Gradescope.  When you have answered all questions:  Use your smartphone to scan your answer sheet and save the scan as a PDF. Make sure your scan is clear and legible.  Submit your PDF to Gradescope as follows: Exam 2 Email your PDF to yourself or save it to the cloud (Google Drive, etc.).  Click this link to go to Gradescope to submit your work:  Return to this window and click the button below to agree to the honor statement. Click Submit Quiz to end the exam.  End the Honorlock session. 

Read Details

“I Pledge on my honor that I have neither given nor received…

“I Pledge on my honor that I have neither given nor received unauthorized aid on this assessment.”

Read Details

Tina is a 15-year-old female with a diagnosis of Anorexia Ne…

Tina is a 15-year-old female with a diagnosis of Anorexia Nervosa. She is 5’8″ and weighs 96 lbs. She has been prescribed fluoxetine 20 mg orally once daily and is presenting for a medication management visit. Question: Anorexia Nervosa affects multiple organ systems due to malnutrition and physiological stress. Identify three different body systems affected by Tina’s condition (e.g., cardiovascular, endocrine, gastrointestinal, musculoskeletal, etc.).For each system, do the following: Describe at least one key assessment you would perform during her medication management visit. Include both relevant history questions and expected or concerning physical exam findings. Explain why this system’s assessment is essential in the context of her eating disorder.  Please answer the question thoroughly in complete sentences.   

Read Details

 Patients with bulimia nervosa tend to use vomiting as the p…

 Patients with bulimia nervosa tend to use vomiting as the primary medium to expel food after a period of binging. Explain why vomiting is commonly used and what can be a negative consequence of regular vomiting. Please answer the question thoroughly in complete sentences. 

Read Details

Sally is a 12-year-old with an anxiety disorder, who is work…

Sally is a 12-year-old with an anxiety disorder, who is working with the PMHNP in an outpatient setting.  Describe your treatment plan for her, to include medication and therapy. Please provide details and answer in complete sentences. 

Read Details

Differentiate symptoms of OCD and describe a type of Obsessi…

Differentiate symptoms of OCD and describe a type of Obsession as well as a type of Compulsion. Please answer the question thoroughly in complete sentences. 

Read Details

Kayla, a 22-year-old nursing student, presents for evaluatio…

Kayla, a 22-year-old nursing student, presents for evaluation due to fatigue, dizziness, and hair loss. Her BMI is 16.8, and she was diagnosed with Anorexia Nervosa – Restricting Type. She was recently taken to the ER for bradycardia and electrolyte imbalance. Kayla is admitted and started on a refeeding protocol. On day 3, she reports shortness of breath and muscle weakness. Labs reveal hypophosphatemia. What is the most likely explanation for these findings?  

Read Details

The Dome is in relation to the ____________ surface.

The Dome is in relation to the ____________ surface.

Read Details

III. Answer one of the following questions. This part is wor…

III. Answer one of the following questions. This part is worth 5 points.      1.An explosion in a factory in North Korea, manufacturing chemicals results in a spillage of thousands of tons of  toxic chemicals into a river. The river flows into South Korea, as a result the toxic waste is carried by the river waters into South Korea. South Korean farmers complain that the toxic chemicals pose a health risk to humans and livestock and have contaminated their farmlands. This situation raises the following questions:        1. Can South Korea hold North Korea responsible for the accident?      2. On what grounds can South Korea hold North Korea liable for what has occurred?      3. Can North Korea argue that since it was an accident, it has no liability in this case                                  according to its internal laws?           4. If South Korea is not satisfied with North Korea’s response where can it sue for            damages?      5. If  North Korea was to lose the case, what would it be its responsibilities in this          matter?         2. A brutal civil war was going on in Syria for the last five years. Thousands of civilians died as a result of assaults and bombardments. Thousands of refugees fled to Europe, Turkey, Lebanon and Jordan. The UN was unable to take action to end the civil war in Syria. The situation raised the following questions.     1. On what grounds could the UN undertake humanitarian intervention under the UN Charter and the subsequent report of the Commission on Intervention and State Sovereignty?   2. Was the UN Security Council required to authorize such an intervention?   3. How must the UN Security Council have voted  if a resolution calling for humanitarian intervention is to be successfully passed by it?   4. What legal argument did Syria make based on UN Charter provisions to block such an intervention by the international community?   5. Can the President of Syria be held accountable by the International Criminal Court and on what grounds? 

Read Details

Posts pagination

Newer posts 1 … 40,027 40,028 40,029 40,030 40,031 … 98,982 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top