What's your Favorite Programming Language?by CodeChum AdminflagAsk the user to select which programming language they like best1 - C,2 - C++,3 - Java,4 - C#,5 - Python Depending on their choice, print the message "You like {name_of_programming_language} best". Also, if they selected Python, ask them to input which type of development they usually doA - WebB - Data AnalyticsC - BackendPrint the name of the option they selected. Finally, if they selected Backend, ask them if they know any frameworks.If they inputted the character 'Y' or 'y', print "Wow, you're good!"Sample Output 1Choose the programming language you like best: 1You like C best
Question
What's your Favorite Programming Language?by CodeChum AdminflagAsk the user to select which programming language they like best1 - C,2 - C++,3 - Java,4 - C#,5 - Python Depending on their choice, print the message "You like {name_of_programming_language} best". Also, if they selected Python, ask them to input which type of development they usually doA - WebB - Data AnalyticsC - BackendPrint the name of the option they selected. Finally, if they selected Backend, ask them if they know any frameworks.If they inputted the character 'Y' or 'y', print "Wow, you're good!"Sample Output 1Choose the programming language you like best: 1You like C best
Solution
Sure, here's a Python code snippet that implements the described behavior:
print("Choose the programming language you like best:")
print("1 - C")
print("2 - C++")
print("3 - Java")
print("4 - C#")
print("5 - Python")
choice = int(input())
languages = {
1: "C",
2: "C++",
3: "Java",
4: "C#",
5: "Python"
}
print(f"You like {languages[choice]} best")
if choice == 5:
print("Which type of development do you usually do?")
print("A - Web")
print("B - Data Analytics")
print("C - Backend")
dev_type = input()
dev_types = {
"A": "Web",
"B": "Data Analytics",
"C": "Backend"
}
print(dev_types[dev_type])
if dev_type == "C":
print("Do you know any frameworks? (Y/N)")
knows_frameworks = input()
if knows_frameworks.lower() == 'y':
print("Wow, you're good!")
This code first asks the user to choose their favorite programming language and prints a message based on their choice. If they choose Python, it asks them what type of development they usually do and prints a message based on their choice. If they choose Backend, it asks them if they know any frameworks and prints a message if they answer 'Y' or 'y'.
Similar Questions
What's your Favorite Programming Language?by CodeChum AdminflagAsk the user to select which programming language they like best1 - C,2 - C++,3 - Java,4 - C#,5 - Python Depending on their choice, print the message "You like {name_of_programming_language} best". Also, if they selected Python, ask them to input which type of development they usually doA - WebB - Data AnalyticsC - BackendPrint the name of the option they selected. Finally, if they selected Backend, ask them if they know any frameworks.If they inputted the character 'Y' or 'y', print "Wow, you're good!"Sample Output 1Choose the programming language you like best: 1You like C best
What is the most popular programming language for web development today?
Which of the following is not a programming language? C Unix Java Python
Which of the following is not the commonly used programming language for Artificial Intelligence?ans.JavaLISPPROLOGPerl Previous Marked for Review Next
The programming language of the third generation learned by most students when most computers used MS DOS was ________. It continues as a secure programming language to use 3rd party code and offers a standard for coding that readily integrates with other programming languages.Multiple ChoiceLIONCEZBASIC
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.