Answer:
x = input("Input a number ")
print(eval("x"))
print ("Type is:",type(x))
#Taking an float input
y = input("Input a number ")
print(eval("y"))
print ("Type is:",type(y))
#Taking an complex input
z = complex(input("Input a number "))
print(eval("z"))
print ("Type is:",type(z))
#Taking an List input
L_num = raw_input().split(",")
print(eval("L_num"))
print ("Type is:",type(L_num))
#Taking an tuple input.
T_num = raw_input().split(",")
print(eval("T_num"))
print ("Type is:",type(T_num))
Explanation:
Answer:
1. Get the number
2. Declare a variable to store the sum and set it to 0
3. Repeat the next two steps till the number is not 0
4. Get the rightmost digit of the number with help of remainder ‘%’ operator by dividing it with 10 and add it to sum.
5. Divide the number by 10 with help of ‘/’ operator
6. Print or return the sum
# include<iostream>
using namespace std;
/* Function to get sum of digits */
class gfg
{
public:
int getSum(float n)
{
float sum = 0 ;
while (n != 0)
{
sum = sum + n % 10;
n = n/10;
}
return sum;
}
};
//driver code
int main()
{
gfg g;
float n = 687;
cout<< g.getSum(n);
return 0;
}
Explanation:
Answer:
Yes
Explanation:
I will say Yes. There are very much limitless possible and future we can expect from social media and even more from social networking. Its capabilities from upcoming software in the future. Since the Internet is in its early days of growing and cloud computing being introduced there are way more possibilities in the future.
Social media can be duely applied by CIT (Computer Information Technologies) graduates. It can be used to improve them in their career and also will helps them connect professionally. Quora is one such platform which is not exactly like LinkedIn but pretty much serves the purpose.
Answer:
Program :
#include <stdio.h> //header file
char* isEven(int number) //function
{
if(number%2==0)
return "True";
else
return "False";
}
int main() //mainfunction
{
printf("%s",isEven(43)); //calling and display output.
return 0; //return statement.
}
Output:
Explanation:
Answer:
import java.util.Scanner;
public class num12 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the first String");
String word1 = in.nextLine();
System.out.println("Enter the second String");
String word2 = in.nextLine();
System.out.println("Enter the third String");
String word3 = in.nextLine();
//Remove all white spaces
String cword1 = word1.replace(" ","");
String cword2 = word2.replace(" ","");
String cword3 = word3.replace(" ","");
//Comparing the string by their lengths
if(cword1.length()>cword2.length()&&cword1.length()>cword3.length()){
System.out.println(word1+" Is the longest");
}
else if(cword2.length()>cword1.length()&&cword2.length()>cword3.length()){
System.out.println(word2+" Is the longest");
}
else{
System.out.println(cword3+" Is the longest");
}
}
}
Explanation:
Using Java Programming Language
Use the Scanner Class to obtain the String values from the user
Save them in different variables
Use the replace() method in java to remove white space from any of the string entered
Using if and else statements compare the lengths of the strings (word.length()) returns the length of the word.
Print out the word that is longest
NOTE I have compared three Strings, comparing two would have been more straigth forward
Information Technology Infrastructure Library(ITIL) is
Option D- All of the above
Explanation:
The process ITIL can be defined as a set of well-defined practices for the IT service management which takes concerns on aligning the IT services based on the requirements of the business.
This describes the tasks, procedures, checklists and processes that are specifically not for organization or technology but can be adapted by the business entity towards the delivering-value, strategy or handling a lower competency level.
ITIL process was developed around as a process model-based view of managing and controling the operations of the organization which is credited to W. Edwards Deming and his plan-do-chec-act (PDCA) cycle.
Answer:try redoing everything step by step and see if that solves it
Explanation: