1. Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were associated with "41" then the resulting int would be 41.2. Write an expression whose value is the last character in the str associated with s.3. Given variables first and last, each of which is associated with a str, representing a first and a last name, respectively. Write an expression whose value is a str that is a full name of the form "Last, First". So, if first were associated with "alan" and last with "turing", then your expression would be "Turing,Alan". (Note the capitalization! Note: no spaces!) And if first and last were "Florean" and "fortescue" respectively, then your expression’s value would be "Fortescue,Florean".

4. Write an expression whose value is the result of converting the int value associated with x to a str. So if 582 was the int associated with x you would be converting it to the str "582".

5. Write an expression whose value is the str consisting of all the characters (starting with the sixth) of the str associated with s.

Answers

Answer 1
Answer:

Answer:

The solution or expression for each part is given below:

  1. int(s)
  2. s[len(s)-1]
  3. last.capitalize()+','+first.capitalize()
  4. str(x)
  5. s[5:]

Explanation:

Following are attached the images that show how these expressions will be used. I hope they will make the concept clear.

All the images below are respective to the questions given.


Related Questions

Define the function isEven which returns True, if a given number is even and returns False, if the number is odd. Execute the statement isEven(43) and display the output.
As sensory input ________, our ability to detect changes in input or intensity ________.
The energy company in Program 1 now uses different rates for residential and business customers. Residential customers pay $0.12 per kWh for the first 500 kWh. After the first 500 kWh, the rate is $0.15 per kWh. Business customers pay $0.16 per kWh for the first 800 kWh. After the first 800 kWh, the rate is $0.20 per kWh. Write a program to calculate energy charge. You must write and use the following two functions. (a)A main function: Ask the user to enter number of kWh used and customer type (enter R for residential or B for business). Call the bill_calculator function and pass number of kWh used and customer type to it as arguments. You must use positional arguments to pass kWh used and customer type. (b)A bill_calculator function: This function has two parameters to receive number of kWh used and customer type. Calculate and display the energy charge.
Assistive Technologies: You have just purchased a new computer and, because of a visual impairment, you are having trouble reading the information on the screen. What are your next steps
If two light bulbs are wired in series and one bulb burns out the other bulb will

Define the role of websites in internet.also write the importance of internet in our daily life.

Answers

Answer:

       

      Role of websites in internet

  • Websites give the online way to the business,it helps the business to grow and reach the higher audience. There was a time,at which there is no apps only HTML/CSS websites are there so it is a building step for reaching the audience.
  • Time is a one of the major factors for growth in online sector, and websites provide a interface to use their resources and services at less time ,you don't have to go somewhere now you can order from anywhere and anytime. 24/7 hour services gives a boost to the websites.
  • Some of the Applications are Very big but you can access them in very less amount of internet. Apps never replace websites.
  • Most of the billionaires are the ones who builds there website like amazon, twitter etc. It is very important to have a website for the business        

        Importance of internet in our daily life

  • Internet provides various resources and services which we need at every time like booking a cab,hotel,flight,trains and tutoring services . It consist a vast variety of information which is required at every moment .
  • We really don't need any physical presence of someone to learn something , to understand or for asking it is enough up on internet. Things are changing as technology grows.
  • For leisure time, it provide social sites to enjoy and there are much good options to ask the question of any subject.      
  • It also give option to promote business , it helps to reach to higher audience, many companies give services to us as there business. Digital marketing is also up there to promote on social sites.

Jill needs to create a chart for technology club that shows what percentage of total students in the school play video games. Which chart or graph should she use? Bar graph Column chart Line graph Pie chart

Answers

Answer:

It's pie chart because it shows the percentage of multiple things.

Explanation:

And I did an exam aced it and got this question right.

Two-factor authentication can best be breached by the adversary using:________. a. social engineering attack b. using sniffers like Wireshark and capturing packets c. using rootkits and privilege escalation to get to the kernel processes d. using a virus and destroying the computer that stores authentication information.

Answers

Answer:

a. social engineering attack

Explanation:

Two-factor authentication requires that the user/owner of the account enter a second verification code alongside their password in order to access the account. This code is usually sent to a personal phone number or email address. Therefore in order to breach such a security measure the best options is a social engineering attack. These are attacks that are accomplished through human interactions, using psychological manipulation in order to trick the victim into making a mistake or giving away that private information such as the verification code or access to the private email.

A babysitter charges $2.50 an hour until 9:00 PM when the rate drops to$1.75 an hour (the children are in bed). Write a program that accepts astarting time and ending time in hours and minutes and calculates the totalbabysitting bill. You may assume that the starting and ending times are ina single 24-hour period. Partial hours should be appropriately prorated.

Answers

Answer:

print("enter starting time hours")

st_hours=int(input()) #starting time hours

print("minutes")

st_minutes=int(input()) #starting time minutes

print("enter ending time hours")

et_hours=int(input()) #ending time hours

print("minutes")

et_minutes=int(input()) #ending time minutes

cost=2.50

if (st_hours<21 and et_hours>21): #if starting time is less than 21 and ending time is greater than 21

a_hours=et_hours-21

a_minutes=et_minutes #taking time after 21 from ending time ending time-21

time_minutes=60-st_minutes #converting all the time into minutes

time_hours=21-(st_hours+1)

time_hours=time_hours*60

time=time_hours+time_minutes

cost=(cost/60)*time

time=(a_hours*60)+a_minutes

cost=cost+(1.75/60)*time

print("cost=$",cost)

elif(st_hours>=21): #if starting time is greater than 21

time_hours=et_hours-(st_hours+1)

time_minutes=(60-st_minutes)+et_minutes #converting time into minutes

time=(time_hours*60)+time_minutes

cost=(1.75/60)*(time)

print("cost=$",cost)

elif(et_hours<=21): #if ending time is less than 21

time_hours=et_hours-(st_hours+1)

time_minutes=(60-st_minutes)+et_minutes

time=(time_hours*60)+time_minutes

cost=(2.50/60)*time

print("cost=$",cost)

Explanation:

This is a conditional program, the conditions applied are if and else if.

The resultant output was gotten using this three steps:

(1) If starting time is less than 21 and ending time is greater than 21

Then I converted the time into minutes before 21

ex:- 8:30

21-9= 12*60= 720 + 30 = 750

Then I calculated the bill.

750 * (2.50 / 60)

Then I converted the time after 21 and then calculated the bill and printed it.

(2)If starting time is greater than 21

Converted time into minutes and multiplied it with (1.75 / 60) to get the bill.

(3) If ending time is less than 21

Converted time into minutes and multiplied it with (2.50 / 60) to get the bill.

Please check attachment for program code screenshot.

#Imagine you're writing a program to check if a person is #available at a certain time.

#

#To do this, you want to write a function called

#check_availability. check_availability will have two

#parameters: a list of instances of the Meeting class, and

#proposed_time, a particular date and time.

#

#check_availability should return True (meaning the person

#is available) if there are no instances of Meeting that

#conflict with the proposed_time. In other words, it should

#return False if proposed_time is between the start_time and

#end_time for any meeting in the list of meetings.

#

#The Meeting class is defined below. It has two attributes:

#start_time and end_time. start_time is an instance of the

#datetime class showing when the meeting starts, and

#end_time is an instance of the datetime class indicating

#when the meeting ends.

#

#Hint: Instances of the datetime have at least six

#attributes: year, month, day, hour, minute, and second.

#

#Hint 2: Comparison operators work with instances of the

#datetime class. time_1 < time_2 will be True if time_1 is

#earlier than time_2, and False otherwise.

#

#You should not assume that the list is sorted.

#Here is our definition of the Meeting class:

from datetime import datetime

class Meeting:

def __init__(self, start_time, end_time):

self.start_time = start_time

self.end_time = end_time

#Write your function here!



#Below are some lines of code that will test your function.

#You can change the value of the variable(s) to test your

#function with different inputs.

#

#If your function works correctly, this will originally

#print: True, then False

meetings = [Meeting(datetime(2018, 8, 1, 9, 0, 0), datetime(2018, 8, 1, 11, 0, 0)),

Meeting(datetime(2018, 8, 1, 15, 0, 0), datetime(2018, 8, 1, 16, 0, 0)),

Meeting(datetime(2018, 8, 2, 9, 0, 0), datetime(2018, 8, 2, 10, 0, 0))]

print(check_availability(meetings, datetime(2018, 8, 1, 12, 0, 0)))

print(check_availability(meetings, datetime(2018, 8, 1, 10, 0, 0)))

Answers

Answer:

i hope the program below will help you!

Explanation:

One author states that Web-based software is more likely to take advantage of social networking (Web 2.0) approaches such as wikis and blogs. If this is the case, can we expect more social networking capabilities in all future software? Aside from LinkedIn, how can social media be leveraged by CIT graduates?

Answers

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.