Explanation of Solution
Given: The following lines of code with a list box:
Dim a As Integer = 4
Dim b As Integer = 2
Dim c As String = "Municipality"
Dim d As String = "pal"
lstBox.Items.Add(c.Length)
lstBox.Items.Add(c.ToUpper)
lstBox.Items.Add(c.Substring(a, b) & c.Substring(5 * b))
lstBox.Items.Add(c.IndexOf(d))
To find: The output of the lines of code that are displayed in the text box or list box.
Dim a As Integer = 4
Dim b As Integer = 2
Dim c As String = "Municipality"
Dim d As String = "pal"
lstBox.Items.Add(c.Length)
lstBox.Items.Add(c.ToUpper)
lstBox.Items.Add(c.Substring(a, b) & c.Substring(5 * b))
lstBox.Items.Add(c.IndexOf(d))
Solution:
In the aforementioned lines of code, the integer type variables, a and b, are declared and initialized to 4 and 2, respectively whereas the string type variables, c and d, are declared and initialized to “Muncipality� and “pal�, respectively...
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Introduction To Programming Using Visual Basic (11th Edition)
- Flowchart, create. Using Python's Built-in Methods in Python sample = input("Enter a string or done when you want to quit: ") def lower(sentence): return sentence.lower() def upper(sentence): return sentence.upper() while sample != "done": # Call the lower method here and print the result. result=lower(sample) print("Lowercase: " + result) result=upper(sample) # Call upper method here and print the result. print("Uppercase: " + result) sample = input("Enter a string or done when you want to quit: ")arrow_forwardMenu option C The program reads in data from HowManyHours.txt, displays a report header with the report creator’s name, employee id, and department and who they created the report for. The body of the report displays the total number of students who used the program, the average credits taken, and the average study hours. In the following format –STUDY HOURS REPORT Created for Dr. Payne, A004567893 Dept: Computer Science Created By: Karen Smith, A00494928Dept: Advising Total Students: 3Average Credits: 9.00Average Study Hours: 20.00Menu option DThank the user for using the programTerminates the programarrow_forwardA vertical tab escape sequence. \n O lb If char is a letter of the alphabet, this function returns non-zero; otherwise, it returns zero. O isalphabet() O isletter() O isalpha() () If char is a punctuation character (except the space), this function returns non-zero; otherwise, it returns zero. issymbol 0 ispunct) O ispunctuation) O isspecial()arrow_forward
- Topic: Nested for-loop Question is at the bottom.arrow_forwardType the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. var num2 = 32;var num1 = 12;var rem=num2 % num1;while(rem > 0) { num2 = num1; num1 = rem; rem = num2 % num1; }document.write(num1); The output of the document.write statement at the end of this block isarrow_forwardWhich part of a paragraph often illustrates the point being made?arrow_forward
- Flag question: Question 47 There is an important difference between a significant result and a meaningful result. Group of answer choices A.True B.Falsearrow_forwardTask 3: High cholesteral and high triglycerides have been assicuated with cardiovascular disease. During yearly medical visits a doctor might recommend certain actions if certain test results are received (see Table 1). Write a program that allows the user to enter the numeric cholesteral and triglyceride results and the gives the doctor a recommendation. Please show step-by-step on LabVIEW. Table 1 Recomendation Triglyceride (mg/fL) Total cholesteralSuggest a full workup >886 >240 mg/dLSuggest change in diet 500 to 886 200 to 239Suggest change in activity 150 to 499 N/AAll good <150 <200 Task 4: Create a new version of your file for Task 4. Add two boolean indicators (Round LED). Oneshould light up when both Triglyceride AND Cholesteral levels are in the “All good” range. Theother should light up when either Triglyceride OR Cholesteral levels are in the “Suggest a fullworkup” range. Please show step-by-step on LabVIEW.arrow_forwardCreate an algorithm and draw its appropriate flowchart about study routine of a studentarrow_forward
- please give me answer within 30 to 40 mins .its request to you tutor Write a program that will get input from the users, validate the input data, load the data into a list, print the list data in columns. Add a menu with options to add data, print data and quit. The program should process a minimum of 2 string inputs, and 1 number input. Students will use the files supplied for the case study. The first student listed in Moodle for the team will process 3 fields from the first file. The second student listed will process 3 fields from the second file. The three student will process 3 fields from the two files. The forth student will process 3 fields from the sample below. Instead of pseudocode, answer the following questions at the top of your program:1) What are the input field?2) What calculations or processes are done to the data?3) What is the output? Bonus: Write the list to a 2-dimensional file, with the data separated by commas. Sample menu: 1) Add data 2) Print data…arrow_forwardQ1)Research our planet population growing issues online. Get approximations for the current population and its growing rate (the percentage by which it’s likely to increase this year). Write a program that calculates a)World population growth each year for the next 25 years, using the supposition that the current growth rate will remain unchanged. b)Print the results in a table. The first column should display the year from year 1 to yearThe second column should display the anticipated world population at the end of that year.The third column should display the numerical increase in the world population that would occurthat year.arrow_forwardThis method erases one item from a list box.a. Eraseb. Items.Removec. Items.RemoveItemd. Cleararrow_forward
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning