In this blog post, you will find all the Solutions to the L16 questions of the Codetantra Python Programming Course. Here are the answer to these question:-
Q1 :- L16/Pseudo Code/Pseudo Code :- Select all the correct statements
Programs written in pseudo code can be compiled and executed.
Pseudo code has no standards but guidelines exist.
You should know programming language to write pseudo code.
Multi line iterations cannot be represented in pseudo code.
Q2 :- L16/Pseudo Code/Understand Pseudocode syntax :- Select all the correct statements given below.
In an if-else condition, the else part gets executed if the condition is true.
In the For-loop, the condition is evaluated for each iteration of the loop.
The While loop is executed only when the condition is false.
In the While loop, the condition is evaluated for each iteration of the loop.
Q3 :- L16/Pseudo Code/Write a program using the pseudo code :- Write the program in Python by referring to the pseudo code above to print sum of natural numbers. Take from the user apd print the result as shown in the examples.
n = int(input(“num: “))
sum = 0
if(n>0):
while(n>0):
sum = sum + n
n = n-1
print(“sum:”,sum)
else:
print(“enter positive value”)
Q4 :-L16/Pseudo Code/Advantages and Disadvantages of Pseudo code :- Select the correct statements from the given points
The advantage of Pseudo code is that it is ambiguous and uncertain.
Pseudo code can be translated to high level languages.
Pseudo code, by nature, is structured and expressive.
Pseudo code is understandable to the programmers as well as to the users.
Q5 :- L16/Flow Charts/What is a Flowchart? :- Select the correct statements from the given points.
Diamond shaped symbol is used in the flowcharts to indicate a decision (or branching).
A flowchart is a pictorial representation of an algorithm.
An algorithm and a flowchart can help us to specify the sequence of steps to solve a given problem.
A flowchart gives us a clear overview of the program but not the solution.
Q6 :- L16/Flow Charts/Area of Circle - Algorithm and Flowchart :- Write a program to calculate the area of a circle and print the result as shown in the example.
radius = float(input(“Enter the radius: “))
area = 3.14* (radius**2)
if (radius >= 0):
print(“Area of circle = {:.6F}”.format(area))
else:
print(“Enter a positive value upto 100”)
Q7 :- L16/Flow Charts/Rules of drawing flowchart, advantages and disadvantages :- Select the correct statements given below:
Flow charts help in understanding the logic of a program.
Flowcharts help in debugging process.
Flowcharts may become complex and clumsy for simple problems.
A lot of time is needed for drawing flow charts for large projects.
Hope this blog post was helpful to you and you have got the answer to your question. Thank you for visiting our blog. If you have any doubts about any coding questions then let us know in the comments section we will answer them as soon as possible. Till then check out our more blog posts.