An Introduction to Programming Through C++ Assignment 1 Answers 2022 | Week 1 Answers: QUIZXP

An Introduction to Programming Through C++ Assignment 1

Are you looking for the Answers to NPTEL An Introduction to Programming Through C++ Assignment 1? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course “ An Introduction to Programming Through C++ Assignment 1

What is An Introduction to Programming Through C++?

This course provides an introduction to problem solving and programming using the C++ programming language. The topics include:

  • Basic programming notions. Control flow, variables and assignments statements, conditional execution, looping, function calls including recursion. Arrays and structures. Elementary aspects of classes. Heap memory. 
  • Program design. How human beings solve problems manually. Strategies for translating manual strategies to computer programs. Organizing large programs into units such as functions and classes. Introduction to assertions and invariants.
  • Programming applications. Arithmetic on polynomials, matrices. Root finding. Sorting and searching. Design of editors and simulators, including graphical editors. Elementary animation. A rudimentary graphics system will be discussed.
  • Standard Library of C++. The string, vector and map classes.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Below you can find the answers for An Introduction to Programming Through C++ Assignment 1

Assignment No.Answers
An Intro to Programming C++ Assignment 1 Click Here
An Intro to Programming C++ Assignment 2 Click Here
An Intro to Programming C++ Assignment 3 Click Here
An Intro to Programming C++ Assignment 4 Click Here
An Intro to Programming C++ Assignment 5 Click Here
An Intro to Programming C++ Assignment 6 Click Here
An Intro to Programming C++ Assignment 7 Click Here
An Intro to Programming C++ Assignment 8 Click Here

An Introduction to Programming Through C++ Assignment 1 Answers:-

Suppose a “rightgoing step” consists of a upward going line of length 10 followed by a rightgoing line of length 10.  The following code draws 5 rightgoing steps, i.e. a staircase.  Assuming the turtlestarts pointing in the rightward direction, and assuming the steps rise by 50 in the right fill in the blanks.
repeat(5){ blankA; blankB; blankC; blankD;}

Q1. What is blankA?

Answer:- left(90)

Q2.What is blankB?

Answer:- forward(10)

Q3. What is blankC?

Answer:- right(90)

Q4. What is blankD?

Answer:- forward(10)

Suppose you decide to represent the cards in a standard deck using the numbers 1 through 52. So for this, the cards are arranged so that the clubs come first, then the diamonds, then the heards and then the spades. Also within a suit, the order of the cards is ace, then the cards 2 through 10, then the jack, then the queen, then the king. So after arranging the cards in this manner, the ith card is assigned thenumber i. Thus the king of spades will get the number 52, and the ace of clubs the number 1.

Q5. What number does the 9 of spades get?

Answer:- 48

Q6. Suppose some card has number n. I would like to know if it is a diamond. Which of the following tests will tell me if this is the case?

Answer:- b – ceiling(n/13) = 2

Suppose I choose to represent a number using floating point, in 32 bits, using the representation discussed in the lecture.  Which of the following are correct?

Q7. I will be able to exactly represent the number 100000000 (100 million).

Answer:- a – Yes

???? Next Week Answers: Assignment 02 ????

quizxp telegram

Q8. I will be able to approximately represent the number 1000000000000 (one trillion)

Answer:- b – No

Q9. I will be able to exactly represent the number 1000.

Answer:- a – Yes

Q10. I will be able to exactly represent the number 1/3 (one third).

Answer:- a – Yes

Q11. Consider the multiplication instruction defined in the lecture.
Suppose now that I have a program 57 100 200 300 57 300 200 400.Suppose initially the 6, 7, 8, 9 are stored in addresses 100, 200, 300, 400 respectively.  After executing the 2 instructions given above, what would be present at address 400?

Answer:- 294

Q12. What most closely matches A?

Answer:- d – H

Q13. What most closely matches B?

Answer:- b- F

Programming Assignment 1.1

Q1. Write a program that reads in numbers m, n and prints the letter X (capital X) m times followed by the letter Y (capital Y) n times, all in one line. Don’t write the #include < simplecpp > statement at the beginning of your code, directly start the main_program

Code:-

 int main() {
    int m,n;
    cin>>m>>n;
    while(m--)
    cout<<"X";
    while(n--)
    cout<<"Y";
    return 0;
}

Q2. Write a program that reads in a number m and prints a ‘*’ on m consecutive lines, followed by m+1 ‘*’s on a single line.  The result should look like the letter L made out of stars. You can go to a new line in the output using cout << endl; .Don’t write the #include < simplecpp > statement at the beginning of your code, directly start the main_program

Code:-

main_program{
int m;
cin>>m;
repeat(m){
cout<<"*"<<endl;
}
repeat(m+1){
cout<<"*";
}
}
quizxp telegram

For other courses answers:- Visit

For Internship and job updates:- Visit