Using the knowledge in computational language in python it is possible to write a code that uses enters menu items by name or an assigned item number.
Writting the code in python:#Here, file1 is created as object for menu.txt and file2 as object for bill.txt
#It is done using the open() function.
#No module is required to be imported for this function.
#Here, r represents that this file will be used to read data
#and w represents "write"
file1 = open("menu.txt","r")
file2 = open("bill.txt","w")
#this is the welcome statement
print ("Welcome to the Delicious Restaurent:")
print("""Enter "I'm done" or "Exit" or "No" to stop the orders.\n""")
print("The menu is as follows:\nPlease enter the item no. to order.\n")
#readlines(): reads all the lines and return them as each line a string element in a list.
a=file1.readlines()
#we will iterate though each element and print it to the customer
for i in range(len(a)):
print("{}) {}".format(i+1,a[i]))
#variable to store the total bill amount
total=0
#initialize the order variable with 1
order=1
#taking the input
order=int(input("\nEnter order: "))
#This loop will continue untill the customer will enter "exit" or "I'm done"
while(order not in ["i'm done", "I'm done" ,"Exit", "exit","No","no"]):
#if customer enters "i'm done" or "exit", he will break out of loop
if order in ["i'm done", "I'm done" ,"Exit", "exit","no","No"]:
break
#if customer enters any number between 1 to 12, that item will be added to his bill
if order in range(1,13):
print("Your order number {} is added.\n".format(order))
#we will get that item by its order number
item=a[order-1]
#Here i am using string slicing to get the price(it is after the $ sign)
#We will get the index of $ sign and use the number after that
# for eg. "Egg burger $34.12"
# indexi= 11 (Here $ is at 11th position)
indexi=item.index('$')
#prici will have the price
prici=(item[indexi+1:])
#add the price of that item to total value
total+=float(prici)
#write the item and its price to the output file
file2.write(item)
#For any other inputs, it will print ("Wrong choice")
else:
print("Wrong choice")
#It will ask the user, if he/she needs more orders
print("Do you want to add more")
order=(input("Enter order: "))
#it will convert the user input into an integer, if possible
#because he may enter "exit" also.
try:
order=int(order)
except:
continue
#This is the case outside of the while loop.
#Here, Total amount is printed in the bill.
file2.write("----------------------\n")
file2.write("Your Total amount is $"+str(total))
#We need to close those files as well
#close() function closes the file and frees the memory space acquired by that file.
file1.close()
file2.close()
See more about python at brainly.com/question/18502436
#SPJ1
Explanation historical development of computer
Answer:
Brief History Of Computer. The computer as we know it today had its beginning with a 19th century English mathematics professor name Charles Babbage. ... Other developments continued until in 1946 the first general– purpose digital computer, the Electronic Numerical Integrator and Computer (ENIAC) was built.
Explanation:
Computers and electronics play an enormous role in today's society, impacting everything from communication and medicine to science.
Although computers are typically viewed as a modern invention involving electronics, computing predates the use of electrical devices. The ancient abacus was perhaps the first digital computing device. Analog computing dates back several millennia as primitive computing devices were used as early as the ancient Greeks and Romans, the most known complex of which being the Antikythera mechanism. Later devices such as the castle clock (1206), slide rule (c. 1624) and Babbage's Difference Engine (1822) are other examples of early mechanical analog computers.
The introduction of electric power in the 19th century led to the rise of electrical and hybrid electro-mechanical devices to carry out both digital (Hollerith punch-card machine) and analog (Bush’s differential analyzer) calculation. Telephone switching came to be based on this technology, which led to the development of machines that we would recognize as early computers.
The presentation of the Edison Effect in 1885 provided the theoretical background for electronic devices. Originally in the form of vacuum tubes, electronic components were rapidly integrated into electric devices, revolutionizing radio and later television. It was in computers however, where the full impact of electronics was felt. Analog computers used to calculate ballistics were crucial to the outcome of World War II, and the Colossus and the ENIAC, the two earliest electronic digital computers, were developed during the war.
With the invention of solid-state electronics, the transistor and ultimately the integrated circuit, computers would become much smaller and eventually affordable for the average consumer. Today “computers” are present in nearly every aspect of everyday life, from watches to automobiles.
The history of computers is one that began far back 2000 years ago in the city of Babylonia where there was the use of abacus and it has grown to now the use of digital computer as it start in 1642.
What is the history of computer?The history of computers is one that is more than 200 years but in the 19th century, there was the invention of mechanical calculating machines.
Note that the The 1st generation of computers was said to have existed from the year 1940 to 1955 and now it has grown to a whole new level.
Learn more about computer from
https://brainly.com/question/24540334
#SPJ9
What is htc one mseven
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
The 1D array CustomerName[] contains the names of customers in buying electronics at a huge discount
in the Ramadan Sales. The 2D array ItemCost[] contains the price of each item purchased, by each
customer. The position of each customer’s purchases in the two array is the same, for example, the
customer in position 5 in CustomerName[] and ItemCost[] is the same. The variable Customers
contains the number of customers who have shopped. The variable Items contains the number of items
each customer bought. All customers bought the same number of products with the rules of the sale
dictating they must buy 3 items with a minimum spend of 1000AED. The arrays and variables have
already been set up and the data stored.
Write a function that meets the following requirements:
• calculates the combined total for each customer for all items purchased
• Stores totals in a separate 1D array
• checks to make sure that all totals are at least 1000AED
• outputs for each customer: – name – combined total cost – average money spent per product
You must use pseudocode or program code and add comments to explain how your code works. You do
not need to initialise the data in the array.
Here's a Python code that meets the requirements you mentioned:
python
Copy code
def calculate_totals(CustomerName, ItemCost, Customers, Items):
# Create an empty array to store the totals for each customer
total_cost = []
# Iterate over each customer
for i in range(Customers):
# Get the start and end indices of the items for the current customer
start_index = i * Items
end_index = start_index + Items
# Calculate the total cost for the current customer
customer_total = sum(ItemCost[start_index:end_index])
# Check if the total cost is at least 1000AED
if customer_total < 1000:
print("Total cost for customer", CustomerName[i], "is less than 1000AED.")
# Calculate the average money spent per product
average_cost = customer_total / Items
# Add the customer's total cost to the array
total_cost.append(customer_total)
# Print the customer's name, total cost, and average money spent per product
print("Customer:", CustomerName[i])
print("Total Cost:", customer_total)
print("Average Cost per Product:", average_cost)
print()
# Return the array of total costs for each customer
return total_cost
# Example usage:
CustomerName = ["John", "Mary", "David", "Sarah"]
ItemCost = [200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300]
Customers = 4
Items = 3
calculate_totals(CustomerName, ItemCost, Customers, Items)
This code takes the CustomerName array and ItemCost array as inputs, along with the number of customers Customers and the number of items per customer Items. It calculates the total cost for each customer, checks if the total is at least 1000AED, calculates the average cost per product, and prints the results for each customer. The totals are stored in the total_cost array, which is then returned by the function.
Learn more about python on:
https://brainly.com/question/30391554
#SPJ1
2. On the line below, create a bulleted list, using the square bullet option, of the following parks
and recreational areas in the United States: Blue Ridge Parkway, Golden Gate National
Recreation Area, Great Smoky Mountain National Park, Gateway National Recreation Area, and
Lincoln Memorial.
Answer:
Blue Ridge Parkway Golden Gate National Recreation AreaGreat Smoky Mountain National Park Gateway National Recreation Area Lincoln Memorial.
Explanation:
teehee
Answer:
Blue Ridge Parkway
Golden Gate National Recreation Area
Great Smoky Mountain National Park
Gateway National Recreation Area
Lincoln Memorial.
Explanation:
Here is the problem specification: An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many hours were used. It should then display the total amount due. Input Validation: Be sure the user only selects package A, B or C. Also, the number of hours used in a month cannot exceed 744. Use switch.
Answer:
In C++:
#include <iostream>
using namespace std;
int main(){
int hour; char pkg; float bill = 0;
cout<<"Package: "; cin>>pkg;
cout<<"Hour: "; cin>>hour;
if(hour<=744 && hour >=0){
switch (pkg) {
case 'A':
bill = hour * 9.95;
if(hour >10){bill = 10 * 9.95 + (hour - 10) * 2;}
break;
case 'B':
bill = hour * 14.5;
if(hour >10){bill = 20 * 14.5 + (hour - 20) * 1;}
break;
case 'C':
bill = 19.95;
break;
default:
cout << "Package must be A, B or C";}
cout<<"Total Bills: $"<<bill; }
else{ cout<<"Hour must be 0 - 744"; }
return 0;
}
Explanation:
This declares all variables: int hour; char pkg; float bill=0;
This prompts the user for package type: cout<<"Package: "; cin>>pkg;
This prompts the user for number of hours: cout<<"Hour: "; cin>>hour;
This checks if hour is between 0 and 744 (inclusive)
if(hour<=744 && hour >=0){
If true, the following is executed
A switch statement to check valid input for package
switch (pkg) {
For 'A' package
case 'A':
Calculate the bill
bill = hour * 9.95;
if(hour >10){bill = 10 * 9.95 + (hour - 10) * 2;}
End of A package: break;
For 'B' package
case 'B':
Calculate the bill
bill = hour * 14.5;
if(hour >10){bill = 20 * 14.5 + (hour - 20) * 1;}
End of B package: break;
For C package
case 'C':
Calculate bill: bill = 19.95;
End of C package: break;
If package is not A, or B or C
default:
Prompt the user for valid package cout << "Package must be A, B or C";}
Print total bills: cout<<"Total Bills: $"<<bill; }
If hour is not 0 to 744: else{ cout<<"Hour must be 0 - 744"; }
Select the correct answer from each drop-down menu.
translate the entire program source code at once to produce object code, so a program written in
runs faster than an equivalent program written in
Answer:
A compiler translates a program written in a high level language
A compiler translate the entire program source code at once to produce object code, so a program written in low-level language runs faster than an equivalent program written in high-level language.
What is a compiler?A compiler can be defined as a software program that is designed and developed to translate the entire source code of program at once, so as to produce object code, especially a software program that is written in a high-level language into low-level language (machine language).
In conclusion, we can deduce that a compiler translate the entire program source code at once to produce object code, so a program written in low-level language runs faster than an equivalent program written in high-level language.
Read more on software here: brainly.com/question/26324021
#SPJ2
PLEASE ANYONE HELP ME. PLEASE I BEG OF YOU.
Give an illustration of the agile model in game development.
The illustration of the Agile Model in Game Development is expressed below. With it, game developers can efficiently manage risks, respond to player preferences and deliver a high-quality game that meets market demand.
How does the Agile Model contribute to game development?The Agile Model as commonly used in game development, is characterized by its iterative and flexible approach. It focuses on delivering frequent increments of playable content and incorporating feedback throughout the development process.
The Game development teams using Agile work in short sprints typically use two to four weeks long where they plan, develop, test and release small portions of the game. This allows for continuous improvement, adaptability to changes and collaboration between developers, designers, and stakeholders.
Read more about agile model
brainly.com/question/30126132
#SPJ1
Methods ii.) Define and implement a method that takes a string array as a parameter and returns the length of the shortest and the longest strings in the array i.) Write a method that take an integer array as a parameter and returns the sum of positive odd numbers and sum of positive even numbers. iii.) Implements the sequential search method that takes and array of integers and the item to be search as parameters and returns true if the item to be searched in the array, return false otherwise
Answer:
Explanation:
Well I am sorry I don't know the answer anyway.
5. The operating system has two components
a. Software and Hardware
c. Shell and Kernel
b. Sof
d. File
List and fully describe at least 3 examples of input devices and how they are applied in the real world. (In separate paragraphs.)
Answer:
1. Mouse
2.Graphic Tablet
3.Keyboard
Explanation:
1. A computer mouse (plural mice, rarely mouses) is a hand-held pointing device that detects two-dimensional motion relative to a surface. This motion is typically translated into the motion of a pointer on a display, which allows a smooth control of the graphical user interface of a computer.
2.Graphic tablets, because of their stylus-based interface and ability to detect some or all of pressure, tilt, and other attributes of the stylus and its interaction with the tablet, are widely considered to offer a very natural way to create computer graphics, especially two-dimensional computer graphics
3.A keyboard is for putting information including letters, words and numbers into your computer. You press the individual buttons on the keyboard when you type. The number keys across the top of the keyboard are also found on the right of the keyboard. The letter keys are in the centre of the keyboard.
Given : A=(1,2), B(x,y,z), and C= (3,4). Find: A X B X C
Answer:
= {(1, x, 3), (1, x, 4), (1, y, 3), (1, y, 4), (1, z, 3), (1, z, 4), (2, x, 3), (2, x, 4), (2, y, 3), (2, y, 4), (2, z, 3), (2, z, 4)}
Explanation:
A(1,2)
B(x,y,z)
C=(3,4)
Find : A X B X C
= (1, 2) X ( x, y, z) X (3, 4)
= {(1, x), (1, y), (1, z), (2, x), (2, y), (2, z)} × (3, 4)
= {(1, x, 3), (1, x, 4), (1, y, 3), (1, y, 4), (1, z, 3), (1, z, 4), (2, x, 3), (2, x, 4), (2, y, 3), (2, y, 4), (2, z, 3), (2, z, 4)}
Drag each option to the correct location on the image.
faulty cables remove and reinsert cables blinking lights
ensuring that the computer is
drawing power from the outlet
restarting the computer
NETWORK ISSUES
network collision
TROUBLESHOOTING TECHNIQUES
4
Here is the correct placement of the options on the image:
NETWORK ISSUES
* faulty cables
* remove and reinsert cables
* blinking lights
* ensuring that the computer is drawing power from the outlet
* restarting the computer
* network collision
How to explain the informationIf the network cable is faulty, it can cause network issues. To fix this, remove and reinsert the cable.
If the network lights on your computer or router are blinking, it can indicate a problem with the network connection. To fix this, check the cables and make sure that they are properly plugged in.
Ensuring that the computer is drawing power from the outlet: If the computer is not drawing power from the outlet, it will not be able to connect to the network. To fix this, make sure that the power cord is plugged in properly.
Learn more about network on
https://brainly.com/question/1326000
#SPJ1
Output devices include:
A) Printers, and Monitors
B) CPU
C) System Unit
D) None of the above
Answer:
CPU IS TH ANSWER BECAUSE IT IS OUT
8.15 lab*: Program: Playlist
Answer:
8.15 LAB* Program: Playlist You Will Be Building A Linked List. Make Sure To Keep Track Of Both The Head And Tail Nodes. (1) Create Three Files To Submit • PlaylistNode. h - Struct Definition And Related Function Declarations • PlaylistNode.
To be done in C#
• Description of the class
• Class properties for each attribute listed with the class with public get and set accessors
• Implement other methods as described in the class descriptions/UML diagram
The main application must do the following
• Print a line that states "Your Name - Week 1 Composition Performance Assessment"
Create 2 instances of the Automobile class using parameters of your choosing
Add at least 2 tires to the instances
Add some tires by passing a Tire object to the AddTire method
Add some tires by passing the parameters to create a Tire object to the AddTire method
Print one of the instance's properties to the console using the ToString method
Print one of the instance's properties to the console using the GetInfo method
Print the following for one of the instances using property accessors (all information must be included; formatting and order is up to you):
Make, Model, Color, Body Style, Engine Information, Number of Cylinders, Approved Gas Type, Fuel Injected?
Tire Information for each tire
Manufacturer, Tire Size, Max Pressure, Min Pressure, and Type
Class Descriptions & Additional Requirements
Class Automobile will be the class that is composed of other classes and will have the properties and methods described below
Properties:
Make - type string, the automobile manufacturer (e.g., Ford, Jaguar)
Model-type string, the model description (e.g., Explorer, Navigator)
Color - type string, the car's color
BodyStyle - type string, car style description (e.g., Sedan, SUV)
EngineInfo - type Engine, engine information object (see Engine Class for details)
Tires - collection of type Tire, list/array of the tire objects included in the automobile
Methods:
GetInfo() - gets formatted (you determine the format) class information including: Make, Model, Color, Engine Cylinder Count, Fuel Injected or Not, and Number of Tires
ToString() - gets all class information, you determine the format
AddTire(Tire) - adds a tire object to the Tires property
AddTire(string, string, int, int, string) - adds a tire object to the Tires collection via parameters
Class Engine
Properties
Cylinders - type integer, the number of cylinders the engine has
GasType - type string, approved type of fuel, e.g., Diesel, Unleaded 87 octane, Ethanol Free
Fuellnjected - type bool, whether the engine is fuel injected or carburetor-based
Methods
No additional required methods; you may create additional methods at your discretion
Class Tire
Properties
Manufacturer - type string, the tire manufacturer, e.g., Continental, Pirelli
Size - type string, the tire size, e.g., 185/60R13, 165/50R15
MaxPressure-type integer, the maximum pressure for the tire
MinPressure - type integer, the minimum pressure for the tire
Type - type string, the type of tire, e.g. All Season Radial, Studded Snow, Spare
Methods
No additional required methods; you may create additional methods at your discretion
Automobile 1 is to use ToString()
Automobile 2 is to use GetInfo()
Practice with examples is the most effective way to learn C++. Examples on fundamental C++ ideas can be found on this page. It is encouraged that you use the examples as references and test the concepts on your own and Programme.
Thus, All of the programs on this page have been tested, so they should all run well.
Examining a ton of sample programs is one of the finest ways to learn how to program in a new language. It is recommended to copy and paste each of the programs listed below into a text file before compiling them.
Try the experiments after that. You will become more familiar with various C++ features by expanding these example programs, and you'll feel more at ease when it comes time to build programs from scratch.
Thus, Practice with examples is the most effective way to learn C++. Examples on fundamental C++ ideas can be found on this page. It is encouraged that you use the examples as references and test the concepts on your own and Programme.
Learn more about Programe, refer to the link:
https://brainly.com/question/14368396
#SPJ1
Jackson is visiting his cousin over summer vacation. While visiting, he decides to check his email. Jackson notices that the computer he is working on is incredibly slow and is connected to the network through a series of telephone lines. He is also unable to use the home telephone while he is connected to the internet. Which of the following types of network connection is Jackson using?
A.
digital subscriber line
B.
cable broadband line
C.
fiber optics line
D.
dial-up internet line
Note that in this case, Jackon is using a "dial-up internet line" (Option D)
What is a dial-up internet line?Dial-up Internet access is a type of Internet access that uses the public switched telephone network's infrastructure to connect to an Internet service provider by calling a phone number on a traditional phone line.
Dial-up The Internet has been available since the 1980s through public providers such as NSFNET-connected institutions. In 1989, the BBC offered Internet connection through Brunel University in the United Kingdom. Pipex in the United Kingdom and Sprint in the United States were the first to commercially provide dial-up in 1992.
Learn more about dial-up internet line:
https://brainly.com/question/3521554
#SPJ1
What is the output
print( ‘You are’, age, ‘years old. ‘)
The output print(‘You are’, age, ‘years old.’) function is a useful tool for programmers looking to display a person's age as part of a string of text. It is a straightforward function that can be easily incorporated into a variety of Python programs.
The outputprint(‘You are’, age, ‘years old.’) is a Python function that outputs a string of text that includes the variable ‘age’. The function prints the phrase ‘You are’, followed by the value of the variable ‘age’, and ends with the phrase ‘years old.’ For example, if the variable ‘age’ is assigned the value of 25, then the output of the function would be ‘You are 25 years old.’
This function is commonly used in programs that involve age calculations or when displaying a person's age. It is a simple way to incorporate the value of a variable into a text string and output it to the console or screen.
For more such questions on Python function, click on:
https://brainly.com/question/25755578
#SPJ11
What is open source software?
Answer:
Open source software is free, modifiable, and is able to be redistributed. It is beneficial to those wanting to customize the software to suit their purposes as it can be easily shared and redistributed.
One of the following represent class B IP address? A.255.255.255.0 B. 125.123.132 C.24.67.11.8 D.191.23.21.54
Answer:
D.191.23.21.54
Explanation:
Class B networks use a default subnet mask of 255.255. 0.0 and have 128-191 as their first octet. The address 191.23.21.54 is a class B address
(Please heart the answer if you find it helpful, it's a motivation for me to help more people)
Online, it is easy to think of communication as “computer to ____________” rather than “_________ to ___________”.
a.
person, computer, person
b.
computer, person, computer
c.
person, person, person
d.
computer, person, person
Online, it is easy to think of communication as “computer to computer” rather than “person to person”. Thus, option D is correct.
What is communication?It is possible to describe communication as the act of passing the information between one person or group of people to the next. Communicating facilitates easy understanding of what a different person is trying to say or convey. There are two forms of communication: both verbal and nonverbal.
With the help of communication the person can tell and feature tthe data between the person and an group. In this, that data is given to the people and the data is not given to the person but it is rather given to the person. As this data is been transferred from one computer to another and then it reaches the people.
Therefore, option D is the correct option.
Learn more about communication, here:
https://brainly.com/question/22558440
#SPJ2
who is the father of computer?
1.Charles Babbage 2.James Waat
Answer:
its 1 Charles babbage
Explanation:
shjdjdjdjdjdj
Answer:
Si Charles Babbage,
Explanation:
FRS ay isang Ingles na matematiko, pilosopo, imbentor, at inhinyerong mekanikal na nagpanimula ng konsepto ng isang naipoprogramang kompyuter. Nakatanghal ang mga bahagi ng kanyang hindi pa buong mga mekanismo sa Museo ng Agham sa London.
1
When collection of various computers
look like a single coherent system to its
client, then it is called
Answer:
The appropriate answer is "Distributed system".
Explanation:
Whenever used by linking several autonomous computers as a single system, considered as distributed system. It could be consist of several kinds of mainframes, processors as well as stationary machines, it can be programmed. A distributed machine has massive program modules, which operate as a single device on many machines.name 2 kitchen tools equipment or materials you are going to store or stack in the following drawers and cabinet 1.flat drawer 2.upper cabinet 3 . Small drawer near countertops 4.Lower cabinets 5.Lower cabinets under the sink
Answer:
silverware and dishwasher chemicles
Explanation:
An equal-tangent sag equal tangent vertical curve is designed for 45 mi/h. The low point is 237 ft from the PVC at station 112 + 37 and the final offset at the PVT is 19.355 ft. If the PVC is at station 110 + 00, what is the elevation difference between the PVT and a point on the curve at station 111 + 00?
Answer:
vertical and I have a great day of school
О OF
Types icts commonly
in education.
used
Answer:
The types of the itcs can be defined as follows:
Explanation:
It stands for the information and communication technology, which is used to comprises products that are a store, process, pass, transform, replicate or receive digital communications.
It applies to all technology of interaction, such as the Internet, wireless networks, devices, laptops, middleware, video - conferencing, social media, and other software and services in media, and the four types in which it is used in education can be defined as follows:
(i) networking for education
(ii) Web-based education
(iii) mobile education
(iv) facilities for the classroom
why is it important to give files name that are descriptive of their content
Answer:
Provide a descriptive document file name and title
A unique, descriptive file name helps individuals understand the general topic of a document. Include similar information when writing the title of the document, and apply appropriate punctuation, e.g., no underscores.
Explanation:
Please give thanks to all my answers and please mark as brilliant and please follow me
Create the HTML code for this
1.Font size for the text is 20px2.Background color for table dataiscyan and table headeris lightgrey.3.Text is center aligned.4.Height of the table is 200px andwidth is 500px.5.Border thickness 2px,colour black and collapsed
Answer:
index.html:
<!DOCTYPE html>
<html>
<head>
<title>Brainly</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table id="myTable">
<caption>Duty Roster for last two days</caption>
<tr><th>Day</th><th>Morning</th><th>Afternoon</th></tr>
<tr><td>Monday</td><td colspan="2">John</td></tr>
<tr><td>Tuesday</td><td rowspan="2">Tom</td><td>Peter</td></tr>
<tr><td>Wednesday</td><td>simon</td></tr>
</table>
</body>
</html>
style.css:
#myTable {
background-color: Cyan;
border-collapse: collapse;
height: 200px;
width: 500px;
font-size: 20px;
}
#myTable td,th {
border: 2px black solid;
text-align: center;
}
#myTable td:first-child, th {
background-color: lightgray;
font-weight: bold;
}
In MS Excel, a function is written as =FUNCTION_NAME(_____________________).
Explanation:
A function is a predefined formula that performs calculations using specific values in a particular order. All spreadsheet programs include common functions that can be used for quickly finding the sum, average, count, maximum value, and minimum value for a range of cells. In order to use functions correctly, you'll need to understand the different parts of a function and how to create arguments to calculate values and cell references.
An Olympic-size swimming pool is used in the Olympic Games, where the race course is 50 meters (164.0 ft) in length. "In swimming a lap is the same as a length. By definition, a lap means a complete trip around a race track, in swimming, the pool is the race track. Therefore if you swim from one end to the other, you’ve completed the track and thus you’ve completed one lap or one length." (Source: What Is A Lap In Swimming? Lap Vs Length)
Write the function meters_to_laps() that takes a number of meters 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:
150
the output is:
3.00
Ex: If the input is:
80
the output is:
1.60
Your program must define and call the following function:
def meters_to_laps (length)
Answer:
In Python:
def meters_to_laps(length):
lap = length/50
print('{:.2f}'.format(lap))
Explanation:
This line defines the function
def meters_to_laps(length):
This calculates the number of laps
lap = length/50
This prints the calculated number of laps
print('{:.2f}'.format(lap))
To call the function from main, use:
meters_to_laps(150)
What are examples of object types that can be viewed in the Navigation pane? Check all that :
commands
forms
options
queries
tasks
tables
Answer:
2.) Forms
4.) Queries
6.) Tables
Explanation: