Your browser does not support JavaScript!

Programming Languages with Compiler

40 answers

_____ is a command line interface that lets you run Unix commands to explore _____ is a command line interface that lets you run Unix commands to explore directories, execute scripts, and work with Python
  • Script
  • PyCommand
  • None of the choices
  • Terminal Correct
_____, a unique feature of VSCode, allows you to get code suggestions while you're typing
  • TypingSense
  • IntelliSense Correct
  • None of the choices
  • Code Completion
Any expression that breaks down to either true or false is called a conditional, or _____
  • float expression
  • boolean expression Correct
  • string expression
  • truthy expression
How would you write the "Hello, world!" program in Python?
  • put 'Hello, world!'
  • print ("Hello World!") Correct
  • print "Hello, world!"
  • write("Hello, world!")
If you execute the following expression, what is the output? >>> 3 + 5 * 2
  • 13 Correct
  • 10
  • 11
  • 16
If you were developing an application for an iPhone, which IDE would you use?
  • RubyMine
  • Android Studio
  • IPS
  • XCode Correct
If you were writing your source code in the JavaScript programming language, what file extension would you use to save your file?
  • py
  • js Correct
  • java
  • script
In programming, a crash is when your program stops early or freezes because something unexpected happened
  • True Correct
  • False
In this function definition, the variable "name" is _____def hello(name): print("Hey,", name)
  • a parameter Correct
  • a string
  • a function body
  • an argument
Multiple statements grouped together are called a _____
  • block Correct
  • grouping
  • cluster
  • lists
Programming can be defined as: converting ideas into _____ that a computer can understand
  • recommendations
  • appeals
  • logic
  • instructions Correct
Python treats all numbers the same, regardless of numerical value
  • True
  • False Correct
Source code is written in rich text
  • True
  • False Correct
The _____ keyword is used to send back values from a Python function
  • receive
  • give
  • send
  • return Correct
The code that's contained inside of a function is often called the function's legs
  • True
  • False Correct
This if-else statement is written in _____if "apples" = "apples" puts "You're comparing the same thing" end
  • Ruby Correct
  • Python
  • C++
  • Java
To get Python code suggestions, you need to tell VS Code which Python interpreter to use
  • True Correct
  • False
Typing "What is 2 plus 2?" into the Python prompt causes a _____
  • syntax error Correct
  • computer meltdown
  • system command
  • segmentation fault
What does this expression evaluate to? 2 * 3 + 2 * 5
  • 40
  • 16 Correct
  • 32
  • 26
What does this expression evaluate to? 3 + 2 * 5
  • 20
  • 13 Correct
  • 25
  • 30
What is the output of the following program?defisEven(num): return num % 2 = 0 if isEven(3): print("3 is even") else: print("3 is not even")
  • 3 is the final output
  • 3 is even
  • 3 is not even Correct
  • There is no output
What is the output of the following Python code?first_name = "Jeff" #first_name = "Sara" print(first_name)
  • Sara
  • Jeff Correct
  • SaraJeff
  • JeffSara
What is the output of this program?num = 16 if num % 3 = 0: print(num, "is divisible by 3") print("The end")
  • 16 is divisible by 3 The end
  • 16 is divisible by 3
  • None of the choices
  • The end Correct
What is the type of the following value: '12'?
  • bool
  • int
  • float
  • str Correct
What programming language is this function written in?defcalculate_check(hourly_rate) hourly_rate * 40 end
  • Ruby Correct
  • C++
  • Python
  • Java
When working with the Terminal inside of VSCode, how can you expand the pane?
  • Click the trash can
  • Click the home button
  • Click the up arrow Correct
  • Click the plus button
Which command will start the Python prompt on your computer?
  • open_python
  • pypy
  • python3 Correct
  • start_python
Which expression evaluates to 2?
  • 2 / 4
  • 5 % 3 Correct
  • 2 % 6
  • 5 // 3
Which if-else statement will not produce this output?is divisible by 3
  • None of the choices
  • num = 16 if num % 3 = 0: print("is divisible by 3") else: print("is not divisible by 3") Correct
  • num = 15 if num % 3 = 0: print("is divisible by 3") else: print("is not divisible by 3")
  • num = 36 if num % 3 = 0: print("is divisible by 3") else: print("is not divisible by 3")
Which is an example of a runtime error?
  • name = "It's me!" print("Hello", Name) Correct
  • All of the choices
  • name = "It's me!" print("Hello", name)
  • print("Hello", "It's me!)
Which is an example of a syntax error?
  • 2 / (4+2)
  • 2 + (4*2)
  • 2 (4*2) Correct
  • 2 + (4/0)
Which language does not use a hybrid compiler/interpreter approach?
  • Java
  • C++ Correct
  • Python
  • C
Which of these is NOT a reason why we chose Python as the language for the course?
  • relevant
  • beginner-friendly
  • popular
  • highly performant Correct
Which of these is not a relational operator?
  • "=" Correct
  • !=
  • >
  • =
Which of these will not output:I'm learning a lot!
  • All of the choices
  • message = "I'm learning a lot!" print(message)
  • print('I'm learning a lot!') Correct
  • print("I'm learning a lot!")
Which value is not an argument to the "hello" function?def hello(name): print("Hey,", name) hello("John") hello("Mya")
  • "Mya"
  • "John"
  • "Hey" Correct
  • None of the choices
Which variable name is valid in Python?
  • None of the choices
  • 3blindmice
  • account_balance Correct
  • $money
Why doesn't a Python file execute when you double-click it?
  • You need to use the exe file extension
  • Python code needs to be compiled to bytecode before it can be executed
  • All of the choices
  • Double-clicking does not run the Python Interpreter on the source code Correct
Why is there no output for this program?def goodbye(): print("Bye")
  • We didn't spell goodbye properly
  • It's so hard to say goodbye
  • bye doesn't go last
  • We never called the goodbye function Correct
With if-else statements, we will always execute one of the code blocks depending on the result of the condition test
  • True Correct
  • False
This course is taught by the mentor:
Professor Ervin C. Moran

Ervin C. Moran

Master of Science in Computer Science.

All courses