Шукаєте відповіді та рішення тестів для Rekenaarwetenskap - Computer science - 113/114? Перегляньте нашу велику колекцію перевірених відповідей для Rekenaarwetenskap - Computer science - 113/114 в stemlearn.sun.ac.za.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
Download the plagiarism form, read it, and sign it.
Upload the signed plagiarism form as pdf.
Plagiarism Declaration Form: LINK
What does the Python3 program below compute?
Wat bereken die Python3 program hieronder?
#--------------------------------#newton.py
import stdioimport sys
def main(): c = float(sys.argv[1]) t = c EPSILON = 1e-15 while (abs(t - c*t**(-4)) > EPSILON*t): t = 0.8*t + 0.2*c*t**(-4) stdio.writeln(t)if __name__ == "__main__": main() #--------------------------------
What is printed to the screen if the following command is executed?
Wat word na die skerm gedruk as die volgende bevel uitgevoer word?
python3 isleapyear.py 1852#--------------------------------#isleapyear.pyimport stdioimport sysdef main(): year_in = int(sys.argv[1]) year = 0 while(year_in>0): year *= 10 year += year_in%10 year_in //= 10 isLeapYear = (year % 4 == 0) isLeapYear = isLeapYear and ((year % 100) != 0) isLeapYear = isLeapYear or ((year % 400) == 0) stdio.writeln(isLeapYear)if __name__ == "__main__": main()#--------------------------------
Choose form the given options below the option which gives the correct binary representation of the decimal number 942.
Kies die opsie hieronder wat die korrekte binêre voorstelling van die desimale getal 942 weergee.
What is printed to the screen if the following Python3 program is executed?
Wat word na die skerm gedruk as die volgende Python3 program uitgevoer word?
#--------------------------------#ruler.pyimport stdiodef main(): x = 1234 ruler = "" for k in range(4): digit = str(x%10) x //= 10 ruler = ruler + digit + ruler stdio.writeln(ruler)if __name__ == "__main__": main()#--------------------------------
What does the following Python program print to the screen when executed?
Wat druk die volgende Python program na die skerm wanneer dit uitgevoer word?
#--------------------------------#precedence.pyimport stdiodef main(): X = 2 Y = 1 X = X**Y**X + 5*Y Y = (5*Y % 4) // 2 stdio.writeln(str(X)+" "+str(Y))if __name__ == "__main__": main()#--------------------------------
Who is regarded as being the first programmer?
Wie word beskou as die eerste programmeerder?
What does the following Python program print to the screen when executed?
Wat druk die volgende Python program na die skerm wanneer dit uitgevoer word?
#--------------------------------#boole1.pyimport sysimport stdiodef main(): x = False y = True x = (x and y) or not(x or y and x) and y or not y y = (x and y) or (x or y); y = not (x and y) and (x or y) stdio.write(str(x)) stdio.write(" "+str(y)) stdio.writeln(" "+str(x ^ y)) if __name__ == "__main__": main()#--------------------------------
Simplify:
Vereenvoudig:
not ((not (a and b or c) and (a or b and c)) or ((a and b or c) or not (a or b and c)))
What is the value of j after each of the following code fragments is executed?
Wat is die waarde van j nadat elkeen van die volgende kode fragmente uitgevoer is?