logo

Crowdly

FONAMENTS D'INFORMÀTICA (Curs Total)

Looking for FONAMENTS D'INFORMÀTICA (Curs Total) test answers and solutions? Browse our comprehensive collection of verified answers for FONAMENTS D'INFORMÀTICA (Curs Total) at atenea.upc.edu.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Donat el següent programa:

a = int(input(¨Escriu un nombre: ¨))

if a % 2 != 0 :

print (¨primer¨)

elif a == 3 : 

print (¨segon¨)

elif a - 5 > 0 : 

print (¨tercer¨)

else: 

print (¨quart¨)

Què escriuria el programa pel canal de sortida en cas que l'usuari entrés un 3?

0%
0%
0%
0%
View this question

Donat el següent programa

i = 0

while i > 100 :

i = i + 1

print (i)

Què escriuria el programa pel canal de sortida?

0%
0%
0%
0%
View this question

Donat el següent programa:

a = int(input(¨Escriu un nombre: ¨))

if a % 2 == 0 :

print (¨primer¨ )

elif a == 3 : 

print (¨segon¨ )

elif a - 5 > 0 : 

print (¨tercer¨ )

else: 

print (¨quart¨ )

Què escriuria el programa pel canal de sortida en cas que l'usuari entrés un 3?

View this question

Donat el següent programa:

def area_triangle(b, h) :

a = b*h//2

return h

base = int(input("Escriu la base del triangle: "))

alcada = int(input("Escriu l'alçada del triangle: "))

area = area_triangle(base, alcada)

print(area)

Què escriuria el programa pel canal de sortida si l'usuari escrivís com a base 3 i alçada 4?

0%
0%
0%
0%
View this question

Donat el següent programa:

i = 0

while i < 10 :

if i == 3 :

print(9)

i = i +1

Què escriuria el programa pel canal de sortida?

View this question

Construïu una funció que, donats dos nombres real a i b, retorni el quadrat del màxim de dos valors.

def quadratmax(a, b) :

if a>b :

r = a

else :

r = b

[...]

 

Què hauria d'aparèixer en lloc dels [...]?

 

View this question

Donat el següent programa:

def funcio(x) :

if x > 0 :

x = x +1

if x - x == 0:

x = 2

x = 17

funcio(x)

print (x)

Què escriuria el programa pel canal de sortida?

0%
0%
0%
0%
View this question

Donat el següent programa:

a = int(input(¨Escriu un nombre: ¨))

if a % 2 != 0 :

print (¨primer¨ )

elif a == 3 : 

print (¨segon¨)

elif a - 5 > 0 : 

print (¨tercer¨ )

else: 

print (¨quart¨ )

Què escriuria el programa pel canal de sortida en cas que l'usuari entrés un 4?

View this question

Donat el següent programa:

i = 0

while i < 10 :

if i % 3 == 0 :

print(9, end=" ")

i = i + 1

Què escriuria el programa pel canal de sortida?

0%
0%
0%
0%
View this question

Donat el següent programa:

def funcio(x) :

y = 3

x = 4

x = 1

y = 2

funcio(y)

print (y)

Què escriuria el programa pel canal de sortida?

View this question

Want instant access to all verified answers on atenea.upc.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!