Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002. A boolean variable named recalled has been declared. Given a variable modelYear and a String modelName write a statement that assigns true to recalled if the values of modelYear and modelName match the recall details and assigns false otherwise.
Q: You're interviewing to join a security team. They want to see you build a password evaluator for…
A: if len(pwd)>6: for i in ['!', '@', '#', '$', '%', '&', '*']: if i in pwd:…
Q: The sizeof(x) may change during the lifetime of the variable declared as int32_t x.
A: int32_t x; It allocate the memory of 32 bits to the variable x. If use sizeof(x) it shows the memory…
Q: Fyou expect to receive an "A+" in this course, which of the following declarations would be most…
A: According to the question below the solution.
Q: Write a program to find the results of the following options Select case 1_Marriage numbers group 0…
A: The Select-Case statement in vb evaluates a variable or expression and determines the actions to be…
Q: Q3) By using IF-Statement, write a program to di splay the name of day by giving the day number as…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that reads your id and full name and display. And also display the index of first…
A: To do: write program according to given
Q: 5. Write a program that reports whether someone is eligible to run for president in the U.S. You…
A: According to the information given:- We have to follow instruction to create eligibility criteria
Q: 3. What is the value of the price variable after the following code snippet is executed? int price…
A: If-else statements determine whether the if expression is true or false. If it is true, then the if…
Q: Write a program that implements the algorithm that you designed in Exercise 34 of this chapter…
A: EXPLANATION: - The required double variables billingAmount, paymentAmount, and credit varibles are…
Q: Suppose that FirstNumber is an int variable and the input is: 25 What is the value of FirstNumber if…
A: i=i+1 means i equals the current value of i and then increments it by 1 so the value of i if it's…
Q: Write a program to display the grade and grade point for a subject when the user key in their mark…
A: As programming language is not mentioned, so we are providing answer in C++ language.
Q: Write a program that reads from the user the cinema ticket price and the number of history cinema…
A: Hi, Since Programming language is not mentioned I have used Python.
Q: Suppose that score is an int variable. Consider the following ifstatements. if (score >= 90);cout…
A: statements. if (score >= 90);cout << "Discount = 10%" << endl; a. What is the output…
Q: PHP exercise 4 When you are writing scripts, you will often need to see exactly what is inside…
A: The given output in a PHP script can be achieved by using the var_dump() and print_r() methods and…
Q: QUESTION 2 Given an int variable named yesCount and another int variable named noCount and a char…
A: PROGRAM STRUCTURE: Include the required header files. Start the definition of the main function.…
Q: A variable in a program is a named placeholder that can contain any integer value. The statement z +…
A: Below is the complete solution with explanation of the given question. The value of each iteration…
Q: We have 100 critics who have rated the top movie of the year: Enchantio! Write a C++ program that…
A: Hey there, I am writing the required solution for the above stated question.
Q: The following is a valid variable's name (select all that apply) A) int B) 5 U C) 245variable D)…
A: As per the given question,we need to select only the valid variable names. For a variable name,there…
Q: You are given a set of data of students' grade as shown below. Define a suitable variable to store…
A: Here I have created a structure to store each student's information. Inside the main method, I have…
Q: Write a program using if . else statement to display student's bachelor class of graduation based on…
A: The program is written in java.The program will display student’s bachelor class ofgraduation based…
Q: Write a program that uses a switch statement as follows: If game contains the letter p , or P the…
A: C++ Program: #include <iostream>using namespace std; // Function print the words Play Station…
Q: - Create a program using IF condition based on the following: • Allow the user to input the…
A: Given:
Q: Write a Q. BASIC program that reads and outputs the weather status average using Nested IF…
A: I have implemented the following requirements with comments for better understanding of the code. I…
Q: It is asked to write an independent sub procedure that receives a string message as input and…
A: Given code:Private Sub PrintOut() As String Messagebox.Show(strMessage) End
Q: Declaration of variables shares - 2000 shareBuy - 40 shareSell - 42.75 brokerRate - 0.03 SProcessing…
A: Introduction of Flow Chart: A flow chart is a pictorial representation of any task or program. It…
Q: This is for python
A: The expression would be:dow[len(dow)-2] The program is following:dow = "help!"print(dow[len(dow)-2])
Q: Q1/ Indicate what is acceptable and what is not acceptable from the following variables with an…
A: Variable Names can have upper case and lower case letters or digits or underscore Variable Names…
Q: Q/lf 72 = mark is an integer variable and grade is a symbolic variable then the output to be printed…
A: The if-else-if ladder statement executes one condition from multiple statements. Exceution happens…
Q: Based on this program, write a flow charts. Addendum: allow user input. */ // set up…
A: - We need to highlight the flow chart on the basis of the code provided.
Q: Write and test a well commented program which helps an insurance broker determine insurance premiums…
A: Actually, program is an executable software that runs on a computer.
Q: Question 1 a) Write a program that reads in the radius and length of a cylinder and computes volume…
A: Question 1) a) SOLUTION:- CODE:- import java.util.Scanner; public class Main { public static void…
Q: Suppose X is a variable of type char, which of the following statements checks whether X holds a…
A: Answer d) Character.isLetter(X); DescriptionThe method determines whether the specified char value…
Q: CHALLENGE 1.24: Read multiple user inputs. ACTIVITY Write two scnr.nextint statements to get input…
A: Given below is the program to get input values for month and year and write the output value as a…
Q: A variable of primitive type always require the same amount of memory to store its values? False O…
A: Primitive data types are int, char , float, double, Boolean etc. They all vary in storage size.
Q: 1. Write a program to show the following sentences: I am a student. I love China.…
A: 1) As Coding language is not mentiones i am providing the code in c++: #include…
Q: Consider the following values set to variables. myAge = 32 yourAge = 18 myNumber = 81 yourNumber =…
A: According to the Question below the solution:
Q: One way to use the browser console to view the progression of the value of the totalPrice variable…
A: The question is to choose the correct option for the given question.
Q: Clunker Motors Inc. is recalling all vehicles from model years 2001-2006. Given an int variable…
A: #include <iostream> using namespace std; int main() { int modelYear; std::cout << "Enter…
Q: 5. Write a program that reports whether someone is eligible to run for president in the U.S. You…
A: According to the information given:- We have to create a program to satisfy the output.
Q: public String toString () Gets a string in the following format: RestaurantBill…
A: Algorithm: Start Create a class called RestaurantBill with cost and service as its attributes…
Q: newClientCount would be the conventional way to name a final variable. O True O False
A: newClientCount would be the conventional way to name a final variable. Ans: TRUE.
Q: Q3) By using IF-Statement, write a program to di splay the name of day by giving the day number as…
A: In the solution of given problem, IF-ELSEIF ladder statement is used. In which the expression is…
Q: Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as…
A: Logic:- Use if condition for both matching case. Use equals method for string matching. Syntax:-…
Q: Given a String variable named brand that has been declared and initialized, write the statement…
A: The above question is solved in step 2 :-
Q: Q4. Write an algorithm and draw a flow chart to get cgpa of student. If CGPA is more than equal to…
A: Algorithm: Step 1: StartStep 2: Read the CGPAStep 3: if CGPA >= 2.7 then go to step 4 . else go…
Q: 9. Is the expression "sue" != "fred" True or False
A: Given statement: "sue" != "fred" We have to check whether this statement is true or false.
Q: What is the boolean expression for the if statement in the following program segment so that the…
A: note:if the remainder is 0, when we divide n by a, then a is factor of nso, condition we have to use…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guzzler line from model years 2004-2007. Given a variable modelYear and a String modelName write a statement that prints the message "RECALL" to standard output if the values of modelYear and modelName match the recall details. Looking for help in this through JavaStep 1: Consider the following values set to variables. myAge = 32 yourAge = 18 myNumber = 81 yourNumber = 17 votingAge = 18 myName = “Katie” yourName = “Bob” Based on the values to the variables in Step 1, do the following conditions result in a true or false statement? (Reference: Boolean Expressions, page 119). The condition True or False myAge >= yourAge yourAge > myAge myAge == 45 yourAge == votingAge votingAge <= yourAge myAge <= votingAge myName != yourName myNumber <= myAge yourNumber >= myAge yourNumber != 17Question 10 programming in racket Write a procedure (timezone) that takes no arguments and returns a ; *string* indicating your time zone. ; Remember the difference between a procedure call and the evaluation of a variable! ; Ex: (timezone) => "EST"
- What is the boolean expression for the if statement in the following program segment so that the program segment will cause the printing of the factors of 100? a. number % candidateFactor = 0 b. candidateFactor / number == 0 c. candidateFactor % number == 0 d. candidateFactor / number = 0 e. candidateFactor % number = 0 f. number / candidateFactor == 0 g. number % candidateFactor == 0 h. number / candidateFactor = 0Complete the following function according to its docstring. def more_upper_than_lower(message: str) -> bool: """Return True if and only if a message contains more uppercase letters than lowercase letters. >>> more_upper_than_lower(‘I LOVE Caps Lock! :D') True >>> more_upper_than_lower('Does THIS Work?') False """Given the following variable declaration, choose the option that describes them $num1='18'; $num2=18; a. Variable $num1 is incorrect while Variable $num2 is correct. b. Both the variables have the same data type. c. Variable $num1 has a string data type while variable $num2 is an integer. d. Both the variables are incorrect.
- The programming language is C++, write a program base on the given statement. 1. Write a program that computes and assess the TF of the students inone semester, based on the given mode of payment below:PLAN KEY Discount or Interest1. CASH 10% discount2. Two Installment 5% interest3. Three Installment 10% interestThe target user must use the key in selecting or choosing the mode ofpayment. The first input data is the TF, and the second input data is themode of paymentSAMPLE INPUT / OUTPUT DIALOGUE:Enter Tuition Fee : 20000(Press 1 for Cash, 2 for Two installment , 3 for Three Installment)Enter mode of payment : 2Your Total Tuition Fee is : 21000suppose that age is an int variable, char variable, and name is a string variable. What are the calues of age,ch and name after the following statement executes: cin>> age; cin>>ch; getline (ch,name); if the input is: 39 Dimitrios Selloumtos A. Age=39, ch=D, name + Imitrios Sellountos b. Age = 39, ch= Ditmitrios, name= Sellountos c. none of the aboveThe file DebugFour3.cs has syntax and/or logical errors. Determine the problem(s), and fix the program. // Program decides tuition based on several criteria: // 1 - 12 credit hours @ $150 per credit hour // 13 - 18 credit hours, flat fee $1900 // over 18 hours, $1900 plus $100 per credit hour over 18 // If year in school is 4, there is a 15% discount using System; using static System.Console; using System.Globalization; class DebugFour3 { static void Main() { int credits; year; string inputString; double tuition; const int LOWCREDITS = 12; const int HIGHCREDITS = 18; const double HOURFEE = 15000; const double DISCOUNT = 0.15; const double FLAT = 1900.00; const double RATE = 100.00; const int SENIORYEAR = 4; WriteLine("How many credits? "); inputString = ReadLine(); credits = Convert.ToInt32(inputString); WriteLine("Year in school? "); inputString = Readline(); year =…
- Write a function named “CheckAgainstPasswordRules” that accepts a password(string) and return true if that passwordmeets all thefollowing rules: •Length is equal or greater than 8 •Have at least one uppercase character •Have at least one lowercase character •Have at least one special character: ‘!’, ‘@’, or ‘#’ •Contain no spaces(blanks)most_frequent_word() takes a string as the input parameter and returns two values; the word that appears most frequently in that string and the total number of times that word appears in that string. In case of a tie, return the first word that appears in the string. Hint: you can use the unique_words function that you wrote in (4). Sample outputs:>>> data = “chapter one hottest day summer so far drawing close drowsy silence lay over large square houses privet drive cars usually gleaming stood dusty drives lawns once emerald green lay parched yellowing”>>> word = most_frequent_word(data)>>> print(word)('lay', 2)>>> data_2 = "a cat in a hat and a big black bear on a big black rug">>> word = most_frequent_word(data_2)>>> print(word)('a', 4)Convert the following C program into Java: #include <stdio.h> int main() { int fifty, twenty, ten, five, result;char option; printf("\nThis program calculates how many coins of what denomination need to be returned\nto a customer."); do{printf("\n\nDo you wish to continue? (Y/N): "); option = getch();option = toupper (option);}while (!((option=='Y') || (option=='N')));printf("%c\n",option);if (option=='Y'){ while (1){ printf("\nEnter change that needs to be returned to the customer: ");scanf("%d", &result); if ((result<0) || (result>95) || (result%5>0))printf("\nYou cannot enter an amount less then 5 and greater than 95.\nNumbers must be in increments of 5\n");else fifty = result / 50;result %= 50;twenty = result / 20;result %= 20;ten = result / 10;result %= 10;five = result / 5;result %= 5; printf("Change for the amount you entered is given in the following coins:\n\n", result); if (fifty > 1)printf("%d 50 cent pieces.\n", fifty);if (fifty == 1)printf("%d…