Kinford University Introduction to Programming Exam 2050 PDF

Summary

This is a past paper for an Introduction to Programming course at Kinford University, taken on January 15, 2050. The paper includes multiple-choice questions, practical coding exercises, and a system design essay. The areas covered include loops in programming, data structures like queues, the Transmission Control Protocol, cybersecurity enhancements, and scalability in software systems.

Full Transcript

kinforduniversity.com Kinford University Atkinson, NE 68713 222 555 7777...

kinforduniversity.com Kinford University Atkinson, NE 68713 222 555 7777 EXAM Name: Janice Harris Date: January 15, 2050 Program: Bachelor of Science in Information Technology Class: Introduction to Programming Schedule: 4:00 PM - 5:30 PM I. Core Concepts (Multiple Choice) 1. What is the purpose of a loop in programming? A) To make the code more readable B) To repeat a specific block of code C) To define a new function ) To terminate the program 2. Which data structure is best suited for implementing a queue? A) Linked List B) Stack C) Array D) Tree 3. What is the primary function of the Transmission Control Protocol (TCP)? A) Reliable data transfer B) Address resolution C) Broadcast communication D) Error detection 4. involved in each phase. A) Planning B) Analysis C) Design D) Implementation 5. Which of the following is a common method to enhance cybersecurity in web applications? A) SQL Injection B) Cross-Site Scripting (XSS) C) Input Validation D) Denial of Service (DoS) attacks II. Practical Coding (Programming Exercises) 1. Write a Python function that takes a list of integers as input and returns the sum of all even numbers in the list. 2. Given a database table named employees with columns id, name, and salary, write an SQL query to retrieve the names of employees whose salary is above $50,000. III. System Design (Essay) 1. Explain the difference between microservices and monolithic architecture. Provide a scenario where each would be preferable. 2. Discuss the advantages and challenges of migrating a traditional on-premise system to a cloud-based infrastructure. 3. Define scalability in the context of software systems. Provide strategies for designing a scalable application. Answer Key I. Core Concepts (Multiple Choice) 1. B 2. A 3. A 4. A 5. C II. Practical Coding (Programming Exercises) 1. def sum_of_evens(lst): return sum(x for x in lst if x % 2 == 0) 2. SELECT name FROM employees WHERE salary > 50000; III. System Design (Essay) 1. Microservices involve breaking down an application into small, independent services. Monolithic architecture has all components in a single codebase. Microservices are preferable for scalability and flexibility, while monolithic is simpler for small projects. 2. Advantages include scalability and cost-effectiveness. Challenges involve security and potential data transfer costs. 3. Scalability refers to a system's ability to handle increased load. Strategies include load balancing, horizontal scaling, and caching. CHOOSE & DOWNLOAD MORE EXAM TEMPLATE © TEMPLATE.NET

Use Quizgecko on...
Browser
Browser