Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Take your first steps with F# Microsoft Quiz Answers

Get Take your first steps with F# Microsoft Quiz Answers

Interested in learning to program with F# but don’t know where to start? Start here! Learn the basic syntax and features of the language. In this learning path you’ll:

  • Set up your development environment.
  • Use variables and input and output.
  • Apply conditionals and pattern matching.
  • Author functions and learn to compose them.

Prerequisites:

None

Enroll on Microsoft

Module 1: Write your first F# code

Take your first steps with F# – Set up your development environment, write your first line of code, and build your first application

Learning objectives:

By the end of this module, you’ll be able to:

  • Understand what makes F# a good language for building applications
  • Write your first line of F# code
  • Build your first F# console application

Prerequisites:

  • Familiarity with command-line based applications
  • Introductory knowledge of programming concepts

This module is part of these learning paths:

Quiz 1: Knowledge check

Q1. What is F#?

  • A programming language for the Java Virtual Machine (JVM)
  • A musical note
  • F# is an open-source, cross-platform programming language that makes it easy to write succinct, performant, robust, and practical code

Q2. What is a feature in F# that can help you write less code?

  • Type inference
  • Asynchronous programming
  • F# Interactive

Q3. What is a feature in F# that can help you write performant code?

  • Debugger
  • Built-in parallelism & concurrency
  • Strong functional & object programming support

Q4. What is a feature in F# that can help you write robust code?

  • Lightweight syntax
  • Sequences
  • Immutable by default

Q5. What is F# Interactive?

  • A notebook computing environment for F#
  • A programming environment to run F# code interactively at the console, or to execute F# scripts
  • A video game

Module 2: Store and retrieve data by using F#

Write your first F# programs, and learn to work with input and output, data type conversions, and operators.

Learning objectives:

In this module, you’ll:

  • Declare and use variables to store values.
  • Output to the screen.
  • Read from the console and capture user input.
  • Convert between data types.

Prerequisites:

  • Know how to run commands at the console.
  • Have F# (.NET Core) installed.

This module is part of these learning paths:

Quiz 1: Knowledge check

Q1. How would you declare a variable, holding an integer, whose value you want to be able to change?

  • Enter the code let number = 1.
  • Enter the code let mutable number = 1.
  • Enter the code let mut number = 1.

Q2. What formatter would you use to format an integer?

  • Use the %s formatter.
  • Use $"{variable}".
  • Use the %i formatter.

Q3. What’s the correct operator for equality?

  • The correct operator to use is =.
  • The correct operator to use is <>.
  • The correct operator to use is ==.

Module 3: Manage execution flow in F#

Learn how to manage execution flow in your programs by using if...elif...else and loop constructs.

Learning objectives:

In this module, you will:

  • Use if...elif...else to add conditional logic to your code.
  • Create repeat statements by using various loop constructs.
  • Understand the difference between various loop constructs and when to use them.

Prerequisites:

None

This module is part of these learning paths:

Quiz 1: Knowledge check

Q1. What construct would you use to iterate over an enumerable collection?

  • You can use a for...in loop.
  • You can use a for...to loop.
  • You can use a while...do loop.

Q2. Explain what’s wrong with the code let value = if condition then true else 1.

  • Nothing is wrong and the code will compile.
  • You can’t assign the result to a variable.
  • The data type must be the same in both if and else. The code let value = if condition then 2 else 1 would work.

Q3. Which numbers would the loop for i = 0 to 5 do printfn "%i " i print?

  • It will print 0, 1, 2, 3, 4.
  • It will print 0, 1, 2, 3, 4, 5.
  • It will print 1, 2, 3, 4, 5.

Module 4: Create and architect with functions in F#

Learn what functions are and how to declare and call them. Also, learn how to architect with functions by using various patterns.

Learning objectives:

In this module, you’ll:

  • Define and use functions.
  • Use pipelines to operate on data.
  • Compose functions to create larger functions.

Prerequisites:

None.

This module is part of these learning paths:

Quiz 1: Knowledge check

Q1. How do you return from a function?

  • The last row of the function is the return value.
  • You use the return keyword.
  • You declare a variable called return and place it last.

Q2. How would you declare the add() function that takes two strings and returns an int?

  • Write it like let add a b = a + b.
  • Write it like let add (a:string) (b:string):int = (int a) + (int b).
  • Write it like let add (a:string) (b:string):bool = (int a) + (int b).

Q3. The following code let addAndMultiply = add >> multiply is doing what?

  • Creating a pipeline.
  • Defining a function.
  • Creating a composition.

Module 5: Store and apply operations on list data in F#

Learn how to write programs by using lists, and learn how to use the list properties and list functions that are specified in the list module.

Learning objectives:

In this module, you will:

  • Explore collection data structures.
  • Learn about the basic properties in a list structure.
  • Use the list module to carry out some more advanced operations.

Prerequisites:

  • Knowledge about running commands at the console
  • F# (.NET Core), installed
  • Knowledge about declaring variables
  • Understanding of functions and how to declare and run them

This module is part of these learning paths:

Quiz 1: Knowledge check

Q1. You’re operating on a list, where each item has the properties City and Country. To display the two properties concatenated, what list function would you use?

  • The sum() function
  • The iter() function
  • The map() function

Q2. Given the list let list = [1;2;3;4], what will the Head property return?

  • It returns [2;3;4].
  • It returns 1.
  • It returns 4.

Q3. What is the correct way to return the average value from a list?

  • Use let list = [2;4], and calculate the average value by using let average = List.average list.
  • Use let list = [2.0; 4.0], and calculate the average value by using let average = List.avg list.
  • Use let list = [2.0; 4.0], and calculate the average value by using let average = List.average list.
Conclusion:

I hope this Take your first steps with F# Microsoft Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published. Required fields are marked *