Starting Out With Visual Basic, Student Value Edition (8th Edition)
8th Edition
ISBN: 9781323836194
Author: Tony Gaddis, Kip R. Irvine
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 3.3, Problem 3.16CP
What will be the final value of dblResult in the following sequence?
Dim dblResult As Double
= 3.5
dblResult *= 2.0
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Please modify the code below for "Current Date"
**********************************************************************
from pandas_datareader import data as pdrimport yfinance as yfin # Work around until# pandas_datareader is fixed.import datetimeimport pandas as pdimport matplotlib.pyplot as pltimport numpy as np# Show all columns.pd.set_option('display.max_columns', None)pd.set_option('display.width', 1000)def getStock(stk, numDays):print(stk)# Only gets up until day before during# trading hoursdt = datetime.date.today()# For some reason, must add 1 day to get current stock prices# during trade hours. (Prices are about 15 min behind actual prices.)dtNow = dt + datetime.timedelta(days=1)dtNowStr = dtNow.strftime("%Y-%m-%d")dtPast = dt + datetime.timedelta(days=-numDays)dtPastStr = dtPast.strftime("%Y-%m-%d")yfin.pdr_override()df = pdr.get_data_yahoo(stk, start=dtPastStr, end=dtNowStr)return df################################################################### CONFIGURATION…
10-13. Verify User: The final listing for remember_me.py assumes either that the user has already entered their username or that the program is running for the first time. We should modify it in case the current user is not the person who last used the program.
Before printing a welcome back message in greet_user(), ask the user if this is the correct username. If it’s not, call get_new_username() to get the correct username.
Please help me with my assignment I need to submit this for today.
Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value of the difference between my_sqrt(a) and math.sqrt(a).
a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff = 2.22044604925e-16a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff = 0.0a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff = 0.0a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a) = 2.64575131106 | diff = 0.0a = 8 | my_sqrt(a) = 2.82842712475 | math.sqrt(a) = 2.82842712475 | diff = 4.4408920985e-16a = 9 | my_sqrt(a) = 3.0 | math.sqrt(a) = 3.0 | diff = 0.0
Modify your program so that it outputs lines for a values from 1 to 25 instead of…
Chapter 3 Solutions
Starting Out With Visual Basic, Student Value Edition (8th Edition)
Ch. 3.1 - What TextBox control property holds text entered...Ch. 3.1 - Prob. 3.2CPCh. 3.1 - Prob. 3.3CPCh. 3.1 - Prob. 3.4CPCh. 3.2 - Prob. 3.5CPCh. 3.2 - Write a variable declaration for an Integer...Ch. 3.2 - Which of the following variable names are written...Ch. 3.2 - Prob. 3.8CPCh. 3.2 - What default value is assigned to each of the...Ch. 3.2 - Write a Date literal for the following date and...
Ch. 3.2 - Prob. 3.11CPCh. 3.3 - Prob. 3.12CPCh. 3.3 - Prob. 3.13CPCh. 3.3 - Prob. 3.14CPCh. 3.3 - What will be the final value of dblResult in the...Ch. 3.3 - What will be the final value of dblResult in the...Ch. 3.4 - Prob. 3.17CPCh. 3.4 - Prob. 3.18CPCh. 3.4 - Prob. 3.19CPCh. 3.4 - Will the following statement execute or cause a...Ch. 3.4 - Prob. 3.21CPCh. 3.4 - Assuming that intNumber is an integer variable,...Ch. 3.4 - Prob. 3.23CPCh. 3.4 - How would the following strings be converted by...Ch. 3.5 - Prob. 3.25CPCh. 3.5 - For each of the following numeric formats,...Ch. 3.5 - Prob. 3.27CPCh. 3.5 - In the following table, fill in the expected...Ch. 3.5 - Prob. 3.29CPCh. 3.5 - Prob. 3.30CPCh. 3.6 - Prob. 3.31CPCh. 3.6 - Where do you declare class-level variables?Ch. 3.7 - Prob. 3.33CPCh. 3.7 - Prob. 3.34CPCh. 3.7 - What kind of code does the try block of a...Ch. 3.7 - Prob. 3.36CPCh. 3.7 - Prob. 3.37CPCh. 3.7 - Prob. 3.38CPCh. 3.8 - Prob. 3.39CPCh. 3.8 - Prob. 3.40CPCh. 3.8 - Prob. 3.41CPCh. 3.8 - Prob. 3.42CPCh. 3.8 - Write a programming statement that gives the focus...Ch. 3.8 - Prob. 3.44CPCh. 3.8 - Prob. 3.45CPCh. 3.8 - Prob. 3.46CPCh. 3.8 - When a GroupBox control is deleted, what happens...Ch. 3.8 - Prob. 3.48CPCh. 3.8 - Prob. 3.49CPCh. 3.9 - Prob. 3.50CPCh. 3.9 - Prob. 3.51CPCh. 3.9 - Prob. 3.52CPCh. 3.9 - What Visual Basic function would you use to get...Ch. 3.9 - Prob. 3.54CPCh. 3.11 - Prob. 3.55CPCh. 3.11 - Prob. 3.56CPCh. 3.11 - What is the purpose of single-stepping through an...Ch. 3 - Prob. 1FIBCh. 3 - _____ is a commonly used prefix for TextBox...Ch. 3 - Prob. 3FIBCh. 3 - Prob. 4FIBCh. 3 - Prob. 5FIBCh. 3 - Prob. 6FIBCh. 3 - Prob. 7FIBCh. 3 - When Option Strict is set to ______ only widening...Ch. 3 - A(n) _____ is a specialized routine that performs...Ch. 3 - The _____ function converts an expression to an...Ch. 3 - Prob. 11FIBCh. 3 - Prob. 12FIBCh. 3 - When two operators share an operand, the operator...Ch. 3 - Prob. 14FIBCh. 3 - Prob. 15FIBCh. 3 - Prob. 16FIBCh. 3 - Prob. 17FIBCh. 3 - Prob. 18FIBCh. 3 - Prob. 19FIBCh. 3 - Prob. 20FIBCh. 3 - A(n) ______ is a container for other controls that...Ch. 3 - Prob. 22FIBCh. 3 - Prob. 23FIBCh. 3 - Prob. 24FIBCh. 3 - T F: The TextBox controls Text property holds the...Ch. 3 - Prob. 2TFCh. 3 - T F: The string concatenation operator...Ch. 3 - T F: A local variable may be accessed by any other...Ch. 3 - T F: When a string variable is created in memory,...Ch. 3 - T F: A variables scope is the time during which...Ch. 3 - T F: A variable declared inside a procedure is...Ch. 3 - Prob. 8TFCh. 3 - T F: If the CInt function cannot convert its...Ch. 3 - T F: The multiplication operator has higher...Ch. 3 - T F: A named constants value can be changed by a...Ch. 3 - T F: Only controls capable of receiving input,...Ch. 3 - Prob. 13TFCh. 3 - Prob. 14TFCh. 3 - Prob. 15TFCh. 3 - Prob. 16TFCh. 3 - Prob. 17TFCh. 3 - Prob. 18TFCh. 3 - Prob. 19TFCh. 3 - Prob. 20TFCh. 3 - Prob. 21TFCh. 3 - T F: While single-stepping through an applications...Ch. 3 - Prob. 1MCCh. 3 - Prob. 2MCCh. 3 - You declare a named constant with which keyword?...Ch. 3 - Prob. 4MCCh. 3 - Prob. 5MCCh. 3 - Prob. 6MCCh. 3 - Prob. 7MCCh. 3 - Prob. 8MCCh. 3 - Prob. 9MCCh. 3 - Prob. 10MCCh. 3 - Prob. 11MCCh. 3 - Prob. 12MCCh. 3 - Prob. 1SACh. 3 - How do you clear the contents of a TextBox...Ch. 3 - Prob. 3SACh. 3 - Create variable names that would be appropriate...Ch. 3 - Why should you always make sure that a String...Ch. 3 - Prob. 6SACh. 3 - How would the following strings be converted by...Ch. 3 - Prob. 8SACh. 3 - Prob. 9SACh. 3 - Assuming that the variable dblTest contains the...Ch. 3 - What is the focus when referring to a running...Ch. 3 - Prob. 12SACh. 3 - Prob. 13SACh. 3 - Prob. 14SACh. 3 - Prob. 15SACh. 3 - Prob. 16SACh. 3 - Prob. 17SACh. 3 - Describe three ways to set a breakpoint in an...Ch. 3 - Should a programming language automatically insert...Ch. 3 - Prob. 2WDTCh. 3 - Prob. 3WDTCh. 3 - Prob. 4WDTCh. 3 - Prob. 5WDTCh. 3 - Prob. 6WDTCh. 3 - Prob. 7WDTCh. 3 - Prob. 8WDTCh. 3 - How can you get your application to execute a...Ch. 3 - Prob. 10WDTCh. 3 - Prob. 11WDTCh. 3 - Prob. 1FTECh. 3 - Open the Chap3\ Error2\ Error2 project from the...Ch. 3 - Open the Chap3\ Error3\ Error3 project from the...Ch. 3 - Create a flowchart that shows the necessary steps...Ch. 3 - Prob. 2AWCh. 3 - Prob. 3AWCh. 3 - Prob. 4AWCh. 3 - Convert the flowchart you constructed in Exercise...Ch. 3 - Prob. 6AWCh. 3 - Prob. 7AWCh. 3 - The Miles per Gallon Calculator Problem Create an...Ch. 3 - There are three seating categories at a high...Ch. 3 - Prob. 3PCCh. 3 - A movie theater only keeps a percentage of the...Ch. 3 - Room Charge Calculator Error Display In the Room...Ch. 3 - Prob. 6PCCh. 3 - The Upper West View Yacht club sponsors sailboat...Ch. 3 - Create an application that converts Celsius to...Ch. 3 - Create an application that converts U.S. dollar...Ch. 3 - A retail company must file a monthly sales tax...Ch. 3 - A county collects property taxes on the assessment...Ch. 3 - Joe's Pizza Palace needs an application to...Ch. 3 - Assuming there are no accidents or delays, the...Ch. 3 - Create a VB application that lets the user enter...Ch. 3 - Many financial experts advise that property owners...Ch. 3 - Assume that a bag of cookies holds 40 cookies. The...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Look at the following class definitions: class Plant: def _ _init_ _ (self, plant_type) : self. _ _plant_type =...
Starting Out with Python (3rd Edition)
What is the difference between a machine-language program and a high-level language program?
Problem Solving with C++ (10th Edition)
File Decryption Filter Write a program that decrypts the file produced by the program in Programming Challenge ...
Starting Out with Java: Early Objects (6th Edition)
Why do some standard SQL-92 statements fail to run successfully in Microsoft Access?
Database Concepts (8th Edition)
A minus sign placed in front of a field width specification causes the field to be displayed left-justified. Su...
Programming in C
To pass an array to a function, pass the ________ of the array.
Starting Out with C++ from Control Structures to Objects (8th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- do itarrow_forwardThis is my code: # Input phone numberphone_number = int(input()) # TODO: Save the rightmost 4 digits of phone_number to line_numberline_number = phone_number % 10000 # TODO: Shift phone_number right by 4 digits and save the result in phone_numberphone_number = phone_number / 10000 # TODO: Save the rightmost 3 digits of phone_number to prefix_numberprefix_number = phone_number % 1000 # TODO: Shift phone_number right by 3 digits and save the result in phone_numberphone_number = phone_number / 1000 # TODO: Save the remaining 3 digits of phone_number to area_code_numarea_code_num = phone_number print("("+str((area_code_num))+") "+str(prefix_number)+"-"+str(line_number) This is my out: (800.5551212) 555.1212000000523-1212 What changes do I need to make in code to get my output to read: (800) 555-1212thearrow_forwardUsage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to do a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program. You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the number of monthly payments you’ll make. Fourth, raise the result of 1 plus the monthly rate to the negative power of the number of monthly payments you’ll make. Fifth, subtract that result from 1. Sixth, divide the monthly rate by the result. Last, multiply the result by the amount you want to borrow.…arrow_forward
- what is the difference between “ldd $(which env)” " ldd <(which env)"arrow_forwardPlease help me with my homework, I need to submit it today. Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value of the difference between my_sqrt(a) and math.sqrt(a). a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff = 2.22044604925e-16a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff = 0.0a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff = 0.0a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a) = 2.64575131106 | diff = 0.0a = 8 | my_sqrt(a) = 2.82842712475 | math.sqrt(a) = 2.82842712475 | diff = 4.4408920985e-16a = 9 | my_sqrt(a) = 3.0 | math.sqrt(a) = 3.0 | diff = 0.0 Modify your program so that it outputs lines for a values from 1 to 25 instead of just 1…arrow_forwardYou are given a list of courses that are currently available in BRACU that looks like the following: courses = ['CSE110','CSE111','MAT620','CS520','EEE361','CSE650','MAT5100','CSEE21','MAT3210']. All course code will have 3 digits with the department name of 3 letters. Any course code not following this rule is Invalid. Write a python program that creates a dictionary from the above list where the keys will be each department name (CSE,EEE,MAT for the above example) or Invalid. Departments will contain a list of valid courses for that department. Sample Input - No need to take input ['CSE110','CSE111','MAT620','CS520','EEE361','CSE650','MAT5100','CSEE21','MAT3210'] Sample Output : (You just need to print the resultatnt dictionary. No need to follow the format.) { 'CSE': ['CSE110','CSE111','CSE650'], 'EEE': ['EEE361'], 'MAT': ['MAT620'], 'Invalid': ['CS520','CSEE21','MAT5100','MAT3210'] }arrow_forward
- We want to develop a game where the user should guess a secret number. The game asks the user to input a number and tells how close it is to the secret random number that the game generates. Complete the main() function that implements this game by calling the get_user_input(), generate_secret(), and display_result(user_input, secret) functions that you will develop as follows: • Complete the get_user_input() function so that it prompts the user to enter a whole number between 1 and 20 (inclusive) and returns the number that the user enters. • Complete the generate_secret() function so that it generates and returns a random number between 1 and 20 (inclusive). • Complete the display_result(user_input, secret) function that takes the two parameters that correspond to the user input and the secret. It should then print the absolute difference between these two numbers. For example: Test Input Result random.seed (10) S Enter a number from 1 to 2015 You entered 5. The secret was 19. The…arrow_forwardWe want to develop a game where the user should guess a secret number. The game asks the user to input a number and tells how close it is to the secret random number that the game generates. Complete the main() function that implements this game by calling the get_user_input(), generate_secret(), and display_result(user_input, secret) functions that you will develop as follows: • Complete the get_user_input() function so that it prompts the user to enter a whole number between 1 and 20 (inclusive) and returns the number that the user enters. • Complete the generate_secret() function so that it generates and returns a random number between 1 and 20 (inclusive). Complete the display_result(user_input, secret) function that takes the two parameters that correspond to the user input and the secret. It should then print the absolute difference between these two numbers. For example: Test Input Result random.seed (10) 5 random.seed(50) 6 Enter a number from 1 to 2015 You entered 5. The…arrow_forwardBinus’s Used Cars, Inc. employs several salespeople. Mr. Robert, the owner of the company, has provided a file that contains sales records for each salesperson for the past month. Each record in the file contains the following two fields: The salesperson’s ID number, as an integer The amount of a sale, as a real number The records are already sorted by salesperson ID. Brewster wants you to design a program that prints a sales report. The report should show each salesperson’s sales and the total sales for that salesperson. The report should also show the total sales for all salespeople for the month. Here is an example of how the sales report should appear:arrow_forward
- In this coding challenge, you will be retrieving email usernames from a string. You will write a function named get_usernames () that takes in a string as it's input parameter, and returns a list of email usernames in the string. The input strings will contain 0 or more emails in the format and the '@' symbol will only appear in the context of an email. The order of usernames should match the order in the input text. username@domainname, For example: EXAMPLE 1 text: "If you need help on an assignment, email help@ucsd.edu or support@gmail.com" return: ['help', 'support'] EXAMPLE 2 text: "Good morning! I hope you're having a great time with CSE 8A!" return: [] EXAMPLE 3 text: "I've been having a lot of trouble reaching you, can you please email me at cse@ucsd.edu? return: ['cse', 'cse'] Here is the problem description: Function Name: get_usernames Parameter: text - A string corresponding to a piece of text containing 0 or more emails. Return: A list of the email usernames in the input…arrow_forwardGiven string inputString on one line, character userChar on a second line, and integer strIndex on a third line, output "Match found" if the character at index strindex of inputString matches userChar. Otherwise, output "Match not found". End with a newline. Ex: If the input is: write i 2 then the output is: Match found Note: Assume the length of string inputString is greater than strIndex. 1 import java.util.Scanner; 2 3 public class Matching Char { 4 5 7 8 9 10 11 12 13 14 15 16 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String inputString; char userChar; int strIndex; 3 inputString = scnr.nextLine(); userChar scnr.next().charAt(0); strIndex scnr.nextInt(); *Your code goes here */arrow_forwardTrainers at Tom's Athletic Club are encouraged to enroll new members. Write an application that extracts the names of Trainers and groups them based on the number of new members each trainer has enrolled this year. Output is the number of trainers who have enrolled 0 to 5 members, 6 to 12 members, 13 to 20 members, and more than 20 members. Give their names as well as the number of members they have enrolled. Use this list of trainers: {"Jake Butt", "Ziggy Hood", "Hroniss Grasu", "Vontaze Burfict", "Jaquiski Tartt","Ndamukong Suh", "Thurston Armbrister", "Captain Munnerlyn", "Barkevious Mingo", "Ha Ha Clinton-Dix","Mister Alexander", "BenJarvus Green-Ellis", "Richie Incognito", "Champ Bailey", "Captain Munnerlyn","Mike Kafka", "Ras-I Dowling", "Bryan Anger", "D'Brickashaw Ferguson", "Rex Hadnot","Sage Rosenfels", "Robert Griffin III", "Sav Rocca", "Chad Ochocinco", "Brett Rypien"} Use this list of the number of members each trainer has enrolled: {3, 9, 13, 26, 23,19, 15, 13, 17,…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License