CS 1101 Unit 2 Questions And Answers!!
What output will the following python command produce: print (1,000,000) - Answer-1 0 0 What output will the following python commands produce: n = 17 print (n) - Answer-17 What output will the following python command produce: >>> percentage = ( 60 * 100) // 55 >>> print (percentage) - Answer-109 What output will the following python commands produce: >>> print (2 * (3-1)) - Answer-4 What output will the following python commands produce: >>> print ((1+1)**(5-2)) - Answer-8 What output will the following python commands produce: >>> print (2*3-1) - Answer-5 Programmers generally choose names for their variables that are meaningful and document what the variable is used for. - Answer-TrueVariable names are not case sensitive. - Answer-False Using keywords for variable names will result in a ________________ - Answer-syntax error A script usually contains a sequence of statements. If there is more than one statement, the results appear one at a time as the statements execute. - Answer-True An expression is a combination of values, variables, and operators. If you type an expression on the command line, the interpreter evaluates it and displays the result. - Answer-True In a script, an expression all by itself is a legal statement, but it doesn't do anything. - Answer-True The acronym PEMDAS is a useful way to remember the order of operations in Python. - Answer-True As programs get bigger and more complicated, they get more difficult to read. This is why programmers should use Comments in their code. - Answer-True What output will the following python command produce: percentage = ( 60.0 * 100.0 ) / 55.0 print (percentage) - Answer-109.
Written for
- Institution
- CS 1101 Unit 2 -
- Course
- CS 1101 Unit 2 -
Document information
- Uploaded on
- May 7, 2024
- Number of pages
- 2
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal