Write the code given below using ‘for’ loop instead of ‘while’ loop : -Technology

1 Answer

Answer :

The given code using ‘for’ loop instead of ‘while’ loop :int ifor (i = 1 ; i < = 5 ; i + +){if (1 * i = = 4)jTextFieldl. setText ( “ “ + i) ;}

Related questions

Description : Rewrite the following code using WHILE loop : -Technology

Last Answer : int x = 100 , i = 2;while (i < = 22){jTextAreal . append(' '+(i + x) ) ;x = x - 2 ;i = i + 4;}

Description : Rewrite the following code using for loop: int attempt=0; -Technology

Last Answer : for(int attempt=0;attempt

Description : Write the HTML code to create the exact table which is given below: ADMNO SNAME NAME DOB -Technology

Last Answer : The HTML code is ADMNO SNAMENAMEDOB1110MANJITRANJIT4-MAR-1998

Description : Write the HTML code to generate the following web page with the given below specifications: -Technology

Last Answer : Income Tax Slabs 2017-18INCOME TAX SLABS 2017-18S.No.Income RangeTax%10-250000NIL2250001-50000010%3500001-100000020%4>100000030%Next Page

Description : Write a code to plot the speed of a passenger train as shown in the figure given below: -Technology

Last Answer : import matplotlib.pyplot as pltimport numpy as npx = np.arange(1, 5)plt.plot(x, x*1.5, label='Normal')plt.plot(x, x*3.0, label='Fast')plt.plot(x, x/3.0, label='Slow')plt.legend()plt.show()

Description : Write a python code to create a data frame with appropriate headings from the list given below : -Technology

Last Answer : import pandas as pd# initialize list of listsdata = [['S101', 'Amy', 70], ['S102', 'Bandhi', 69], ['S104','Cathy', 75], ['S105', 'Gundaho', 82]]# Create the pandas DataFramdf = pd.DataFrame(data, columns = ['ID', 'Name', 'Marks'])# printdataframe. print(df )

Description : Write the HTML code to generate the following table on a Web page with the contents and alignment exactly as shown below: -Technology

Last Answer : The HTML code is

Description : Draw the XML tree for code given below: -Technology

Last Answer : The XML tree is

Description : Draw the XML tree for the code given below: -Technology

Last Answer : The XML tree is

Description : Draw the XML tree for the code given below -Technology

Last Answer : The XML tree is

Description : Draw the XML tree for the code given below: -Technology

Last Answer : The XML tree is

Description : Draw the XML tree for the code given below: -Technology

Last Answer : Draw the XML tree

Description : Dev, a website designer with “Creative Designers Pvt. Ltd.” has written the following code. Observe the code given below -Technology

Last Answer : (i) XML code(ii) Company(iii) name, dept(iv) eid, deptid

Description : Write some code for a while loop. 

Last Answer : int n = 1; while (n < 6) { Console.WriteLine("Current value of n is {0}", n); n++; }

Description : How many times the above given loop will run and what will be the value of ctr, immediately after exiting from the loop. -Technology

Last Answer : (i) 3 times4(ii)Above given loop will come under Entry controlled loop as in the above given loop condition is being checked at the time of entering in the loop.

Description : Write a short code using C++ to print out all odd number from 1 to 100 using a for loop

Last Answer : for( unsigned int i = 1; i < = 100; i++ ) if( i & 0x00000001 ) cout

Description : With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below: -Technology

Last Answer : (i) select TName, Passenger from Train T, Reservation R where T.TrainId=R.TrainId;(ii) select T.* from Train T, Reservation R where T.TrainId!=R.TrainId;(iii)TrainIdTNameSourceDestination3424Lucknow MailLucknowNew Delhi5400Century ExpressNew DelhiKanpur

Description : Write a small python codeto create a dataframewith headings(a and b) from the list given below : [[1,2],[3,4],[5,6],[7,8]] -Technology

Last Answer : import pandas as pddf = pd.DataFrame([[1, 2], [3, 4]], columns = ['a','b'])df2 = pd.DataFrame([[5, 6], [7, 8]], columns = ['a','b'])df = df.append(df2)

Description : How many times will the loop execute? int value1 = 7. value2=19 ; do -Technology

Last Answer : 4 timeswill the loop execute.

Description : While writing HTML code, how do you find out how your Web page would look like? -Technology

Last Answer : For this, open the HTML code file in a Web browser.

Description : Write a ‘C++’ program to find factorial of given number using loop.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int no,fact=1,i; clrscr(); cout<<"Enter number:"; cin>>no; for(i=1;i<=no;i++) { fact=fact*i; } cout<<"Factorial ="<<fact; getch(); }

Description : Make only ONE submit (View) button instead of 4 in code below?

Last Answer : PS: it's a Wordpress theme plugin, that allows users to browse listings; i want users to be able to choose 4 options and submit their search with only one button; The existing code presents 4 Submit ... categories he wants and press submit, and the result should appear based on AND not or

Description : Given below is a diagrammatic cross section of a single loop of human cochlea. A C D B A Which one of the following options correctly represents the names of three different parts? (a) D : Sensory hair cells ... : Perilymph, D: Secretory cells (d) C : Endolymph, D : Sensory hair cells, A : Serum

Last Answer : (d) C : Endolymph, D : Sensory hair cells, A : Serum

Description : Match the items given in column I with those in column II and select the correct option given below. Column I Column II (Function) (Part of excretory system) A. Ultrafiltration (i) Henle's loop B. Concentration (ii) Ureter of urine C. ... (ii) (iii) (c) (v) (iv) (i) (ii) (d) (v) (iv) (i) (iii)

Last Answer : (b) (iv) (i) (ii) (iii)

Description : Write some code for a for loop 

Last Answer : for (int i = 1; i <= 5; i++) Console.WriteLine(i);

Description : By using ................... you can force immediate termination of a loop, by passing the conditional expression and any remaining code in the body of the loop. A) Break B) Continue C) Terminate D) Loop Close

Last Answer : A) Break

Description : Write command for the operations (i) to (iii) based on the spreadsheet below: -Technology

Last Answer : 1. At cell F2, type =D2*E2 and then copy this formula using mouse Fill handle onto range F3: F5.2. At cell G2, type =IF(C2=”Consumable”, F2*0.07, F2*0.11) and then copy this formula using mouse Fill handle onto range G3: G5.3. At cell G6, type =SUM(G2: G5).

Description : In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown below. Write a query to display customer’s name who has -Technology

Last Answer : (i) Select cust_name from customer c,transaction t where c.Acc_No=t.Acc_No and Transaction_Type= 'Debit';(ii)Select cust_name, t.* from customer c, transaction t where c.Acc_No=t.Acc_No;(iii) ... total amount of all type of transactions, it will only display the total of credit transactions only.

Description : Identify the topology shown below. Write 2 advantages of this topology. -Technology

Last Answer : Star Topology Two advantages of star topology are as follows :1. Easy to detect faults and remove It.2. Failure to single system will not bring down the entire network.

Description : Identify input/output devices from the clues given below: (a) Transfers typed or handw -Technology

Last Answer : (a) Scanner(b) Barcode reader(c) Optical Mark Recognition (OMR)(d) Magnetic Ink Character Recognition (MIGR)(e) Printer (f) Speaker

Description : The director of a company uses a database to store data about job title. This is a part of the database given below: -Technology

Last Answer : 1. 62. 63. Secretary4. Finance department and their Payroll Numbers are A621 and M502.

Description : Name the term defined by given below statement: “A group of computers connected to each other by a link.” -Technology

Last Answer : Computer network is defined as a group of computers connected to each other by a link.

Description : Answer the following questions based on the database given below: Prod_Id Prod_Name Category -Technology

