Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to make the text in cell A1 bold.
Google Sheets
Range("A1").setFontWeight([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using "italic" or "underline" instead of "bold"
Forgetting to put quotes around the word
✗ Incorrect
To make text bold in Google Sheets scripting, use setFontWeight("bold").
2fill in blank
mediumComplete the code to set the font color of cell B2 to red.
Google Sheets
Range("B2").setFontColor([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using color names without quotes
Choosing the wrong color name
✗ Incorrect
Use setFontColor("red") to change the font color to red.
3fill in blank
hardFix the error in the code to italicize the text in cell C3.
Google Sheets
Range("C3").setFontStyle([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving out quotes around the style name
Using incorrect style names
✗ Incorrect
The font style must be a string, so use "italic" with quotes.
4fill in blank
hardFill both blanks to set the font size to 14 and underline the text in cell D4.
Google Sheets
Range("D4").setFontSize([1]).setFontLine([2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around the number 14
Using wrong string for underline
✗ Incorrect
Use setFontSize(14) to set size and setFontLine("underline") to underline text.
5fill in blank
hardFill all three blanks to make the text in cell E5 bold, italic, and blue.
Google Sheets
Range("E5").setFontWeight([1]).setFontStyle([2]).setFontColor([3])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of methods
Forgetting quotes around strings
✗ Incorrect
Use "bold" for weight, "italic" for style, and "blue" for color.