a.
Explanation of Solution
Justification:
Given variable name is “discountPercentage”
The expected data type for “discountPercentage” variable is “double”.
The string formatting parameters are “p” or “P” for percentage format.
Example program:
//Include libraries
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows...
b.
Explanation of Solution
Justification:
Given variable name is “atomicWeight”
The expected data type for “atomicWeight” variable is “double”.
The string formatting parameters are “f” or “F” for percentage format.
Example program:
//Include libraries
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System...
c.
Explanation of Solution
Justification:
Given variable name is “retailPrice”
The expected data type for “retailPrice” variable is “decimal”.
The string formatting parameters are “c” or “C” for percentage format.
Example program:
//Include libraries
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System...
d.
Explanation of Solution
Justification:
Given variable name is “quantityPurchased”
The expected data type for “quantityPurchased” variable is “int”.
The string formatting parameters are “n” or “N” for percentage format.
Example program:
//Include libraries
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System...
e.
Explanation of Solution
Justification:
Given variable name is “degreesKelvin”
The expected data type for “degreesKelvin” variable is “int”.
The string formatting parameters are “e” or “E” for percentage format.
Example program:
//Include libraries
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System...
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Starting Out With Visual C# (5th Edition)
- 8) The following form does not always work. Why not?<form action = "form.php" method = "get">Pick a cat: <input type = "file" name = "cat" /><input type = "submit" /></form>A) File is not valid input type. B) The form element’s method attribute is wrong. C) Validation code is missing. D) URL is invalid.arrow_forwardIf productCost and productPrice are numeric variables, and productName is a string variable, which of the following statements are valid assignments? If a statement is not valid, explain why not. productCost = 100 productPrice = productCost productPrice = productName productPrice = "24.95" 15.67 = productCost productCost = $1,345.52 productCost = productPrice - 10 productName = "mouse pad" productCost + 20 = productPrice productName = 3-inch nails productName = 43 productName = "44" "99" = productName productName = brush battery = productName productPrice = productPrice productName = productCostarrow_forwardQ5:Save all of this director's movies and their ratings in a variable called all_movies_ratings, then print this variable.(The director with the most movies you got from the last question.) # your code hereall_movies_ratings = all_movies_ratings[['movie_title', 'imdb_score']] #this will select this columns onlydf['movie_title'] = df['movie_title'].str.replace('Ê','')print("\nQUESTION 5:")print(all_movies_ratings) Q6:Recommend a **random** movie that has a rating of over 8.3. Store the random recommendation in a variable called "rand_goodmovie".What is the title and imdb_score of your recommendation? Here are the steps:1. Query the data ('df' DataFrame) for movies with a rating over 8.3 (imdb_score > 8.3)2. Create a random integer index location to get a single movie recommendation3. Save the random movie recommendation in a DataFrame called 'rand_goodmovie'4. Save the title of the random movie recommendation in a variable "random_title" and print it5. Save the imdb_score of the…arrow_forward
- Explain why each of the following names does or does not seem like a good variable name to represent a state sales tax rate. a. stateTaxRateb. txRtc. td. stateSalesTaxRateValuee. state tax ratef. taxRateg. 1TaxRateh. moneyChargedarrow_forwardPlease help me! The program is able to accept 3 input scores from the user. The average of the 3 scores can also be obtained. How do I show thw highest score and the lowest score from the 3 input scores. strictly use this program below import csv# Define global variablesstudent_fields = [' Student No.', ' Name', ' Age', ' Email address']math = ['Math']physics = ['Physics']computer = ['Computer']average = ['Average']student_database = 'students.csv' def display_menu():print(" Welcome to Student Management System ")print("1. Add New Student")print("2. View Students")print("3. Search Student")print("4. Update Student")print("5. Delete Student")print("6. Quit") def add_student():print("Add Student Information")global student_fieldsglobal mathglobal physicsglobal computerglobal averageglobal student_database student_data = []for field in student_fields:value = input("Enter" + field + ": ")student_data.append(value)for m in math:m = int(input("Enter your math grade: "))student_data.append(m)…arrow_forwardThe commands to create a data item using <- is the same as = in R. A) True B) Falsearrow_forward
- if the productCost and productprice are numeric variables and productName is a string variable, which of the following statements are vaild assignments? if a statement is not vaild, explain why not productCost = 100 productPrice = productCost productPrice = productName productPrice = "24.95" 15.67 = productCost productCost = $1,345.52 productCost = productPrice-10 productName = "Mouse pad" productCost+20 = productPrice productName = 3-inch nails productName = 43 productName = "44" "99" = productName productName = brush battery = productName productName = productPrice productName = productCostarrow_forwardWhich of the following declarations does not follow the Java conventions? Select 4 correct answer(s) a) double costValue; b) double costvalue; c) public class Areacalculator{ d) int FirstGrade; e) public class AreaCalculatorFinder{ f) String MyFirstName;arrow_forwardFrom the following options, what is the correct way of declaring a variable? i. $2value ii. $_value iii. $value_2 iv. $value 2 a. Only ii b. ii and iii c. ii, iii and iv d. Only iiiarrow_forward
- When a lot of changes are required in data, which one should be a preference to be used? String or StringBuffer?arrow_forwardWhich of the following should not be used to display the distribution of a numeric variable? a) bar chart b) histogram c) boxplotarrow_forwardexplain why each of the following names does or does not seem like a good variable name to represent a state sales tax rate a) statetaxrate txRt t stateSalesTaxRateValue state tax rate 1TaxRate moneyChargedarrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage