In python:
first_grade = float(input("Please input the first grade "))
second_grade = float(input("Please input the second grade "))
third_grade = float(input("Please input the third grade "))
print("The average of the three grades is {}".format( round((first_grade + second_grade + third_grade) / 3,2)))
Answer:
There are three main categories of storage devices: optical, magnetic and semiconductor.
Explanation:
Optical storage, an electronic storage medium that uses low-power laser beams to record and retrieve digital (binary) data. In optical storage technology, a laser beam encodes digital data onto an optical, or laser, disk in the form of tiny pits arranged in a spiral track on the disk's surface.
Magnetic storage or magnetic recording is the storage of data on a magnetized medium. ... The information is accessed using one or more read/write heads. Magnetic storage media, primarily hard disks, are widely used to store computer data as well as audio and video signals.
Semiconductor memory is a digital electronic semiconductor device used for digital data storage, such as computer memory. ... Non-volatile memory (such as EPROM, EEPROM , and flash memory) uses floating-gate memory cells, which consist of a single floating-gate MOS transistor per cell.
Hope this helps!
Answer:
The given statement is "True".
Explanation:
In the given question some information is missing that is its option that is "true or false".
An interface is used to provide a complete abstraction, It means that all interface or methods, that have been declared empty and are in public and all areas are public, static and final by default. Its class must be used to define all methods specifically and It also uses the keyword for implementing an interface, that's why the given statement is true.
Answer:
Expression for the above problem in python language:
userNum=int(input("Enter the value of user_Num")) #it is used to take input.
if(userNum>(-10)): #if statement
print("The value of the userNum is greator")
elif(userNum==(-10)): #elif statement
print("The value of the userNum is equal to -10")
else: #else statement.
print("The value of the userNum is small")
Output:
- If the user input is (-10), it will print equal.
- If the user input 10, it will print greator message.
Explanation:
- The above program or expression is in python language, where the first line is used to render a message to the user take the input and store it into a userNUM variable.
- Then the second line is used to check the user num value to be greater with the help of if statement.
- Then the third statement is used to check the user num value to be equal with the help of elif statement.
- Then the else statement will execute when the if and the elif statement will not true.
Answer:
In Python:
def count_over_100(mylist):
kount = 0
for i in range(len(mylist)):
if mylist[i] > 100:
kount+=1
return kount
Explanation:
This defines the function
def count_over_100(mylist):
(1) This initializes kount to 0
kount = 0
(2) This iterates through the loop
for i in range(len(mylist)):
If current list element is greater tha 100, kount is incremented by 1
<em> if mylist[i] > 100:</em>
<em> kount+=1</em>
This returns kount
return kount