Search Header Logo
Library Routine and Arrays

Library Routine and Arrays

Assessment

Presentation

Computers

10th Grade

Easy

Created by

kt geethu

Used 2+ times

FREE Resource

4 Slides • 5 Questions

1

Multiple Choice

In order to explain what you mean to another programmer, you use
1
Comments
2
Indentations
3
Meaningful Variable Names
4
Functions and Procedures

2

Multiple Choice

Why do programmers want code to be maintainable
1
To make it easier to edit by other programmers
2
To lessen the chances of mistakes being made
3
To make it easier to make corrections and additions
4
All of the above

3

Multiple Choice

A subroutine that does return a value to the program that called it

1

Subroutines

2

Functions

3

Procedures

4

Parameters

4

Multiple Choice

The variable or constant that can be only be accessed in the subroutine it is declared within.

1

Local variable

2

Global

3

None of the options are correct

4

Parameters

5

Open Ended

LIST FOUR LIBRARY ROUTINES YOU HAD LEARNT IN THE CLASS

6

LIBRARY ROUTINE EXAMPLE

​import statistics
import numpy
data = [1, 2, 3, 4, 5]

# Using statistics.mean
mean1= statistics.mean(data)
print("Mean:",mean1)

# Using numpy.mean
mean2 = numpy.mean(data)
print("Mean",mean2)

7

QUESTION

Write a pseudocode & python code to simulate a temperature conversion program. Your program should: -

  • Prompt the user to enter a temperature in Celsius.

  • Convert the temperature to Fahrenheit using the formula: F = (C * 9/5) + 32.

  • Use the ROUND function to round the Fahrenheit temperature to two decimal places.

  • Display the rounded Fahrenheit temperature.

  • Use the MOD function to determine if the Fahrenheit temperature is an even or odd number. - Display whether the temperature is even or odd.

8

ARRAYS

9

DECLARATION

media
media
In order to explain what you mean to another programmer, you use
1
Comments
2
Indentations
3
Meaningful Variable Names
4
Functions and Procedures

Show answer

Auto Play

Slide 1 / 9

MULTIPLE CHOICE