Convert case of elements in a list of strings Python

Given a list of strings, write a Python program to convert case of all string from lowercase/uppercase to uppercase/lowercase. Input : [‘PrO’, ‘pROG’, ‘RAMmInG’] Output: [‘pro’, ‘prog’, ‘ramming’] Input : [‘fun’, ‘Foo’, ‘BaR’] Output: [‘FUN’, ‘FOO’, ‘BAR’] Method #1 : Convert Uppercase to Lowercase using map function out = map(lambda x:x.lower(), [ ‘PrO’, ‘pROG’, ‘RAMmInG’]) … Read more

Solid State Chemistry: Modern X-Ray Powder Techniques and their Applications

This set of Solid State Chemistry Multiple Choice Questions & Answers (MCQs) focuses on “Modern X-Ray Powder Techniques and their Applications”. MCQ based on Modern X-Ray Powder Techniques and their Applications: 1. A powder diffractometer is an___________ a) Electron density instrument b) Powder electron refraction instrument c) X-ray spectrum detector instrument d) Powder X-ray instrument. … Read more

Bouncing Ball animation in C++ with glfw

A glfw application with C++11: This is how our bouncing ball animation will look like, sorry if its too bright.   glfw has a C API but as a C++ application use this API in a simple inheritance-based little framework. glfw_app BASE CLASS class glfw_app { public: glfw_app(const std::string& window_title, int window_width, int window_height); virtual … Read more

Java String Array Contains Example

[ad_1] /* Java String Array Contains Example This Java String Array Contains example shows how to find a String in String array in Java. */   import java.util.Arrays;   public class StringArrayContainsExample { public static void main(String args[]){ //String array String[] strMonths = new String[]{“January”, “February”, “March”, “April”, “May”}; //Strings to find String strFind1 = … Read more