Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Examen

UAB CS103 Final Questions with complete solution 2025

Note
-
Vendu
-
Pages
19
Grade
A+
Publié le
30-08-2025
Écrit en
2025/2026

UAB CS103 Final Questions with complete solution 2025 What is a (univariate) function f(x) in mathematics? (Lecture 1) - correct answers a function of a single variable; distance is a function of time n!=# of ____ of a list of length n (Lecture 17) - correct answers permutations What is a variable x in mathematics? (Lecture 1) - correct answers a value that may change; an abstraction/generalisation What are the 2 key components of a recursive function? (Lecture 17) - correct answers base case and recursive call What is the precedence of the basic arithmetic operators? (Lecture 1) - correct answers when there is more than one arithmetic operator in an expression: multiplication, division, and modulo are calculated first, followed by subtraction and addition. If they have the same level of precedence, it is executed left to right. What is the base case for string reversal? (Lecture 17) - correct answers bc: base case t='' ###bc for c in s: t=c+t return t

Montrer plus Lire moins
Établissement
UAB CS103
Cours
UAB CS103

Aperçu du contenu

UAB CS103 Final Questions with
complete solution 2025
What is a (univariate) function f(x) in mathematics? (Lecture 1) - correct
answers a function of a single variable; distance is a function of time


n!=# of ____ of a list of length n (Lecture 17) - correct answers permutations


What is a variable x in mathematics? (Lecture 1) - correct answers a value
that may change; an abstraction/generalisation


What are the 2 key components of a recursive function? (Lecture 17) - correct
answers base case and recursive call


What is the precedence of the basic arithmetic operators? (Lecture 1) - correct
answers when there is more than one arithmetic operator in an expression:
multiplication, division, and modulo are calculated first, followed by subtraction
and addition. If they have the same level of precedence, it is executed left to
right.


What is the base case for string reversal? (Lecture 17) - correct answers bc:
base case




t='' ###bc
for c in s:
t=c+t
return t

,How do you express 4√3 in Python interpreter? (Lecture 1) - correct answers
import math
4*math.sqrt(3)


answer: 6.928203230275509


What is the base case of sum(n)? (Lecture 17) - correct answers bc: base
case




assert n >= 1
if n == 1: ###bc
return 1
else:
return n + sum (n-1)


How do you express 2/3π? Without parentheses? (Lecture 1) - correct
answers 2*π/3


What is the base case of lint(L)? (Lecture 17) - correct answers bc: base case
rc: recursive call




if L == []: ###bc 1
return True
elif type(L[0]) != int: ###bc 2

, return False
else: ###rc
return lint(L[1:])


What are the acceptable resources for coding? (Lecture 2) - correct answers
official Python documentation


What is the base case and recursive call of argmax(L)? (Lecture 17) - correct
answers bc: base case
rc: recursive call




assert len(L) > 0
if len(L) == 1: ###bc
return 0
else: ###rc
imax = argmax (L[:len(L)-1])
if L[-1] > L[imax]:
imax = len(L) - 1
return imax


What are the standard arithmetic operators (6 of them)? - correct answers
addition (+), subtraction (-), multiplication (*), division (/), exponentiation (**),
modulo (%), floor division (//)


Explain stacking (push and pop). (Lecture 18) - correct answers last-in-first-
out (LIFO)

École, étude et sujet

Établissement
UAB CS103
Cours
UAB CS103

Infos sur le Document

Publié le
30 août 2025
Nombre de pages
19
Écrit en
2025/2026
Type
Examen
Contient
Questions et réponses

Sujets

€16,14
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien


Document également disponible en groupe

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
Academia199 Chamberlain College Of Nursing
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
356
Membre depuis
3 année
Nombre de followers
209
Documents
19269
Dernière vente
1 semaine de cela

3,9

51 revues

5
27
4
7
3
7
2
3
1
7

Documents populaires

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions