One lap around a standard high-school running track is exactly 0.25 miles. Write the function miles_to_laps() that takes a number of miles as an argument and returns the number of laps. Complete the program to output the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value))

Ex: If the input is: 2.2 the output is: 8.80 Your program must define and call the following function: def miles_to_laps(user_miles)

Answers

Answer 1

Answer:

def miles_to_laps(user_miles):

   laps = user_miles / 0.25

   

   return laps

 

miles = float(input("Enter number of miles: "))

print('{:.2f}'.format(miles_to_laps(miles)))

Explanation:

Create a function named miles_to_laps that takes one parameter, user_miles

Inside the function, calculate the number of laps, divide the user_miles by 0.25 (Since it is stated that one lap is 0.25 miles). Return the laps

Ask the user to enter the number of miles

Call the function with that input and print the result in required format


Related Questions

How many times would the code in this loop repeat? ____________ for ( j = 0; j < 10; j++ ) { appendItem (myList, aNumber); }

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The for-loop given in the question is:

for ( j = 0; j < 10; j++ )

{

      appendItem (myList, aNumber); //this loop append a number to a list myList

}

This loop starts from J variable's value zero and when J's value is less than 10, the loop iterate through its body until J's value becomes greater or equal to 10. As J's value exceed nine, the loop will get terminated.

So this loop repeats 10 times its loop body, at the 11th time, the condition becomes false and the loop will get terminated.

and Python code for the following programming problem and the pseudo code below

Write a modular program that will calculate the cost of purchasing a meal. The Python program can use global or local variables and RAPTOR use global variables. This program will include decisions and loops. Details of the program are as follows:
• Your menu items only include the following food with accompanied price:
o Yum Yum Burger = .99
o Grease Yum Fries = .79
o Soda Yum = 1.09
• Allow the user of the program to purchase any quantity of these items on one order.
• Allow the user of the program to purchase one or more types of these items on one order.
• After the order is placed, calculate total and add a 6% sales tax.
• Print to the screen a receipt showing the total purchase price.

Your sample output might look as follows:

Enter 1 for Yum Yum Burger
Enter 2 for Grease Yum Fries
Enter 3 for Soda Yum
Enter now ->1
Enter the number of burgers you want 3
Do you want to end your order? (Enter yes or no): no

Enter 1 for Yum Yum Burger
Enter 2 for Grease Yum Fries
Enter 3 for Soda Yum
Enter now ->3
Enter the number of sodas you want 2
Do you want to end your order? (Enter yes or no): no

Enter 1 for Yum Yum Burger
Enter 2 for Grease Yum Fries
Enter 3 for Soda Yum
Enter now ->1
Enter the number of burgers you want 1
Do you want to end your order? (Enter yes or no): no

Enter 1 for Yum Yum Burger
Enter 2 for Grease Yum Fries
Enter 3 for Soda Yum
Enter now ->2
Enter the number of fries you want 2
Do you want to end your order? (Enter yes or no): yes

The total price is $ 8.1832
Do you want to end program? (Enter no to process a new order): no

Enter 1 for Yum Yum Burger
Enter 2 for Grease Yum Fries
Enter 3 for Soda Yum
Enter now ->2
Enter the number of fries you want 2
Do you want to end your order? (Enter yes or no): no
Enter 1 for Yum Yum Burger
Enter 2 for Grease Yum Fries
Enter 3 for Soda Yum
Enter now ->3
Enter the number of sodas you want 2
Do you want to end your order? (Enter yes or no): yes

The total price is $ 3.9856
Do you want to end program? (Enter no to process a new order): yes

The Pseudo code is:

Module main()

Call declareVariables(endProgram, endOrder, totalBurger, totalFry, totalSoda, total, tax, subtotal, option, burgerCount, fryCount, sodaCount)

//Loop to run program again
While endProgram == "no"

Call resetVariables(totalBurger, totalFry, totalSoda, total, tax, subtotal)
//Loop to take in order
While endOrder == "no"
Display "Enter 1 for Yum Yum Burger"
Display "Enter 2 for Grease Yum Fries"
Display "Enter 3 for Soda Yum"
Input option
If option == 1 Then
Call getBurger(totalBurger, burgerCount)
Else If option == 2 Then
Call getFry(totalFry, fryCount)
Else If option == 3 Then
Call getSoda(totalSoda, sodaCount)
End If

Display "Do you want to end your order? (Enter no to add more items: )"
Input endOrder
End While

Call calcTotal(burgerTotal, fryTotal, sodaTotal, total, subtotal, tax)
Call printReceipt(total)

Display "Do you want to end the program? (Enter no to process a new order)"
Input endProgram
End While

End Module

Module declareVariables(String Ref endProgram, String Ref endOrder, Real Ref totalBurger, Real Ref totalFry, Real Ref totalSoda, Real Ref total, Real Ref tax, Real Ref subtotal, Real Ref option, Real Ref burgerCount, Real Ref fryCount, Real Ref sodaCount)
Declare String endProgram = "no"
Declare String endOrder = "no"
Declare Real totalBurger = 0
Declare Real totalFry = 0
Declare Real totalSoda = 0
Declare Real total = 0
Declare Real tax = 0
Declare Real subtotal = 0
Declare Integer option = 0
Declare Integer burgerCount = 0
Declare Integer fryCount = 0
Declare Integer sodaCount = 0
End Module

Module resetVariables (Real Ref totalBurger, Real Ref totalFry, Real Ref totalSoda, Real Ref total, Real Ref tax, Real Ref subtotal)

//reset variables
totalBurger = 0
totalFry = 0
totalSoda = 0
total = 0
tax = 0
subtotal = 0
End Module

Module getBurger(Real Ref totalBurger, Integer burgerCount)
Display "Enter the number of burgers you want"
Input burgerCount
Set totalBurger = totalBurger + burgerCount * .99
End Module

Module getFry(Real Ref totalFry, Integer fryCount)
Display "Enter the number of fries you want"
Input fryCount
Set totalFry = totalFry + fryCount * .79
End Module

Module getSoda(Real Ref totalSoda, Integer sodaCount)
Display "Enter the number of sodas you want"
Input sodaCount
Set totalSoda = totalSoda + sodaCount * 1.09
End Module

Module calcTotal(Real totalBurger, Real totalFry, Real totalSoda, Real Ref total, Real subtotal, Real tax)
Set subtotal = totalBurger + totalFry + totalSoda
Set tax = subtotal * .06
Set total = subtotal + tax
End Module

Module printReceipt(Real total)
Display "Your total is $", total
End Module

Answers

Answer:

endProgram = "no"

endOrder = "no"

totalBurger = 0

totalFry = 0

totalSoda = 0

total = 0

tax = 0

subtotal = 0

option = 0

burgerCount = 0

fryCount = 0

sodaCount = 0

def resetVariables():

    #reset variables

   totalBurger = 0

   totalFry = 0

   totalSoda = 0

   total = 0

   tax = 0

   subtotal = 0

def getBurger():

   global burgerCount

   burgerCount += int(input("Enter the number of burgers you want: "))

   totalBurger =burgerCount * .99

   return totalBurger

def getFry():

   global fryCount

   fryCount += int(input("Enter the number of fries you want: "))

   global totalFry

   totalFry +=fryCount * .79

   return totalFry

def getSoda():

   global sodaCount

   sodaCount += int(input("Enter the number of sodas you want: "))

   global totalSoda

   totalSoda +=sodaCount * 1.09

   return totalSoda

def calcTotal():

   global subtotal

   subtotal += totalBurger + totalFry + totalSoda

   global tax

   tax += subtotal * .06

   global total

   total += subtotal + tax

   return total

def printReceipt(total):

   print("Your total is $",round(total, 2))

#Loop to run program again

while endProgram == "no":

   resetVariables()

   #Loop to take in order

   while endOrder == "no":

       print("Enter 1 for Yum Yum Burge\nEnter 2 for Grease Yum Fries\nEnter 3 for Soda Yum: \n")

       option = int(input("Enter option: "))

       if option == 1:

           bugertotal = getBurger()

       elif option == 2:

           frytotal = getFry()

       elif option == 3:

           sodatotal = getSoda()

       endOrder = input("Do you want to end your order? (Enter no to add more items): ")

       mytotal = calcTotal()

       printReceipt(mytotal)

   endProgram = input("Do you want to end the program? (Enter no to process a new order): ")

Explanation:

The python source code displays the menu of a restaurant and the prices of each meal. The module takes multiple orders, calculates and displays the total bill of the order with tax included.

NEED HELP ASAP!!!!!!
When designing an algorithm, which statement is used to check if a certain criterion is met?

A.
iteration
B.
loop
C.
conditional
D.
flowchart
E.
pseudocode

Answers

Answer:

"Option C: Conditional" is the correct answer

Explanation:

Let us see all the options one by one.

As far as iteration and loop is considered, both are almost same. Loops are used for repetitions in an algorithm. Loops have iterations.

Conditional statements are used to control the flow of a program or algorithm.

One task is done if the condition is true and an alternative is done if the condition is wrong.

Hence,

"Option C: Conditional" is the correct answer

Answer:

C

Explanation:

Is this statement true or false?

A plain text e-mail and the same text entered into a word processing document would be about the same file sizes.


true

false

Answers

False, the word file will be a little bit larger

Answer:

false

Explanation:

The Mac’s GUI set it apart from earlier operating systems.
True or False

Answers

Answer:

Its true

Explanation:

Just took the test.

Advantages against its counterpart because of its portability​

Answers

Answer:

It is advantageous against its counterpart, which is HTML 5,because of its portability. ... It is the basic pattern of HTML tags. <HTML> It indicates that the file is composed of HTML commands.

It is the language used to create websites because of its portability, this is beneficial against HTML 5, The abstraction behind goods, buttons, and connections is a command, and the further discussion can be defined as follows:

The software used to construct a webpage as well as its contents is the HTML tag this is used to set an instruction to also be invoked by the user.It states that the HTML commands are in the file for its portability, it is beneficial itself against counterpart HTML 5.This is the HTML Tags pattern. It suggests that the HTML instructions are included in the file.

Learn more:

brainly.com/question/4932805

Write code that will read the contents of umich_buildings.json and load its value into the gobal variable umich_buildings. Note that umich_buildings will be a list.

Answers

Answer:

import json

umich_buildings = []

with open("umich_buildings.json", "r") as json_file:

   content = json.load(json_file)

json_file.close()

for value in content:

   umich_buildings.append(value)

print("the resultant is : ", umich_buildings)

Explanation:

The python source code gets information from a json file, it imports the json package and opens and assigns the json file "umich_building" to the variable "json_file" and continuously parse the json to python with the load() method, then append the items to the global list variable "umich_buildings"

explain mechanical computer

Answers

Answer:

A mechanical computer is built from mechanical components such as levers and gears, rather than electronic components. The most common examples are adding machines and mechanical counters, which use the turning of gears to increment output displays.

Explanation:

hope this answer was helpful

what are the two types of boots that happens when you start your computer?

Answers

Answer:

Restarting a computer or its operating system software. It is of two types (1) Cold booting: when the computer is started after having been switched off. (2) Warm booting: when the operating system alone is restarted (without being switched off) after a system crash or 'freeze.

What happens when you apply a theme to a form?

Answers

Answer:

it will be customizable, you can design it in a different style

Explanation:

Which software programs should students avoid using to create and submit course work? (Choose all that apply). Word, Pages, Numbers, Keynote

Answers

Answer:

tyafana

Explan

ation:n umbers

For this project, you will be developing a PY file that contains your code in PyCharm and evaluating a few of the features of PyCharm. If you haven’t already, be sure to install the PyCharm IDE and Python on your computer. Review the tutorials in the Module Two resources to help you install and get started with PyCharm.

In PyCharm, write a program using python that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold:

What is your name? Amanda
How old are you? 15

Hello Amanda! You were born in 2005.

Answers

import datetime

name = input("What is your name? ")

age = int(input("How old are you? "))

year = datetime.datetime.today().year

print("Hello {}! You were born in {}.".format(name, year - age))

I hope this helps!

In your own words discuss 4 major strength and weakness
of
computer

Answers

Answer:

Explanation:

strength

you can figure out problems/ questions quicker

you can talk to people without having to send letters

you can purchase products without being in person

you can watch videos to explain how to do something

weaknesses

doesn't understand slang

doesn't understand emotion/ feelings

doesn't always give you what your looking for

can be very finicky with internet/data

in pycharm, write a program that prompts the user for their name and age. your program should then tell the user the year they were born. here is a sample execution of the program what is your name? Amanda how old are you? 15. This is what I have so far but I can't get pycharm to tell me the year I was born.
import datetime

name = input("What is your name? ")

age = input("How old are you? ")

year = datetime.datetime.now().year

print("Hello ' + name + ' you were born in " (year - age))

Answers

Let's address the few mistakes in your code so far. First, age is of type string and year is of type int. You're trying to subtract an int by a string and that doesn't work. Also, you have inconsistent quotes "Hello '. You should always use the same type of quote. The (year - age)) isn't properly formatted into the print statement. There is no plus adding it.

Here's my working code:

import datetime

name = input("What is your name? ")

age = int(input("How old are you? "))

year = datetime.datetime.now().year

print("Hello " + name + " you were born in " + str((year - age)))

I just fixed your code. Best of luck.

In python, date and time seem to be not its type of data, but the date and time named module can be imported for it to work with the time and date. So, the program and its description can be defined as follows:

Program Explanation:

Importing "datetime" package.Defining two-variable "name, age" in which we input value from user-end.Defining another variable "year" that holds current year value.In the next step, the print method has used that prints the user name with the born year.

Program:

import datetime#import package datetime

name = input("What is your name? ")#defining a variable name that uses an inputs method to input string value

age = int(input("How old are you? "))#defining a variable age that uses an inputs method with the int to input value

year = datetime.datetime.now().year#defining a variable year that takes current value in it

print("Hello " + name + " you were born in " + str((year - age)))#defining a print method that print name value with born year

Output:

Please find the attached file.

Learn more:

brainly.com/question/19032453  

Ask the user how many numbers for which they want to calculate the sum. Using a for loop, prompt the user to enter that many numbers, one-by-one, keeping track of the sum. At the end, after the user entered all numbers, output the sum.

Answers

n = int(input("How many numbers do you want to sum? "))

total = 0

for x in range(n):

   total += int(input("Enter a number: "))

print("Sum: "+str(total))

I hope this helps!

Following are the program to the given question:

Program Explanation:

Defining a variable "Sum" that holds an integer value.In the next step, a variable "t" is defined that uses the input method to input a value from the user-end.After the input value, a for loop is declared that takes the range of the t variable.Inside the loop, another variable "n" is defined that inputs value from user-end and use the "Sum" variable to add its value.Outside the loop, a print method has been used that prints the sum variable in the string with the message.  

Program:

Sum = 0#defining a variable sum that hold an integer value

t= int(input("Enter the total number you want to add: "))#defining a t variable that input value from user-end

for i in range(t):#defining a loop that add inputs values from above user-input range

   n= int(input("Enter value "+str(i+1)+": "))#defining loop that inputs n value

   Sum += n; #defining sum variable that adds user-input value

print("Sum of entered number: "+str(Sum))#using print method that print added value

Output:

Please find the attached file.

Learn more:

brainly.com/question/16025032

Consider an instruction within a certain instruction-set architecture (ISA): ADD R1, R2, R3. This instruction adds the value in Register R1 with the value in Register R2, and stores the result in Register R3. What is the maximum number of physical memory accesses that may be caused by this single instruction?
a) 1
b) 2
c) 3
d) 4

Answers

Answer:

C = 3

Explanation:

The maximum number of physical memory accesses that may be caused by this single instruction is ; 3

This is because In the case of loading two values into R2 and R3 there is need for their memories to be accessed and after execution R1 value there will be a write back into memory hence another memory is also accessed and that makes the number of Physical memories accessed to be three(3) in Total

The opening on the front of a camera that regulates the amount of light entering the lenses is called:​

Answers

Answer:

The Aperture is part of the camera lens. It controls how much of the light that enters the camera lens reaches the image sensor which is located inside the camera

Explanation:

Conner has located a research source that is sponsored by a pharmaceutical company. Based on the sponsorship, Conner must be careful that the information is not

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer is:

