Answers On/OffJS required
Group A
- Q.Answer the following questions in one sentence:(a) List any two features of a computer.(b) Who invented the Tabulating Machine?(c) List any two formatting tag in HTML.(d) Name any two popular web browsers.(e) Write the function of INT and MID$ in QBASIC.(f) What is a nested loop?A.
- Speed and accuracy.
- Storage capacity.
Herman Hollerith invented Tabulating Machine.- (Bold)
- (Italic)
- Google Chrome
- Mozilla Firefox
- INT: Returns the integer part of a number by removing the fractional part.
- MID$: Extracts a substring from a string, given the starting position and length.
A nested loop is a loop inside another loop. The inner loop runs completely for each iteration of the outer loop. - Q.Write appropriate technical terms for the following:(a) A display device that allows us to select commands directly by touching the screen.(b) Utility program that removes the fragmented area of a disk.A.TouchscreenDisk Defragmenter
- Q.Write the full form of the following:(a) USB(b) IoTA.Universal Serial BusInternet of Things
Group B
- Q.Answer the following questions(a) Differentiate between analog and digital computer.(b) Why is secondary memory used for future storage? Explain with its types.(c) Define computer software with its importance in computer systems.(d) What is computer graphics? List a few application areas of computer graphics.(e) What is cloud service? Give any two examples.(f) Differentiate between empty and container tags with examples.(g) What is CSS? What are the advantages of using CSS?(h) Write the purpose and syntax of the following HTML tags.(i) <A> tag:(ii) <U> tag:(i) Write down the HTML code for the following tasks:(i) To draw a horizontal line across the page.(ii) To create animation effect.A.Secondary memory is used for long-term storage because it is non-volatile and has larger storage capacity than primary memory.Types of secondary memory:
- Hard Disk Drive (HDD)
- Solid State Drive (SSD)
- CD/DVD
Computer software refers to the programs and instructions that tell the hardware what to do. It is important because it enables the hardware to perform specific tasks.Computer graphics refers to the creation, manipulation, and representation of visual images using computers.Application areas:- Video games
- Animation movies
- CAD (Computer-Aided Design)
- Medical imaging
Cloud service is a service provided over the internet, where resources like storage, computing, or networking are offered on-demand.Examples:- Google Drive
- Amazon Web Services (AWS)
CSS (Cascading Style Sheets) is used to define the layout and style of HTML elements.Advantages of CSS:- Separation of content and design.
- Easier to maintain and update website styles.
- Reduces the size of HTML files.
- Purpose: Creates a hyperlink to another page or resource.
- Syntax: Link text
- Purpose: Underlines text.
- Syntax: Underlined text
<hr><!DOCTYPE html><html lang="en"><head><style>@keyframes myanimation {from {background-color: red;}to {background-color: yellow;}}div {width: 100px;height: 100px;animation-name: myanimation;animation-duration: 2s;}</style></head><body><div></div></body></html> - Q.Write down the output of the given program.Show with dry run in table.CLSA = 5B = 1FOR I = 1 TO 10 STEP 2PRINT AA = A + BNEXTENDA.Final Output:56789
- Q.Re-write the given program after correcting the bugs:REM program to print multiplication table of 7CLSN=7L=1WHILE L<=10DISPLAY N*L;"=";N*LL=L+1WENDENDA.Corrected:REM Program to print multiplication table of 7CLSN = 7L = 1WHILE L <= 10PRINT N; "*"; L; "="; N * LL = L + 1WENDENDOutput:7 * 1 = 77 * 2 = 147 * 3 = 217 * 4 = 287 * 5 = 357 * 6 = 427 * 7 = 497 * 8 = 567 * 9 = 637 * 10 = 70
- Q.Study the following program and answer the given questions:FOR K = 1 TO LEN(S)MID$ (S, K, 1)IF LCASE(S, K, 1)) = "n" THEN N = N + 1NEXTPRINT NEND(a)How many times does the loop executes?(b) List the library functions used in the above program.A.
- The loop executes LEN(S) times.
- LEN("KATHMANDU PARSON") = 17
So, the loop runs 17 times.LEN(S) → Returns the length of the string.MID$(S, K, 1) → Extracts a single character from the string at position K.LCASE$(S) → Converts the character to lowercase.
Practice Without Boundaries.
Premium gives you full access, zero ads, and unlimited custom paper generation. Study your way, every day.
Group C
- Q.Write a program in QBASIC to find area of circle.A.CLSINPUT "Enter radius of the circle: ", RA = 3.1416 * R * RPRINT "The area of the circle is: "; AEND
- Q.Write a program in QBASIC that asks three numbers and find average of the numbers.A.CLSINPUT "Enter first number: ", AINPUT "Enter second number: ", BINPUT "Enter third number: ", CAVG = (A + B + C) / 3PRINT "The average is: "; AVGEND
- Q.Write a program to check whether a supplied number is palindrome or not.A.CLSINPUT "Enter a number: ", NS$ = STR$(N)R$ = ""FOR I = LEN(S$) TO 1 STEP -1R$ = R$ + MID, I, 1)NEXTIF S$ = R$ THENPRINT "The number is a palindrome."ELSEPRINT "The number is not a palindrome."END IFEND
- Q.Write a program to find sum of odd numbers up to 50 by using an array.A.CLSDIM A(25)SUM = 0N = 1FOR I = 1 TO 25A(I) = NSUM = SUM + A(I)N = N + 2NEXTPRINT "Sum of odd numbers up to 50: "; SUMEND
- Q.Write a program to display following series 1, 4, 9, 16,..., up to 10th terms.A.CLSFOR I = 1 TO 10PRINT I * INEXTEND