☰ Contents · Computing

Subprograms: functions and procedures

Lessons 47–48 · 2 lessons · M. R. Fayziyeva, D. M. Sayfurov, N. S. Xaytullayeva. Informatics and Information Technologies, Grade 9. “Nashriyot uyi Tasvir”, Tashkent, 2020
Answers are for parents and teachers.
1
Write a function kub(x) that returns the cube of a number and print kub(3).
2
Write a procedure that prints the numbers from 1 to n (1 2 3 4 for n = 4).
3
What is the recursive function fakt(3) equal to?
4
State the difference between a function and a procedure.