1.7 Code Practice: Question 1
Write a program that uses two input statements to get two words as input. Then, print the words on one line separated by a space
Answers
Answered by
1
Explanation:
you can also use this statement to print:
System.out.format("%c %c", a,b);
Attachments:
Answered by
0
Below are the program for the above question :
Explanation:
first_word=input("Enter the first word: ")#it is used to take the input for the first word.
Second_word=input("Enter the second word: ")#It is used to take the input for the second word.
print(first_word+" "+Second_word) #print the first word and the second word with the space in between.
Output:
- If the user inputs as "Hello" for first word and "world" for the second word, then it will prints as "Hello world".
- If the user inputs as "Hello1" for first word and "world1" for the second word, then it will prints as "Hello1 world1".
Code Expalantion:
- The above code is in python language, in which the first and the second line is used to take the input from the user.
- The third line will print both words with the help of the print statement.
Learn More:
- Python: https://brainly.in/question/14689905
Similar questions
Math,
5 months ago
History,
5 months ago
Math,
5 months ago
English,
10 months ago
Physics,
10 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago