What is String in Spreadsheet?

Written by kazamraza no comments
Classified in : Miscellaneous Tags : none

Strings are blocks of text that appear in Spreadsheet cell, like names of people, names of cities, e-mail addresses, or names of items sold in a store. When we type strings into Spreadsheet, we always use quotation marks around them to tell Spreadsheetthat what it's about to read is one coherent block of text.

Read more What is String in Spreadsheet?

How to rename all the files with extension hpp to the extension h in Python

Written by kazamraza no comments
Classified in : Python Tags : Python

Question


filenames = ["program.c", "stdio.hpp", "sample.hpp", "a.out", "math.hpp", "hpp.out"]
# Generate newfilenames as a list containing the new filenames
# using as many lines of code as your chosen method requires.

___________________

print(newfilenames) 
# Should be ["program.c", "stdio.h", "sample.h", "a.out", "math.h", "hpp.out"]

Read more How to rename all the files with extension hpp to the extension h in Python

Create function that turns text into pig latin: a simple text transformation

Written by kazamraza no comments
Classified in : Python Tags : Python

Let's create a function that turns text into pig latin: a simple text transformation that modifies each word moving the first character to the end and appending "ay" to the end. For example, python ends up as ythonpay.

 

Question


def pig_latin(text):
  say = ""
  # Separate the text into words
  words = ___
  for word in words:
    # Create the pig latin word and add it to the list
    ___
    # Turn the list back into a phrase
  return ___
		
print(pig_latin("hello how are you")) # Should be "ellohay owhay reaay ouyay"
print(pig_latin("programming in python is fun")) # Should be "rogrammingpay niay ythonpay siay unfay"

Read more Create function that turns text into pig latin: a simple text transformation