1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gekata [30.6K]
3 years ago
12

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 ass

ociated 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.

Computers and Technology
1 answer:
maksim [4K]3 years ago
7 0

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.

You might be interested in
If given the chance to own manage a business,what will be the name of the business?
Nady [450]
This is honestly an answer you can give. What would you name a business if you made one?
7 0
3 years ago
Read 2 more answers
What is an assembler?
Flauer [41]

an assembler is a program that converts code written in a high-level language to assembly language that the computer processor can execute.

4 0
3 years ago
What is 1-7? Plz help!!!
VARVARA [1.3K]
You want 10-12 too?.............

6 0
3 years ago
Display all the natural numbers from 1 to 100 that are exactly divisible by 3 and 7 using FOR … NEXT. Without using Mod
Tcecarenko [31]

Answer:

FOR i% = 1 TO 100

 IF ((i%\3) = i%/3) AND ((i%\7) = i%/7)  THEN

   PRINT i%

 END IF

NEXT i%

Explanation:

Of course using MOD would be cleaner, but another way to check if a number is integer divisable is to compare the outcome of an integer division to the outcome of a floating-point division. If they are equal, the division is an integer division.

The program outputs:

21

42

63

84

6 0
3 years ago
Which of the following statements are true about the Internet?
Arlecino [84]
1, 2, and 3 are true
6 0
3 years ago
Other questions:
  • Why can't you test a program for run-time errors when it has compile-time (syntax) errors
    6·1 answer
  • Why is a DNS cache poisoning attack dangerous? Check all that apply. A. Errrr...it's not actually dangerous. B. It allows an att
    12·1 answer
  • ____ indicates the number of pixels that a computer uses to display the letters, numbers, graphics, and background on a screen.
    12·2 answers
  • How to search for the largest files on my computer vista?
    5·1 answer
  • Assume that name and age have been declared suitably for storing names (like "abdullah", "alexandra" and "zoe") and ages respect
    14·1 answer
  • Dylan, an interior designer, has sketched out a layout for a client's living room. He wants the client's approval of the layout
    11·2 answers
  • Technology has proliferated in Kenya and Somaliland, with text messages used to replace cash, creating mobile money use that, on
    11·1 answer
  • An automated service that consolidates and distributes information from newsgroups, blogs, forums and news websites is called
    11·1 answer
  • Why has base 2 been accepted and used as the basis for computing?​
    8·1 answer
  • Arrange these steps of creating a presentation in the correct order. (notice that the given order is incorrect other than the ba
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!