Main Blog Directory

Something Cool

Given that add, a function that expects two int parameters and returns their sum, and given that two variables , euro_sales and asia_sales, have already been defined.

Given that add, a function that expects two int parameters and returns their sum, and given that two variables , euro_sales and asia_sales, have already been defined.

LANGUAGE:  PYTHON CHALLENGE: Given that add, a function that expects two int parameters and returns their sum, and given that two variables , euro_sales and asia_sales, have already been defined. Write a statement that calls add to compute the sum of euro_sales and asia_sales and that associates this value with a variable named eurasia_sales.

Read More

Given print_larger, a function that expects two parameters and returns no value and given two variables, sales1 and sales2, that have already been defined, write a statement that calls print_larger, passing it sales1 and sales2.

Given print_larger, a function that expects two parameters and returns no value and given two variables, sales1 and sales2, that have already been defined, write a statement that calls print_larger, passing it sales1 and sales2.

LANGUAGE:  PYTHON CHALLENGE: Given print_larger, a function that expects two parameters and returns no value and given two variables, sales1 and sales2, that have already been defined, write a statement that calls print_larger, passing it sales1 and sales2.

Read More

You are designing an algorithm that ranks website pages by relevance according to the number of times they are viewed by users.

You are designing an algorithm that ranks website pages by relevance according to the number of times they are viewed by users.

LANGUAGE:  PYTHON CHALLENGE: You are designing an algorithm that ranks website pages by relevance according to the number of times they are viewed by users. Which data structure would be the most useful and efficient for you to use? A hash table because data would be efficiently searched and retrieved A stack because the website […]

Read More

Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k ‘s value is smaller than m ‘s.

Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k ‘s value is smaller than m ‘s.

LANGUAGE:  PYTHON CHALLENGE: Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k ‘s value is smaller than m ‘s. Write the code necessary to compute the number of perfect squares between k and m. (A perfect square is an integer like 9 , […]

Read More