# Tutor profile: Sofia P.

## Questions

### Subject: Python Programming

Consider the (buggy) code below: def divide_and_round(n): """ Divides an integer n by 2 and rounds up to the nearest whole number """ if n % 2 == 0: n = n / 2 else: (n + 1) / 2 return n def main(): n = 42 divide_and_round(n) print(n) A. What will be printed at the end of the program? Why? B. What changes can you make to the program for it to print 21?

A. The divide_and_round function correctly divides n by 2 and rounds up to the nearest whole number, but does not return or print n. Therefore, the value of n in main’s print statement is still 42, and so 42 gets printed. B. def divide_and_round(n): """ Divides an integer n by 2 and rounds up to the nearest whole number """ if n % 2 == 0: n = n / 2 else: # assigns the answer to the equation the 'n' variable n = (n + 1) / 2 # returns the updated 'n' value (21) return n def main(): n = 42 # divide_and_round is called and puts 'n' (42) into its function # 'n =' is important because it 'catches' what divide_and_round returned (21) n = divide_and_round(n) print(n)

### Subject: Spanish

Transforme la siguente frase directa a una frase indirecta: El presidente del gobierno declaró: "estoy seguro de que, con mi nueva propuesta, a partir de ahora las leyes protegerán mejor a los ciudadanos".

El presidente del gobierno declaró que él estaba seguro de que, con su nueva propuesta, a partir de ahora las leyes protegerán mejor a los ciudadanos.

### Subject: SAT

Also, studies have found that those students who major in linguistic anthropology often do better than students from other majors in both verbal reasoning and analytical writing. These results can be measured by standardized test scores. Which choice most effectively combines the sentences at the underlined portion? A) writing as B) writing, and these results can be C) writing, which can also be D) writing when the results are

A

## Contact tutor

needs and Sofia will reply soon.