Concept explainers
Explanation of Solution
Given: The response “tied� should be assumed for the following lines of code:
Dim word As String
word = InputBox(“Word to negate:", "Negatives")
txtOutput.Text = "un" & word
To find: The output produced by the given lines of code.
Dim word As String
word = InputBox(“Word to negate:", "Negatives")
txtOutput.Text = "un" & word
Solution:
In the given lines of code, a variable named “word�, which is of the type, string, is declared. The value is read from the user and assigned to the variable, “word�. The textbox will show the output by concatenating the keyword, “un�, before the entered word. The Input box will ask for the word to negate from the user, and then the textbox will show the output...
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
- Posted 3rd time Answer correctly this time else direct downvotearrow_forwardConvert Months Write a program that allows the user to enter a whole number of monthsand then converts that amount of time to years and months. See Fig. 3.38. The programshould use both integer division and the Mod operator.arrow_forwardinitial value: 15 final grade: 38 multiples: 15 18 21 24 27 38 create an algorithm with algorithmic text to display multiples of 3, with "initial value, final value and range in the form of input from the user". a. the while - do structure b. repeat structure - untilarrow_forward
- Lab Activity for the students: Exercise 5: Write a program that asks the user to input a letter. The program finds and prints if the letter is uppercase or lowercase. Then, the program asks the user to input a string and get a three-character substring from the beginning of the string. (1 Mark ) Example : If the inputs are 'y' and "Community". Then, the program will print: y is lowercase The substring is: Comarrow_forwardAlgorithm Steps Fig 2: (I have provided an algorithm and fewer code hints) 1. Set coordinates for NORTH, SOUTH, WEST, and EAST each 100pixels away from center (0,0) 2. Set outer circle size = 40 and inner circle size = 20 3. Set window size 600x600 4. Draw y-axis by connecting NORTH and SOUTH 5. Draw x-axis by connecting WEST and EAST 6. Display name of coordinates 7. Position point to draw circle 8. Set angle 90 degree 9. Set color to red 10. Draw outer circle 11. Draw inner circle and fill redarrow_forwardLocate a Letter Write a program that requests a letter, converts it to uppercase, and gives its first position in the sentence “THE QUICK BROWN FOX JUMPS OVER A LAZY DOG.” See Fig. 3.31.arrow_forward
- Program Specifications Write a program to calculate a course grade given points for homework, quizzes, midterm exam, and final exam. Grades are calculated differently for undergrads, grads and distance learners.Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step 1 (2 pts). Read from input student status (String), homework points, quiz points, midterm exam score, and final exam score (double). Valid student status includes undergrad (UG), grad (G), and distance leaner (DL). Calculate each category average using maximum points for homework (800), quizzes (400), midterm exam (150), and final exam (200). Output an error message if student status is not one of the three options. Otherwise, output category averages as a percentage using System.out.printf("Homework: %.1f%%", homework). Submit for grading to confirm two tests pass.Ex: If the…arrow_forwardQuestion2: Write a program to determine a student's final grade for (Structure, Strength of materials, and Engineering Mathematics) indicate whether it is passing or failing. The final grade is obtained by adding the sum of the oral, attendance, and theoretical activity grades to the average of the three material. by QBasicarrow_forward3. Strings Given a string variable Program =' Data Science,' , School= ' Howard University ' a) Add the two strings Program and School, then name it College b) Find the character at position 4 of College. ( remember that the first character has the position 0) c) Find the characters from position 4 to 10 of College. d) Change the string variable College to upper case and name it College_upper e) Change the string variable College to lower case and name it College_lower f) Remove the white spaces in the string variable College_upper and name it College_new g) Replace 'DATA' by 'ACTUARIAľ in the string College_new h) Splits the string College_new into substrings if it finds instances of the separator ; i) Find the length of the string variable Programarrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning