Question

Would Anyone Know how to solve this and what I am doint wrong in the form...

Would Anyone Know how to solve this and what I am doint wrong in the form of python code
'''
Write a program that uses a loop to print the uppercase alphabet with the correct ASCII number next to each letter. (e.g. one line might be A 65).
'''
c = 65
while (c <= 90):
    print ( chr( c ) + str ( c) )
    c = c + 1

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program:

c = 65
while (c <= 90):
print (chr( c ) +" "+ str ( c)); #Here we adding Space between character and ASCII Value
c = c + 1


Output:

56789012345678901234567890 ,A B C D E F G HIJ K L M N 0 P QRSTUVWXYZ

Add a comment
Know the answer?
Add Answer to:
Would Anyone Know how to solve this and what I am doint wrong in the form...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What is wrong with my python code. I am receiving this error: Traceback (most recent call...

    What is wrong with my python code. I am receiving this error: Traceback (most recent call last): File "C:/Users/owner/Documents/numberfive.py", line 7, in if age > 18: TypeError: unorderable types: str() > int() My code is age= input("Enter your age:") if age > 18: print("You can vote.") else: print("You can't vote.") if age > 64: print ("You're a Senior Citizen...you deserve two votes") endofprogram = input("Please hit enter to exit from this program:")

  • Help with program /* Lab 7, Part E: Created by Celine Latulipe public class Lab7Parte {...

    Help with program /* Lab 7, Part E: Created by Celine Latulipe public class Lab7Parte { public static void main(String [] args) // TODO: put your code here to generate a random number between 0 and 20 // and then print out that many asterisks on a single line. { بہا } We were unable to transcribe this image/* Lab 7, Part F: Created by Celine Latulipe public class Lab 7PartF { public static void main(String [] args) { //...

  • Can someone provide detailed comments on what this code is doing for each line? I posted...

    Can someone provide detailed comments on what this code is doing for each line? I posted the assignment below. I am having trouble learning and getting assistance because I keep getting answers provided w/ good information on how the problem was solved. I have spent too much on tutoring this month and I am relying heavily on assistance here. Can you please assist with helping me understand each line of code that was written here? Also- is there an easier...

  • Python Problem Hello i am trying to finish this code it does not save guesses or...

    Python Problem Hello i am trying to finish this code it does not save guesses or count wrong guesses. When printing hman it needs to only show _ and letters together. For example if the word is amazing and guess=a it must print a_a_ _ _ _ not a_ _ _ _ and _a_ _ _ separately or with spaces. The guess has a maximum of 8 wrong guesses so for every wrong guess the game must count it if...

  • does anyone know how to solve this ? i put both -207.6 and also 322.3 as...

    does anyone know how to solve this ? i put both -207.6 and also 322.3 as the answer but it was marked wrong both times. QUESTION 1 Use the data given to calculate the value of AGºrxn for the reaction at 25 °C. 2 C(graphite) + H2(g) C2H2(g) C(graphite) H2(g) C2H2(g) 5.74 130.68 201.0 S" (J/mol · K) (kJ/mol) 0 0 -226.8 Report answer to four significant figures.

  • I dont know what I did wrong but I got 9/10. I need one more. Computer...

    I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in Industry home > 4.10: Program Automobile service invoice (Python 3) E zyBooks catalo 4.10 Program: Automobile service invoice (Python 3) (1) Output a menu of automotive services and the corresponding cost of each service.(2 pts) Ex: Davy's auto shop services oil change $35 Tire rotation $19 Car wash$7 Car wax $12 (2) Prompt the user for two services from the menu....

  • I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in...

    I dont know what I did wrong but I got 9/10. I need one more. Computer Sciencés Role in Industry home > 4.10: Program Automobile service invoice (Python 3) E zyBooks catalo 4.10 Program: Automobile service invoice (Python 3) (1) Output a menu of automotive services and the corresponding cost of each service.(2 pts) Ex: Davy's auto shop services oil change $35 Tire rotation $19 Car wash$7 Car wax $12 (2) Prompt the user for two services from the menu....

  • 6.15 Program 6: Using Arrays to Count Letters in Text 1. Introduction In this program, you...

    6.15 Program 6: Using Arrays to Count Letters in Text 1. Introduction In this program, you will practice working with arrays. Your program will read lines of text from the keyboard and use an array to track the number of times each letter occurs in the input text. You will use the contents of this array to generate a histogram (bar graph) indicating the relative frequencies of each letter entered. Test cases are available in this document. Remember, in addition...

  • Part b is wrong but I would like to know how to solve part b and...

    Part b is wrong but I would like to know how to solve part b and part c. 0 008314124 (2 pts) Calculate the reaction quotient Qe when B) PNH3 4.00 atm, PN2 0.02atm, PH2 1.00 atm c) (2 pts) Calculate ΔG for the reaction for the partial pressure in part (b) at a temperature of 1 1 1 1 K. (I pts) Based upon your answer to part (b) and part(c), the reactionat 1111 K. (Circle the correct answer.)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT