Complete the function to replace any period by an exclamation point. Ex: "Hello. I'm Miley. Nice to meet you." becomes: "Hello! I'm Miley! Nice to meet you!"
Q: Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz". If…
A: In this problem, we need to design the code in the Python programming language. Input - Integer…
Q: Implement the following two functions: // Returns true if all the sides of the triangle // are same.…
A: C++ code: #include <iostream>using namespace std; //function returns true if all the sides of…
Q: Using regular expression 2. Substitute all occurrences of Machine Learning with Data Science and…
A: The above question is solved in step 2 :-
Q: Write a main function that performs the following: • Prompts user to enter 2 values A and B. • If…
A: Prompts user to enter 2 values A and B. If the first number A is less than the second number B,…
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: HOMEWORKS 1- Write a program using the function to calculate the distance between two points in the…
A: To find distance between two points , formula used. sqrt(y2-y2)2 +(x2-x1)2 To find slope you can…
Q: Solve the two problems below. The first problem will utilize rules of replacement to establish a…
A: 1. Given, The symbols are : C - the town hall is to be conveniently located. H - town hall is to be…
Q: Write a function void printTriangle(char* str) that gets a string from the user up to…
A: Since you are not mentioning the programming language, here we are using "C" to complete the…
Q: Q16/ Write a program that accepts a user-entered number and calculates the square root. Before…
A: Sample Response: //C++ program to calculate the square root of a user-entered number#include…
Q: please help on this python code. Fill in the #lines and what is asking. Write a new code please.
A: Q: Complete the given function
Q: The function strcat() appends its first argument to its second argument Select one: O True O False
A: given Data
Q: QS: A/ Use input function to write a computer programming to test the weather state according to a…
A: #include <iostream> using namespace std; void checkWeather(int); int main(){ int…
Q: Assignment No 4 1. Given the 3 dimensions of a box (length, width, and height), draw a flow chart to…
A:
Q: Write aC++program that allows a user to enter their rating of the three movies in the DarkKnight…
A: [Note: Explanation of the program code is provided within the comments.] Program code:…
Q: Complete the get_sum_of_evens (lower_bound, upper_bound) function that takes two integer parameters,…
A: Here is the python code: See below step for code.
Q: Write a main function that performs the following: • Prompts user to enter 2 values A and B. • If…
A: Write a main function that performs the following: Prompts user to enter 2 values A and B. If the…
Q: Fill in the Blank Word Game This exercise involves creating a fill in the blank word game. Try…
A: I give the code in Python along with output and code screenshot
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: The new operator is used to reserve a number of bytes in the stack of the virtual address space of a…
A: Lets see the solution.
Q: Write a main function that performs the following: • Prompts user to enter 2 values A and B. ( • If…
A: Find the required code in C++ as language not mentioned given as below and output :
Q: Presentation exercise 6 Write a function called num_of_digits which takes as input an integer and…
A: I have provided the answer based on Python Programming. Detailed comments are included for a better…
Q: The void function is a function that returns a value to a program. true O false
A: False
Q: Q2: complete the function that returns the area of a circle with radius r, note, use math.pi for pi.…
A: Given: To complete the python code.
Q: function argument. p. Apply the Currency number format to cell B9. Display two digits after the…
A: Below is the complete solution with explanation in detail for the given question about Excel…
Q: function may have an unlimited number of return values
A: Given A function may have an unlimited number of return values.
Q: 4. Password Check Given a password as string, the function will check whether it's valid. If it's…
A: The task is to implement a function is_password_valid that checks whether a given password meets…
Q: # Modify and use your pseudocode for "Find the average score" from # Day 2 homework to create a…
A: You didn't mentioned the language therefore I have done it in python, java and C++
Q: A value-returning function returns multiple values. Group of answer choices True False
A: A function can contain several return statements, but only one is ever executed based on a…
Q: You must have 2 functions: one computes the average and the other finds the letter grade. The…
A: A) Calculate Average def calcAverage(score1, score2, score3, score4, score5): return (score1 +…
Q: Based on the statement below, what is the return type of the function? int func(char x, double t);…
A: Below given is the function declaration: int fun(char x, double t); We are supposed to tell what is…
Q: 1. (Check password) Some Web sites impose certain rules for passwords. Write a function that checks…
A: Given: use Python
Q: 1- Mother's Day celebrating go back many of years.( a-thousands b-hundreds c-centuries ) 2- In Iraq.…
A: Mother's day celebrating go back many of years Ans) centuries ie option c In Iraq mother's day is…
Q: Write a program that will perform one of the following operations: 1. Print the Fibonacci series…
A: I give the code in C++ along with output and code screenshot
Q: Use the function design recipe to develop a function named blackjack. This function takes two…
A: ALGORITHM:- 1. Declare a method that takes 2 integer inputs. 2. Find the closest value to 21. 3.…
Q: 10. Given the argument: Q> (A v M) / A>(Wv C) / M> (E v C) / ~(W v E)_// Q=C This argument is: a.…
A: Please see the next step for solution
Q: Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz" • If…
A: Since the programming language is not mentioned, I have provided the code using Python 3.
Q: 1a. It is known that x and n are integers, where x has a value of -1 and n has a value of 5. What is…
A: 1a ) Given expression !(++x || n) + 6 - (!n && n * (n < n))
Q: In Python, a fu
A: Dear Student, In Python, a function can only return one value.
Q: Create a function that takes a number (int) and returns a corresponding string of dashes.…
A: Since the programming language is not mentioned, I have done the code using Python 3.
Q: ate an anonymous function that evaluates and returns the are
A: In MATLAB , we have anonymous function. The Anonymous Functions are basically a function that is…
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Write a main function that performs the following: • Prompts user to enter 2 values A and B. . If the first number A is less than the second number B, the main function should print the sum of all numbers multiple of 2 from 1 to A. • If the first number A is greater than the second number B, the main function should print the product of all numbers multiple of 4 from 1 to B. • If not, the main function should display "Wrong data. Try again!".Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz" If the number is a multiple of 3 the output should be "Fizz" • If the number given is a multiple of 5, the output should be "Buzz" If the number given is a multiple of both 3 and 5, the output should be "FizzBuzz" ● • If the number is not a multiple of either 3 or 5, the number should be output on its own as shown in the examples below. • The output should always be a string even if it is not a multiple of 3 or 5. Examples fizz buzz (3) → "Fizz" fizz buzz (5) → "Buzz" fizz buzz (15) ➡ "FizzBuzz" fizz buzz (4) "4" (Ctrl)TODO Create the function add func to complete the following TODO (). Create the add func() function, which accepts two arguments. The function should use the + operator to add the two arguments and then return the result. For instance, 3 should be returned if the arguments' input values are 1 and 2. Likewise, "good day" should be returned if the input arguments are "good" and "day." # TODO 6.1 print(f"add_func output for 1 + 2: {add_func(1, 2)}") print(f"add_func output for good + day: {add_func('good',' day')}") todo_check([ (add_func(1,2) == 3,'add_func() did not return 3 when using input values 1 and 2.'), (add_func('good',' day') == "good day",'add_func() did not return "good day" when using input values "good" and " day"') ])
- Include pseudocode that describes all steps required to solve the problem. Employ variable names that describe the values they store and adhere to Python naming conventions. Include additional comments as needed to annotate your code. Use correct spelling and grammar. Use f_strings to output variable values. Use the "dunders test" for __name__ equals __main__ 1. Write a program that contains a main function and a custom, void function named show_larger that takes two random integers as parameters. This function should display which integer is larger and by how much. The difference must be expressed as a positive number if the random integers differ. If the random integers are the same, show_larger should handle that, too. See example outputs. In the main function, generate two random integers both in the range from 1 to 5 inclusive, and call show_larger with the integers as arguments.EXAMPLE OUTPUT 13 is larger than 1 by 2EXAMPLE OUTPUT 2The integers are equal, both are 3 2. Write a…Complete the Funnyville High School registration program where user is prompted for her full name and the program generates email id and temporary password. Sample run: generate_EmailID: This function takes two arguments: the user’s first name and last name and creates and returns the email id as a string by using these rules: The email id is all lower case. email id is of the form “last.first@fhs.edu”. e.g. For "John Doe" it will be "doe.john@fhs.edu". See sample runs above. generate_Password: This function takes two arguments: the user’s first name and last name and generates and returns a temporary password as a string by using these rules. Assume that user's first and last names have at least 2 letters. The temporary password starts with the first 2 letters of the first name, made lower case. followed by a number which is the sum of the lengths of the first and last name (For example this number will be 7 for "John Doe" since length of "John" is 4 and length of "Doe" is…When you try to access to a local variable outside the function an error is generatedSelect one:a. Falseb. True
- ***IN PSUEDOCODE ONLY - not a real programming language!!*** Question:A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Design a Boolean function called isPrime, that accepts an integer as an argument and returns True if the argument is a prime number, or False otherwise. Use the function in a program that prompts the user to enter a number and then displays a message indicating whether the number is prime. The following modules should be written: - getNumber, that accepts a Ref to an integer, prompts the user to enter a number, and accepts that input - isPrime, that accepts an integer as an argument and returns True if the argument is a prime number, or False otherwise - showPrime, that accepts an integer as an argument , calls isPrime, and displays a message indicating whether the…Fill in the Blank Word GameThis exercise involves creating a fill in the blank word game. Try prompting the user to enter a noun,verb, and an adjective. Use the provided responses to fill in the blanks and then display the story.First, write a short story. Remove a noun, verb, and an adjective.Create a function that asks for input from the user.Create another function that will fill the blanks in the story you’ve just created.Ensure that each function contains a docstring.After the noun, verb, and adjective have been collected from the user, display the story that has beencreated using their input. use python to ode.Please fill in the blanks. /* This function asks for 2 strings from the user and asks the user to choose what they want to do with them. Inputs: 2 strings, and a character for choice. Output: execute that choice. Choices can be: 'E'/'e': call checkEqual() function 'C'/'c': call concatStrings() function Everything else: invalid and exit */ #include<__1__> //library to use printf and scanf #include<__2__> //library to use boolean #include<__3__> //library to use exit(0) #define len 1000 /*This function just concatenates 2 strings using a */ __4__ concatStrings(__5__ w1[], __6__ w2[], __7__ w3[]) { int w3_idx = 0; //index for w3 //Copy word1 w1 over to the combined string for(int i = 0; __8__ != __9__; i++) //loop runs as long as string is not done { __10__[__11__] = __12__[__13__]; //copy a character from w1 to w3 w3_idx++; //update…
- The prompt asks: Write a function that calculates the amount of money a person would earn over a period of years if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of years and call the function which will return the total money earned in dollars and cents, not pennies. Assume there are 365 days in a year. function totalEarned(years) { } var yearsWorked = parseInt(prompt('How many years will you work for pennies a day? ')); alert('Over a total of ' + yearsWorked + ', you will have earned $' + totalEarned(yearsWorked));23. Write a program to read a 4-digit number. Display the sum of all the digits. Eg: Number = 2341 Sum of the digits is: 10 24. Your advisor has asked you to write a program which will help him/her to find number of courses to be allotted to his/her advisee. CGPA >=2.75 6 courses can be taken CGPA=2.0 5 courses can be taken CGPA<2.0 4 courses can be taken Advisor should be able to input name of advisee and CGPA. Program should give the output as follows "Amir can take 6 courses in the semester".Create a function that takes a number as an argument and returns "Fizz", "Buzz" or "FizzBuzz" If the number is a multiple of 3 the output should be "Fizz" • If the number given is a multiple of 5, the output should be "Buzz" If the number given is a multiple of both 3 and 5, the output should be "FizzBuzz" ● • If the number is not a multiple of either 3 or 5, the number should be output on its own as shown in the examples below. • The output should always be a string even if it is not a multiple of 3 or 5. Examples fizz buzz (3) → "Fizz" fizz buzz (5) → "Buzz" fizz buzz (15) ➡ "FizzBuzz" fizz buzz (4) "4" (Ctrl)