CA2022Proposed solution included

CEC 226 Script Language CA 2022

About this paper

CEC 226: Continuous Assessment, April 2022, University of Buea: 3 Python programming questions (smallest number in a list, Fibonacci even-sum, dictionary of squares); solutions cross-verified against the matching instructor answer key found in file8.pdf.

Open in Shoracy

Opens this paper in the app on your phone.

University of Buea

College of Technology - COT

Computer Engineering - CET

CEC2262022

Script Language

CA · Second Semester · Level 200

From this paper

  1. 1.

    Write a Python program to get the smallest number from a list. The program should • prompt the user to enter the number n of element in the list • prompt the user to enter the n numbers (one at a time) using a loop in order to create the list Hints: one may use loop(s) and or conditional statement(s) to traverse through the list and compare each elements in order to get the smallest

  2. 3.

    Write a Python script to generate and print a dictionary that contains a number (between 1 and n) in the form (x, x ∗ x).

Open in the app to read the full paper and its proposed solution.

View solutionOpen in Shoracy

At a glance

Course code
CEC226 (CEC 226)
Type
CA
Year
2022
Level
Level 200
Semester
Second Semester
Proposed solution
Included

Read CEC226 2022 in Shoracy.

  • Every page, with zoom for diagrams and small print
  • The proposed solution, one tap away
  • Stays on your phone after the first open, even offline
Open in Shoracy