Conner has located a research source that is sponsored by a pharmaceutical company. Based on the sponsorship, Conner must be careful that the information is not Biased.

When you evaluate and use information from multiple sources, you need to evaluate the information that it must be error-free and not biased and it should be accurate information as you needed.

As in this example, Conner needs to research that the information should not be biased because the information or research source is sponsored by a pharmaceutical company and there is chances of biasedness. So, Conner must be careful that information is not biased.

Question #6
Fill in the Blank
You designed a program to create a username using the first three letters from the first name and the first four letters of the last na
name.
You are testing your username program again for a user whose name is Paula Mano.
The output should be
______.

Answers

Answer:

PauMano

Explanation:

those are the first 3 and 4 letters of the names

Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "The number is a palindrome." If it is not then print "The number is NOT a palindrome"

Answers

Answer:

Written in Python:

num = int(input("Number: "))

strnum = str(num)

if len(strnum) !=5:

    print("Length must be 5")

else:

    if(strnum[::-1] == strnum):

         print("The number is a palindrome.")

    else:

         print("The number is NOT palindrome.")

Explanation:

This prompts user for input

num = int(input("Number: "))

This converts user input to string

strnum = str(num)

This checks the length of the string

if len(strnum) !=5:

    print("Length must be 5") If length is not 5, this prompt is printed

else:If otherwise

    if(strnum[::-1] == strnum): The compares the string reversed with the original

         print("The number is a palindrome.") If both are the same, this line is executed

    else:

         print("The number is NOT palindrome.") If otherwise, this line is executed

Which is the highest level of the hierarchy of needs model?

A.
humanity
B.
intrapersonal
C.
team
D.
interpersonal
The answer is A

Answers

Answer:

A

Explanation:

16. A
is an object you can insert in your document, type text in, but can then format in the
same ways you would other objects?
(5 Points)
formatting box
text holder
text box
typing box

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is the Text box.

You can insert a text box as an object in your document, type text in it and you can format it in the same way you would do for other objects.

You can insert the text box using the Insert tab then under Shapes that you can find under the Illustrations group. You can then find Text Box under basic shapes.

While the other options are not correct because:

Formatting box allows you to format the object, text holder and typing box does not mean in this context because text holder is something that can hold the text such as shapes or text box, etc. but these terms are not used in word or in a document.

Katla is a project manager. One of the programmers on her team comes to her and says that he permanently deleted some code mistakenly. After working for weeks with their support technicians to retrieve the code, Katla wants to implement a better system. Which system does she need to start using?

A. WhiteBoard

B. debugging

C. software development life cycle

D. version control

Answers

Answer:

Version Control - Maintains the code log history and changes overtime.

Write an application that displays the sizes of the files lyric1.txt and lyric2.txt in bytes as well as the ratio of their sizes to each other.

Answers

Answer:

#include<iostream>

#include<fstream>

using namespace std;

int main() {

  ifstream file_one("lyric1.txt", ios::binary);

  ifstream file_two("lyric2.txt", ios::binary);

  file_one.seekg(0, ios::end);  // retrieving file size of lyric1.txt file

  file_two.seekg(0, ios::end);  // retrieving file size of lyric2.txt file

  // converting the binary file size to an integer.

  int fileOne = file_one.tellg();

  int fileTwo = file_two.tellg();

  cout<<"Size of the lyric1.txt is"<<" "<< fileOne<<" "<<"bytes";

  cout<<"Size of the lyric2.txt is"<<" "<< fileTwo<<" "<<"bytes";

  cout<< fileOne <<" : "<< fileTwo;

Explanation:

The source code gets the file size of two word files and displays them in bytes and also displays the ratio of both files.

1. What do you think of the use of Moore’s Law to hypothesize a timeframe for the origin of life?
2. How does Moore’s Law apply to the efficiency of algorithms as we discussed in the last class?
3. Where do you think computers will be in 10 years? 100?

Answers

Answer:

1. I think it was actually a very good idea. As time goes on technology is improved, new laws and theories are proven, scientists are disproven, and efficiency of doing certain tasks evolves. Another reason would be, why not? It does not hurt to make a hypothesis or try a new approach.  

1. We spend countless time exploring and digging only to possible never find what we need to exactly pin the first life forms on Earth and when they lived, why not try a new different angle. So, I think that it was a very clever and interesting to use and Moore's Law to hypothesis the origin of life.  

2. Moore's law applies to the efficiency of algorithms because he came up with a way to hypothesis were in technology we should stand after a certain amount of time and how much improvements should be integrated into our computers.

2. Moore’s Law applies to the efficiency of algorithms because Moore created a exponential equation and graph of a hypothesis proven to help guide engineers on a steady path of improvement should be made to  computer processors and components with in a certain amount of time.

3. In a 10 years I think computers would have only made simply yet very effective and efficient improvements. Like longer battery life, or faster speeds, but virus firewalls and defenders. But when faced with 100 years I think that would have lead to a huge drastic change to what the normal idea of a computer is. It would be so high tech to us but with the world our grandkids are living in it'll be normal to have holographic computers.

3. I think that in 10 years computers would have improved much like they have recently, smaller, more compact, faster, and longer lasting, but within 100 years we would have a another invention entirely. Computers would have changed so much more than we could have every thought.

Explanation: I put a few different answers for each question so you can mix and match and use what's easiest for you but both are correct.

The
is an image at the top of the page that includes the title.

Answers

Answer:

person to be able to the way you can get a lot and then we have a few months ago but the new one of this message

What is the best prediction she could make about this
semester's text?
Natalia's class read Shakespeare's Romeo and Juliet
last semester and took a field trip to see it performed
live in a community theater. Today, Natalia learned that
her class will read another work by Shakespeare this
semester
It is a play.
It is an adventure.
It is a fairy tale.
It is a fable.

Answers

Answer:its a play

Explanation:

Answer:

A. It is a play

Explanation:

Got the answer correct on the quiz

IN PYTHON LANGUAGE

(1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a single line separated by a space. (Submit for 1 point)

Enter favorite color:
yellow
Enter pet's name:
Daisy
Enter a number:
6
You entered: yellow Daisy 6

(2) Output two passwords using a combination of the user input. Format the passwords as shown below. (Submit for 2 points, so 3 points total).

Enter favorite color:
yellow
Enter pet's name:
Daisy
Enter a number:
6
You entered: yellow Daisy 6

First password: yellow_Daisy
Second password: 6yellow6

(3) Output the length of each password (the number of characters in the strings). (Submit for 2 points, so 5 points total).

Enter favorite color:
yellow
Enter pet's name:
Daisy
Enter a number:
6
You entered: yellow Daisy 6

First password: yellow_Daisy
Second password: 6yellow6

Number of characters in yellow_Daisy: 12
Number of characters in 6yellow6: 8

Answers

Answer:

favorite_color = input('Enter favorite color:\n')

pet_name = input("Enter pet's name:\n")

number = input('Enter a number:\n')

print('You entered:',favorite_color+' '+pet_name+' '+number)

password1 = favorite_color+'_'+pet_name

password2 = number+favorite_color+number

print('\nFirst password:'+' '+password1)

print('Second password:'+' '+password2)

print('\nNumber of characters in '+password1+': '+str(len(password1)))

print('Number of characters in '+password2+': '+str(len(password2)))

Explanation:

Notice on the pet name I used quotes instead of parenthesis because so I can use the comma on pet's.

This solution worked for me.

Discuss the advantages and disadvantages of artificial intelligence ?
50word

Answers

Answer:

it'll be in points okay.

Explanation:

1. It's a blessing as well as a curse.

2. It changed lives.

3. Helped understand things better.

4. Development.

5. Free knowledge e.g. Brainly

;)

Explanation:

Kxkxkdkeeksldowowowkscoviforkeooododosowkwmdndmdmrnrnrmrmfododoo ododosososxkxkdldldldllwlwwlel ododoeldl ldldldlxl odododo oodoxxoo

Write a statement that calls a function named IncreaseItemQty, passing the variable addStock. Assign mugInfo with the value returned by IncreaseItemQty.

Answers

Answer:

Explanation:

#include <stdio.h>

#include <string.h>

typedef struct ProductInfo_struct {

char itemName[30];

int itemQty;

} ProductInfo;

ProductInfo IncreaseItemQty (ProductInfo productToStock, int increaseValue) {

productToStock.itemQty = productToStock.itemQty + increaseValue;

return productToStock;

}

int main(void) {

ProductInfo mugInfo;

int addStock;

addStock = 10;

scanf("%s", mugInfo.itemName);

scanf("%d", &mugInfo.itemQty);

**** /* Your solution goes here */ ****

printf("Name: %s, stock: %d\n", mugInfo.itemName, mugInfo.itemQty);

return 0;

}

Answer:

#include <stdio.h>

typedef struct ProductInfo_struct {

  char itemName[50];

  int itemQty;

} ProductInfo;

ProductInfo AddToStock(ProductInfo productToStock, int increaseValue) {

  productToStock.itemQty = productToStock.itemQty + increaseValue;

  return productToStock;

}

int main(void) {

  ProductInfo mugInfo;

  int addStock;

  scanf("%s", mugInfo.itemName);

  scanf("%d", &mugInfo.itemQty);

  scanf("%d", &addStock);

mugInfo = AddToStock(mugInfo, addStock);

  printf("Name: %s, stock: %d\n", mugInfo.itemName, mugInfo.itemQty);

  return 0;

}

Explanation:

mugInfo holds both an int and a char

Other Questions
(WORTH 95 POINTS) write a declaration of independence to the f451 government. Use the U.S. Constitution as a reference!!! What happens to a substance when it is heated? aThermal energy is decreased bPotential energy is increased cKinetic energy is increased dIt does not change its physical shape PLEASE HELP!!Part CIdentify the correct pronoun in parentheses and its antecedent.1. Everyone should work hard at (their, his or her) job.2. Each of the children willingly did (his or her, their) share of the camp duties.3. Sophia gave me (her, their) coat to wear.4. I took (my, our) friend to the ceremony.5. All members were asked to bring (his or her, their) contributions today.6. The women have had (her, their) vacation.7. Someone has left (her or his, their) automobile across the driveway.8. If each does (his or her, their) best, our chorus will win.9. Would you tell Joanne that (her, his) soup is ready?10. Every woman did (her, their) best to make the program a success. Gary leaves school to go home. He walks 8 blocks north and then 14 blocks east. If Gary could walk in a straight line to the school, what is the exact distance between Gary and the school? 3/5 is the slope of line that is perpendicular to the line y=5/3x-2. True or false A cube has a mass of 9 grams and each side is 3 cm3. What is the density of the sample?a.0.33 g/mLb.36g/mLc.3g/mLd.18g/mLIm begging someone to help, Ill mark brainlist!!! solve the following inequality for p. write your answer in the simplest form 9p-9 recall your school days Simple measurement questions, I'm on #5 right now but if you know any other ones that would be helpful (picture) PLEASE HELP WILL MARK BRAINLIEST!!! Price elasticity of demand is measured as the: Write a linear function f with f(4)=-3 and f(0)=-2 A map titled Silk Road, circa 1st Century C E. A key shows Land routes with a purple line and Sea routes with a green line. Purple lines travel through China, India, Persia, Egypt, Somalia, Greece, and parts of Europe. Green lines travel through the Pacific Ocean, Yellow Sea, East China Sea, South China Sea, along the coasts of China, India, Persia, Arabia, Somalia.Study the map. Which regions were connected by the Silk Road? Choose three correct answers.East AfricaGreeceSouth AmericaChinaFranceWest Africa 2. If you were actually searching for an apartment to move into, what next steps would youtake? How, if at all, would your apartment search be different in real life? please helppp! and thank you Which of the following was NOT popular during the 19th century?O A. VerismoO B. Music dramaO C. Grand operaO D. Commedia dell'artePlease help PICTURE PLEASEEEEEEEEEEE slogan sobre los derechos humanos President Theodore Roosewer's foreign policy served to increase US involvement in -China's Boxer RebellionHawai's pineapple industrylatin american affairs European alliance systems A checking account is overdrawn if it has anegative balance. Marc's account is overdrawn by$45. What will the balance be after he deposits$170 and writes a check for $59?