Computers and Technology, 27.08.2021 19:20, amandaparrish2323
Ok, this is for computer science we’re suppose to make a program that takes a user input and the user’s input is suppose to be the total of a list.
This is what I’ve got so far and my teacher said I was close but I shouldn’t use User_Number in the parameter. ( the indents are in the code for some reason they didn’t carry over thou )
User_Number = input(“What should the sum of numbers be? “)
Def Total(User_Number):
i = 1
numbers = [ ]
while i <= User_Number:
numbers. append( i )
i += 1
Sum_Total = 0
For i in numbers:
Sum_Total += numbers[ i - 1 ]
return Sum_Total
if __name__ == ‘__main__’:
print( Total )
The only things that must be in the program is: user input, a def statement with a parameter, the if name = min statement, and no preexisting functions for the math
Answers: 1
Computers and Technology, 23.06.2019 17:00, chrisgaz14
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
Computers and Technology, 24.06.2019 12:50, neptunesx
Write a new lc-3 trap subroutine (i. e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i. e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e. g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e. g. b0000 0000 0000 0111 =
Answers: 3
Ok, this is for computer science we’re suppose to make a program that takes a user input and the use...
Mathematics, 30.03.2021 20:50
Mathematics, 30.03.2021 20:50
Mathematics, 30.03.2021 20:50
Biology, 30.03.2021 20:50
Biology, 30.03.2021 20:50