Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

PARTIAL EXAM REVIEW 4 PAGES

1.A programming language is a language that computers can understand.Every


programming language has its own set of rules that determine if a line of code is valid or not.

2.What are built in functions,Are basically tasks that are already defined in the
programming language.This lets us use them directly in our code by writing their names
and by specifying the values they need.

3.Write the names of the most common programming languages used today. Python,
JavaScript, TypeScript, Java, C, C#, C++, PHP, Go, Swift, SQL,

4.What is programming?. It is the process of writing code to solve a particular problem or


to implement a particular task.

5.Why is programming important in the usage of programs inside electronic devices we use
every day? Programming is what allows your computer to run the programs you use
every day and your smartphone to run the apps that you love. It is an essential part of our
world as we know it.

6.Code is a sequence of instructions that a programmer writes to tell a device (like a


computer) what to do.

7 A developer (or programmer) is the person who analyzes a problem and implements a
solution in code.

8.Syntax (a set of rules for writing the code).The structure of statements in a computer
language.

9.High level programming language:A programming language with a syntax that


recognizes specific word(called keywords),symbol and values of different data types.

10.Every programming language has its own set of keywords (words written in English).
These keywords are part of the syntax and core functionality of the programming
language.

11.Compilation the transformation of source code that humans can understand into
binary code that the computer can understand

12.According to Britannica, a compiler is defined as a computer software that translates


(compiles) source code written in a high-level language (e.g., Python) into a set of
machine-language instructions that can be understood by a digital computer’s CPU.
13.The term compiler was coined by American computer scientist Grace Hopper, who
designed one of the first compilers in the early 1950s.

14.Python Is a popular programming language. It was created by Guido van Rossum,


and released in 1991.

15.The most recent major version of Python is Python 3.

16.Python was designed for readability, and has some similarities to the English
language with influence from mathematics.

17.Indentation refers to the spaces at the beginning of a code line and is used to indicate
a block of code.

18.Python Keywords are the words that are reserved. That means you can’t use them as
name of any entities like variables, classes and functions.

19. OR Is a logical operator used when either one of the conditions needs to be true.

20.Python identifier Is the name we give to identify a variable, function, class, module or
other object. That means whenever we want to give an entity a name.

21.a Variable ,as the name indicat+1es is something whose value is changeable over
time.

22. DEF Is a keyword used in Python for defining a function.

23.Identifiers can be a combination of uppercase and lowercase letters, digits or an


underscore(_). So myVariable, variable_1, variable_for_print all are valid python
identifiers

24. An Identifier can not start with digit. So while variable1 is valid, 1variable is not valid.

25.A constant (also known as Const) is a term used to describe a value that does not
change throughout the execution of the program,unlike a variable.

26.Data types is the classification of a particular type of data. We as humans can


understand the difference between a name and a number, but the computer cannot.

27.Programming is indeed related to binary numbers but in an indirect way. Developers


do not actually write their code using zeros and ones.
28.A special, unexpected and anomalous condition encountered during the execution of
a program is known as a bug.

29.Every time you turn on your smartphone, laptop, tablet, smart TV, or any other
electronic device, you are running code that was planned, developed, and written by a
developer.
30.Whenever you check your calendar, attend virtual conferences, browse the web, or
edit a document, you are using a code that has been written by developers.

31.A loop is a sequence of instructions that repeat the same process over and over until
a condition is met and it receives the order to stop.

32.Words that are reserved by a programming language or a program as they have


special meaning are known as keywords.

33.An operand is a term used to denote the objects which can be manipulated using
different operators. In the expression ‘A+F+Q’, ‘A’, ‘F’ and ‘Q’ are operands.

34.The number of spaces is up to you as a programmer, the most common use is four,
but it has to be at least one.

35.Also known as machine code, machine language is a lowest-level programming


language consisting of binary digits or bits that are read by computers.

36.A markup language is a relatively simple language that consists of easily understood
keywords and tags, used to format the overall view of the page and its contents.

37.Syntax is similar to human languages, programming languages have their own set of
rules on how statements can be conveyed.

38.PYTHON KEYWORDS:DEL:used for deleting objects in PYTHON. IS:Used to test for


equality. NONE:represents a null value in PYTHON. NOT:logical operator to negate a
condition. INPUT:used to import modules.

39...PYTHON CODING PROGRAMS AND ALGORITHMS TO REVIEW AND PRACTICE(For


the partial exam you need a pencil,eraser to write the algorithm and program.)NO LIQUID
PAPER.

A)
# Python Program to calculate the square root

# Note: change this value for a different result


num = 8
# To take the input from the user
#num = float(input('Enter a number: '))

num_sqrt = num ** 0.5


print('The square root of %0.3f is %0.3f'%(num ,num_sqrt))

B)
# Python3 program to add two numbers
num1 = 15
num2 = 12

# Adding two numbers


sum = num1 + num2

# printing values
print("Sum of", num1, "and", num2 , "is", sum)

C)
celsius = int(input("Enter the Temperature in Celsius :\n"))
fahrenheit = (1.8 * celsius) + 32
print("Temperature in Fahrenheit :", fahrenheit)

D)
Algorithm for Python Program to Add Two Numbers:
Declare two variables.
Initialize the variables with some values.
Declare another variable to store the sum of the numbers.
Apply the mathematical plus(+) operator between two values and store the result.
Method 1: Standard program to add two numbers in python
Python
a = 25
b = 25
sum = a + b
print("The sum of two numbers is:", sum)

E)
miles = float(input("Please enter miles:"))
kilometers = miles * 1.6
print(kilometers, " Kilometers")

Kilometers = float(input("Please enter kilometers:"))


Miles = Kilometers*0.62137
print(Miles,"Miles")

You might also like