If you save the input as num,
this will print the input 8 times.
num = input("Enter a number: ")
print(num * 8)
If you want to do actual math calculations,
then the input needs to be a number.
num = float(input("Enter a number: "))
print(num * 8)
This doesn't account for any errors in which the user doesn't input a number, but I don't think that's what you were looking for anyway :)
Answer:
Section breaks
Explanation:
The Breaks command, which has several options, inserts section breaks. Section breaks appear as a double-dotted line, and they store formatting instructions such as margins, page size, and page numbering formats for the section above the marker.
Answer:
The statement is as follows:
print("{0:,.1f}".format(number))
Explanation:
Required
Statement to print 1234567.456 as 1,234,567.5
To do this, we make use of the format keyword, and we set the print format in the process.
To round up number to 1 decimal place, we use the following format:
"{0:,.1f}"
To include comma in the thousand place, we simply include a comma sign before the number of decimal place of the output; i.e. before 1
"{0:,.1f}"
So, the print statement is:
print("{0:,.1f}".format(number))
Answer:
down below
Explanation:
score = input() # gets student's score input
max = input() # gets max number
percent = (score/max)*100 # multiply by a hundred to get percentage
if percent > 52: # checks if percent is greater than 52
print("well dont you have at least a grade 5")
else # if percent is less than or equal to 52 it will print this instead
print("Unlucky, you need to revise more for the next test.")
THIS PART IS NOT CODE:
make sure you indent/tab the print statements or else you'll get an error
Answer:
Hot-add
Explanation:
The computer system is a electronic device that is used to perform computational task on input data for a pre-dertermined result. The components of the computer is divided into hardware and software components.
The hardware components are the physical parts of the computer system, while the software component are the instructions that runs the system.
The RAM is a physical component that provides memory for running current activities on the monitor screen. When it is removed or faulty, the screen goes blank. To add more RAM memory to the system while the system is on, activate the hot-add memory settings.