Back
ExamFull examExam paper only

15 01 2024 E TS

Full exam for Algorithms and parallel computing in the Mathematical Engineering degree programme at Politecnico di Milano. The document covers: Algorithms and Parallel Computing Course 052496 Prof. Danilo Ardagna, Prof. Damian Andrew Tamburri Date: 15-01-2024 Last Name: ............................................................. First Name: ............................................................. Student ID:

Algorithms and parallel computingFull exam

Document information

What's included in this study material

Full exam for Algorithms and parallel computing in the Mathematical Engineering degree programme at Politecnico di Milano. The document covers: Algorithms and Parallel Computing Course 052496 Prof. Danilo Ardagna, Prof. Damian Andrew Tamburri Date: 15-01-2024 Last Name: ............................................................. First Name: ............................................................. Student ID:

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Algorithms and Parallel Computing Course 052496 Prof. Danilo Ardagna, Prof. Damian Andrew Tamburri Date: 15-01-2024 Last Name: ............................................................. First Name: ............................................................. Student ID: ............................................................. Signature: ............................................................... Exam duration: 2 hours and 30 minutes Students can use a pen or a pencil for answering questions. Students are NOT permitted to use books, course notes, calculators, mobile phones, and similar connected devices. Students are NOT permitted to copy anyone else’s answers, pass notes amongst themselves, or engage in other forms of misconduct at any time during the exam. Writing on the cheat sheet is NOT allowed. Exercise 1: Exercise 2: Exercise 3: Exercise 1 (13 points) Blackjack is a popular casino game that is played with a 52-card deck of French cards. Your task is to build a software to manage the results of a blackjack tournament. In particular, we will focus on a simplified version of the game, in which one player only competes against the dealer. The goal is to hold cards for which the sum of numerical values is as large as possible without exceeding 21. All face cards (i.e., Jack, Queen, and King) count as 10 while an ace always counts as 1. The game begins with both dealer and player getting two cards each (all drawn cards are always shown to both players). Then, the player can draw additional cards, one by one (we say that the playerhits) until she/he either decides to stop (the playersticks) or exceeds 21 (the playergoes bust ). If the player goes bust, she/he loses; if she/he sticks, then it becomes the dealer’s turn. The dealer plays according to a fixed…

Preview

First page of the document.

First page: 15 01 2024 E TS