Last Answer : 1. The primary key of the given table Product will be Prod _Id because no two products have the same Product_Id. So, it will be uniquely identified for each record in the table.2. The suitable data ... = 88. The data type OLE Object is suitable for adding the photograph of the product to the table.

Description : Some features of a specific operating system are given below: 1. Free/Open source -Technology

Last Answer : (i) Linux(ii) With Linux, you get four desktop screens known as workspace.

Description : Carefully study the Web page given below. Identify 10 tags (structural as well as formatting tags) that have been utilized -Technology

Last Answer : 1. to specify the title of the Web page.2. contains all the content that is to be displayed on the Web page and all the various formatting and structural tag.3. used to create an unordered ... anchor tag. Use the href attribute to provide the reference of the Web page that you want to hyperlink.

Description : Carefully study the Web page given below. Identify 10 tags (structural as well as formatting tags) that have been utilized in creating this -Technology

Last Answer : 1. to specify title of the Web page.2. contains all the text content that is to be displayed on Web page and all the various formatting and structural tag.3. defines the most important and biggest ... provide caption to the table.9. used to create a table row.10. used to define data cells.

Description : Consider the following dataframe, and answer the questions given below: -Technology

Last Answer : (i) print(df.mean(axis = 1, skipna = True)) print(df.mean(axis = 0, skipna = True))(ii) print(df.sum(axis = 1, skipna = True))(iii) print(df.median())

Description : Consider the table ‘Teacher’ given below. -Technology

Last Answer : (i) Select count(Department) from Teacher ;(ii) Select count (*) from Teacher ;

Description : Consider the tables given below. Salesperson -Technology

Last Answer : (i) Primary, Foreign(ii) Salespersons cannot be set as the primary key in the table Orders because table Orders has already primary key and one table cannot have more than one primary key column.

Description : Consider the table STUDENT given below: RollNo Name Class DOB Gender City Marks 1 Anand XI 6/6/97 M Agra 430 -Technology

Last Answer : (1)b. Both (iii) and (iv)(2) b.RollnoNameClassDOBGenderCityMarks6734MaakhiyNehaGeetPreetiXIXXIXII12/12/948/12/956/5/978/8/95FFFFDubaiMoscowAgraMumbai256324470492

Description : A relation Vehicles is given below : V_no Type Company Price Qty AW125 Wagon Maruti 250000 25 J0083 Jeep Mahindra 4000000 15 -Technology

Last Answer : a. select Type, avg(Price) from Vehicle group by Type having Qty>20;b. select Company, count(distinct Type) from Vehicle group by Company;c. Select Type, sum(Price* Qty) from Vehicle group by Type;

Description : Write HTML code to set the image ‘Pen. jpg’ stored in ‘My Pictures’ folder in C: -Technology

Last Answer : The HTML code is .

Description : Write the extension of HTML code file. -Technology

Last Answer : The extension of HTML code file is.html or .htm

Description : Identify the error(s) in the following HTML code. Also, write the correct code. -Technology

Last Answer : The error in the code is that in place of color attribute there should be bgcolor.The correct code is

Description : What is the use of tag in HTML code? Write any two options used with this tag. -Technology

Last Answer : The tag is used to change the size, color and type face of the text on HTML page. It uses attributes such as size, face etc.

Description : Identify the errors and write the correct HTML code 1. -Technology

Last Answer : 1. 2.

Description : Write the HTML code to display horizontal line of red color. -Technology

Last Answer :

Description : What is the use of tag in HTML code? Write any two attributes used with this tag. -Technology

Last Answer : The tag encloses the main part of the document. It contains all the contents of a document. Various markup elements are allowed within the body to indicate headings, paragraphs, lists, hypertext links, images and so on. The tag uses various attributes such as background, bgcolor etc.

Description : Write the HTML code to set the bgcolor as pink, heading level 2, text -Technology

Last Answer :

Description : Write the HTML code to create a paragraph whose text color is blue. -Technology

Last Answer : or