Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# Case 1, Already Language selected is English.
# Customer has selected option C, Tech News in the Main Menu.
# tech news has two options. 1 Display latest news. 2 Tech Companies News.
import os
import sys
def techNews():
option3 = techNews
options = input("Please select 1 for Latest News\n2 for different Tech companies news\n")
if options == '1':
print "latestNews.py not avliable yet "
return()
elif options == '2':
TechCompaniesNews()
return()
def TechCompaniesNews():
print('Option1; Select company of your choice or search for a company. 1. Tesla, 2. Google, 3. Amazon, 4. Apple 5. '
'Microsoft OR option2 search for Company. ')
options = input("1.Please select a company\n 2.Search your required Company\n")
if input == 1:
options = input("please select Company for Tech News\n 1.Tesla\n 2.Google\n 3.Amazon\n 4.Apple\n 5.Microsoft\n")
if input == 1:
"teslaNews"
elif input == 2:
"googleNews"
elif input == 3:
"amazonNews"
elif input == 4:
"appleNews"
elif input == 5:
"microsoftNews"
elif input == 2:
input("Search your required company: ")
userchoice = input("")
userchoicewords = ["Tesla"]
googlechoice = ["google"]
amazonchoice = ["amazon"]
applechoice = ["apple"]
def teslaNews():
import random
tesladata = ['Tesla is most famous electric automobile company in the world. The company has lauched Model S Plaid in june this year.']
random_index = random.randrange(len(tesladata))
return ''.join(random.sample(tesladata, 1))
def googleNews():
import random
googledata = ['Google is most famous Internet related service provider company in the world. Company current value is more than $ 1.2 trillion']
random_index = random.randrange(len(googledata))
return ''.join(random.sample(googledata, 1))
def amazonNews():
import random
amazondata = ['Amazon is most famous e-commerce company in the world. Company also focuses on cloud computing, digital streaming and AI']
random_index = random.randrange(len(amazondata))
return ''.join(random.sample(amazondata, 1))
def appleNews():
import random
appledata = ['Apple is most famous technology company famous for in consumer electronics. It is largest IT company by revenue since Jan 2021.']
random_index = random.randrange(len(appledata))
return ''.join(random.sample(appledata, 1))
print(techNews())