Please fill in the blanks for the following statements: To input a string variable that contains white space use the ______________ function
Q: Task 2: Create a program that accepts two numbers and determine the greatest common divisor (GCD) of…
A: 1. gcd with parameter a, b label loop: set temp := a set a…
Q: 14- Which one of the following options best describes something that you must use indentation for…
A: Given: 14- Which one of the following options best describes something that you must use…
Q: 2- (What's the Value of X?) The following program uses function multiple to determine if the integer…
A: Sample outputs:
Q: lo this you will no longer need an if statement. cout > number; f (number $ 2 != 0) out ng…
A: The Answers are given below:
Q: Using User-defined Functions with return statement Create a program that will use user-defined…
A: Note: Programming Language is not mentioned in the question. C++ is chosen for implementation.…
Q: C++ code please Write a program that defines the named constant PI, const double PI = 3.14159;,…
A: Purpose of the program: This program determines the square root of the constant value "PI". Again,…
Q: def pay(hours, pay_rate): pay = hours * pay_rate print(f'pay is ${pay:.2f}')…
A: In the Given code, def pay(hours, pay_rate): pay = hours * pay_rate print(f'pay is…
Q: Create a function that calculates the following mathematical expression: z = 3x' + +y* +eme) In(a
A: Logic:- we know that e(ln(x))=x but still I am implementing another function to find ln(x) sqrt…
Q: (use Python)Use the Design Recipe to write a function called running_average that repeatedly asks…
A: Use an infinite loop to accept input and then specify condition to get out of loop
Q: Write a function named times_five(). The times_five() function should accept a numeric argument and…
A: Given Function name times_five() And to do complete it.
Q: Write a program whose inputs are three integers, and whose outputs are the largest of the three…
A: A Corel is a simple high level programming language. It is also used for making flowchart. We type…
Q: In physics, an object that is in motion is said to have kinetic energy. The following formula can be…
A: Required: Write a function named kineticEnergy that accepts an object's mass (in kilograms) and…
Q: Many people do not use capital letters correctly especially when typing on small devices like smart…
A: ** you have not specified any language, so i chose c++. #include…
Q: Kindly use your NAME, SURNAME, & DATE as a variable in your answer to following questions: The…
A: #include<stdio.h>int multiple(int varun);int main(void){int sharma;puts("Enter an integer…
Q: What keyword tells Python that you are creating a function? a. declare b. def c. func d. public
A: The answer is b. def def is the keyword used in python for defining a function. And def is followed…
Q: Could you write function comments for def quadratic(a,b,c,x) And def print_quad(a,b,c,x) Please…
A: # * Function name: quadratic(a,b,c,x) # * The function returns value of the quadratic function given…
Q: NEED CODE IN C++ IN VISUAL STUDIO AND OUTPUT Write a program to print the factorial of a number…
A: Sample Response: //C++ program of factorial #include<iostream> using namespace std;//main…
Q: = Define your function here .f main name input val int(input()) num_dollars, num_quarters,…
A: The main logic for calculation. if user_total<=0: print("no change") return…
Q: Create a Function procedure that returns a person's name in Lastname, Firstname format. Make sure to…
A: Here we have to create a Function procedure that returns a person's name in Lastname, Firstname…
Q: Hello, I needed help with this JavaScript function Thanks. function _three(radius, height) Create a…
A: logic:- define function taking radius and height Return 3.14156*radius*radius*height use…
Q: Create a code in VBA EXCEL, setting up a function that receives a positive integer "a" and returns 1…
A: Required: Create a code in VBA EXCEL, setting up a function that receives a positive integer "a" and…
Q: Define a function CalculateNum() that takes one integer parameter and returns the parameter plus 8.…
A: 1) Below is C++ Program that defines function CalculateNum() that takes one integer parameter and…
Q: I need it to return a date with a form of MM/DD/YYYY but the month snees to say the name of the…
A: def main() : MonthNum=0;MonthName=0;DateString=0;Day=0;Year=0;LongDate=0…
Q: Create a function named valid_input to return the valid character entered by the user. The function…
A: Here I have created a function named valid_input(). In this function, I used an if statement to…
Q: Create a Python function, which using the information in the chart asks the correct questions to let…
A: I have answered this question in step 2.
Q: Create the following, in Python: You have a business that cleans floors in commercial space and…
A: Python Code :- import mathprint("Enter the floor length in feet ")a=int(input())print("Enter the…
Q: Which of the statements below best describe the difference between the following two statements: (i)…
A: Given: Choose the option.
Q: Create a function that will calculate the area of a circle using the radius. The user should enter…
A: Program code: from math import pi#function to calculate area of a circledef CircleArea(r):…
Q: Write a function called average() that has three parameters representing integers. The function…
A: NOTE No programming language is mentioned so i was used python programming language def…
Q: /*12: Create a function named hello that has a $name parameter and outputs "Hello Dave!" when it is…
A: As per the requirement the program has been completed. Algorithm: Step 1: Start Step 2: Declare the…
Q: Use the def keyword to create a funtion that will say. "Have a nice day!" You can name the function…
A: We will see the above queries in python using Visual Studio Code : Code: def naming(name):…
Q: Create a function that will calculate the area of a circle using the radius. The user should enter…
A: #include <iostream> #include<math.h> using namespace std; double CircleArea(double…
Q: Q7: In the function files the output arguments must be typed inside: O Box brackets O Angle brackets…
A: Let us see the answer below,
Q: Kindly use your NAME, TE as a variable in your answer to following questions The following program…
A: please do upvote for efforts ! answer: code #include <stdio.h> int multiple (int num); int…
Q: Call backs (True or False): A.) Your program has three functions defined: void a(), void b(), and…
A: A) Program has three functions defined: void a(), void b(), and void c(), followed by main()…
Q: When an object is falling because of gravity, the following formula can be used to determine the…
A: The program will be designed as follows: Define the function fallingDistance(). The function takes…
Q: The variables which you declare inside the body of the user-defined functions are called? Select…
A: Given that: The variables which you declare inside the body of the user-defined functions are…
Q: Create a function that will take in a users speed, then check to see if the speed is within: over…
A: Use an if-elseif ladder based on the function parameter speed and a respective message is printed
Q: Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz" ● If…
A: def fizz_buzz(num): if num%3==0 and num%5==0: return"FizzBuzz"…
Q: In python, Write a program that uses a custom function named as you wish and the main function. In…
A: The solution of above program, needs a function, with two arguments: one is string type and other is…
Q: You hired three programmers and you (hopefully) pay them. Create a function that takes three numbers…
A: Please find the answer below :
Q: One foot equals 12 inches. Design a function named feetToInches that accepts a number of feet as an…
A: Code:- feet=int(input("Enter the length in feet:")) #convert feet to Inches Inch = 12 * feet;…
Q: Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz" • • •…
A: In this problem, we need to design the code in the Python programming language. Input - Integer…
Q: Computer Science R programming Adjust your functions to take into account upper and lower case…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: 3. Write a program that as the user to enter their 4 test scores. Based on their average test scores…
A: ANSWER:-
Q: 2. Create a function that will input 10 numbers and will perform the following 1. Display all even…
A: As per the requirement program is developed. Note: Here in the question programming language is not…
Q: Could you add functions (def) to the code. You can change the code but the output must be the same.…
A: PROGRAM EXPLANATION: Create an empty list to add the courses. For each different task, create a new…
Q: Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz" • • If…
A: As the programming language is not mentioned here, we are using PYTHON The Python code is given…
Q: <?php /* NOTE: To see your output in the console, follow your output with a new line "\n" Write…
A: 1. making a function using function and passing the parameters x and y function addTwo($x,$y) 2.…
Please fill in the blanks for the following statements:
To input a string variable that contains white space use the ______________ function.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- You can use a __________ to explicitly convert a value from one numeric data type to another, even if the conversion might result in a loss of data. a. transpose statement b. cast operator c. conversion operator d. literal conversionc# Danielle, Edward, and Francis are three salespeople at Holiday Homes. Write an application named HomeSales that prompts the user for a salesperson initial (D, E, or F) input as a string. Either uppercase or lowercase initials are valid. While the user does not type Z, continue by prompting for the amount of a sale. Issue the error message "Sorry - invalid salesperson" for any invalid initials entered. Keep a running total of the amounts sold by each salesperson. After the user types Z or z for an initial, display each salesperson’s total, a grand total for all sales, and the name of the salesperson with the highest total unless there is a tie. If there is a tie, indicate this in the program's output with the message: "There was a tie". An example of the program is shown below: Enter a salesperson initial >> D Enter amount of sale >> 10 Enter next salesperson intital or Z to quit >> d Enter amount of sale >> 2 Enter next salesperson intital or Z to quit…helppp meee Instructions: You are provided with the isLeapYear() function which is already declared and defined for you. Your task is to ask the user for a year and then call the isLeapYear function to check whether the year is a leap year or not. Input 1. Year to be checked Output should be like this: Enter year: 2020 2020 is a leap year note: If a certain year is a leap year, print "<INSERT_YEAR_HERE> is a leap year" Otherwise, print "<INSERT_YEAR_HERE> is not a leap year" MY CODE: (IN C LANGUAGE PLEASE) #include<stdio.h> int isLeapYear(int); int main(void) { // TODO: Write your code here return 0;} int isLeapYear(int n) { if( (n % 4 == 0 && n % 100 != 0) || (n % 100 == 0 && n % 400 == 0) ) { return 1; } return 0;}
- 13- isset(); function returns _________ value. a. None b. Boolean c. Integer d. StringI need answer in C programming Language Create a program that checks if a password and the repeated confirmation password match according to the following criteria: The password must be at least 8 characters long. The password and confirmed password must match. The password must include at least 1 lowercase character. The password must include at least 1 uppercase character. The password must include at least 1 number. The password must include 1 of the following special characters: ! @ # $ ? In your code, create a function which accepts two character arrays representing the password and repeated password. If the password entered does not meet the requirements listed above, the function should return 1. If the password meets all the requirements, return 0. In main, print a statement indicating the result after the password checking function is called. Other Requirements Your code must use consistent formatting and spacing. Points will be taken off for inconsistent or sloppy code.…Question 6 # This function checks whether a given number is even or not def isEven(number): """ what it takes? a number what it does? determines if a number is even what it returns? if even, return 1 if odd, return -1 """ # your code goes in here defisEven(number): #check if the number is divisible by 2 by checking the remainder. if number % 2==0: #If remainder is 0, then its divisble by 2 and an even number #hence return-1 return1 else: #if remainder is not 0, it'll be 1, so its NOT divisible by 2 and its an odd number #hence return -1 return-1 Test case for question 6 try: if isEven(5) == -1: score['question 6'] = 'pass' else: score['question 6'] = 'fail' except: score['question 6'] = 'fail' isEven(5)
- ne nouncements 2. Days of the Week odules • Write a program that asks the user for a number in the range of 1 through 7. The program should display the corresponding day of the week, where 1- Monday, 2 - Tuesday and so forth. If the user types in a 6 then "Saturday" should be printed on the screen. For help with Input statements see: Input Function izzes • The program should print an error message if the user enters a number that is outside the range of 1 through 7. For help with If statements and conditions see the following pages: If-Else Statements and Operators. • Name the source code file yourName_HW4 1.py. • Test and run the program. Capture the output console and save it as an image file named yourName_HW3_output4_1.jpg. • Submit the py and the image files through Canvas. rades yllabus Zoom Library Research Guides 3. Roman Numerals • Write a program that displays the Roman numeral version of a decimal number entered. The program should prompt the user to enter a number from 1 to…Function strlen() takes a string as an argument and returns the number of characters in the string, Which of the following is the correct answer to fill the above statement with it? Select one: a. Spaces are not included in the length calculation b. Null character is not included in the length calculation c. Numbers are not included in the length calculation d. Null character is included in the length calculationA __________ is a variable that is created inside a function.a. global variableb. local variablec. hidden variabled. none of the above; you cannot create a variable inside a function