Giter Site home page Giter Site logo

programming-univbasics-statements-quiz-london-web-082619's Introduction

Programming as Conversation 2: Statements Quiz

???

Programming as Conversation 2: Statements Quiz

?: Which command outputs a String with a newline character?

( ) p (X) puts ( ) \n ( ) prints

?: Which command outputs a String with a return value?

( ) puts (X) p ( ) print ( ) pp

?: Which character creates a comment in Ruby?

(X) # ( ) $ ( ) // ( ) /*

?: In the terminal, which key combination interrupts looping code?

(X) ctrl+c ( ) ctrl+x ( ) ctrl+z ( ) ctrl+b

?: What does the code snippet below evaluate to?

count = 0
while count < 3 do
  puts "#{count}"
  count = count + 1
end

( ) 1 2 3 ( ) Infinite Loop ( ) 0 1 2 3 (X) 0 1 2

?: What does the code snippet below evaluate to?

temperature = 70
if temperature <= 50
  puts "Bundle up!"
elsif (temperature > 50 && temperature < 70)
  puts "Hoodie weather!"
else
  puts "It's a scorcher!"
end

( ) Bundle up! (X) It’s a scorcher! ( ) Hoodie weather! ( ) Infinite Loop

?: What does the nil value mean?

(X) No Value ( ) Empty/Blank ( ) Error ( ) 0

?: Which of these are a core category of code statements?

( ) Sequence ( ) Selection ( ) Repetition (X) All of the above.

?: What statement can be used to break out of a loop?

( ) exit (X) break ( ) end ( ) return

?: A case statement is an alternative statement to if...elsif...elsif...end

(X) TRUE ( ) FALSE

???

programming-univbasics-statements-quiz-london-web-082619's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.