Struggling with parsing a list. /u/tuxon64 Python Education

Struggling with parsing a list. /u/tuxon64 Python Education

I’m accessing a smart energy monitoring plug for monthly usage. The output I get is a single element list like this.

json_str is [‘”== Emeter ==\n== For year 2024 ==\nMonth, usage (kWh)\n11, 11.72\n12, 21.292\n”‘]

I just need to extract the number after nXX, where XX will be 01 through 12 for the different months. In this case I need the 11.72 and the 21.292, so I can add them and get my total usage.

submitted by /u/tuxon64
[link] [comments]

​r/learnpython I’m accessing a smart energy monitoring plug for monthly usage. The output I get is a single element list like this. json_str is [‘”== Emeter ==\n== For year 2024 ==\nMonth, usage (kWh)\n11, 11.72\n12, 21.292\n”‘] I just need to extract the number after nXX, where XX will be 01 through 12 for the different months. In this case I need the 11.72 and the 21.292, so I can add them and get my total usage. submitted by /u/tuxon64 [link] [comments] 

I’m accessing a smart energy monitoring plug for monthly usage. The output I get is a single element list like this.

json_str is [‘”== Emeter ==\n== For year 2024 ==\nMonth, usage (kWh)\n11, 11.72\n12, 21.292\n”‘]

I just need to extract the number after nXX, where XX will be 01 through 12 for the different months. In this case I need the 11.72 and the 21.292, so I can add them and get my total usage.

submitted by /u/tuxon64
[link] [comments]  I’m accessing a smart energy monitoring plug for monthly usage. The output I get is a single element list like this. json_str is [‘”== Emeter ==\n== For year 2024 ==\nMonth, usage (kWh)\n11, 11.72\n12, 21.292\n”‘] I just need to extract the number after nXX, where XX will be 01 through 12 for the different months. In this case I need the 11.72 and the 21.292, so I can add them and get my total usage. submitted by /u/tuxon64 [link] [comments]

Read more

I need help finding a python IDE /u/Own-Recipe5931 Python Education

I need help finding a python IDE /u/Own-Recipe5931 Python Education

I had been using replit for school

but now replit is limited so I’ve been having problems with the IDE

Please could you tell me a python IDE which dosen’t needs to be downloaded on the computer(because it’s banned) so i need a IDE which allows me to create loads of python files and save them which also runs online instead of having to download it

submitted by /u/Own-Recipe5931
[link] [comments]

​r/learnpython I had been using replit for school but now replit is limited so I’ve been having problems with the IDE Please could you tell me a python IDE which dosen’t needs to be downloaded on the computer(because it’s banned) so i need a IDE which allows me to create loads of python files and save them which also runs online instead of having to download it submitted by /u/Own-Recipe5931 [link] [comments] 

I had been using replit for school

but now replit is limited so I’ve been having problems with the IDE

Please could you tell me a python IDE which dosen’t needs to be downloaded on the computer(because it’s banned) so i need a IDE which allows me to create loads of python files and save them which also runs online instead of having to download it

submitted by /u/Own-Recipe5931
[link] [comments]  I had been using replit for school but now replit is limited so I’ve been having problems with the IDE Please could you tell me a python IDE which dosen’t needs to be downloaded on the computer(because it’s banned) so i need a IDE which allows me to create loads of python files and save them which also runs online instead of having to download it submitted by /u/Own-Recipe5931 [link] [comments]

Read more

I am trying to get a option to put in a answer in my code that gives a diffrent output based on which if else statement is true. Why wont it work? /u/Future_SFT_ENG Python Education

I am trying to get a option to put in a answer in my code that gives a diffrent output based on which if else statement is true. Why wont it work? /u/Future_SFT_ENG Python Education

I’m beginner in coding and was practicing by myself. below is the code i wrote.

 print("the result of the operation is", sum) input_answer=input ("give the correct answer to see if you are worthy: ") magic=1000000000 skill_level=0 sum= magic*skill_level print(sum) if sum< 1: print("you are not worthy") else: print("You are worthy") 

submitted by /u/Future_SFT_ENG
[link] [comments]

​r/learnpython I’m beginner in coding and was practicing by myself. below is the code i wrote. print(“the result of the operation is”, sum) input_answer=input (“give the correct answer to see if you are worthy: “) magic=1000000000 skill_level=0 sum= magic*skill_level print(sum) if sum< 1: print(“you are not worthy”) else: print(“You are worthy”) submitted by /u/Future_SFT_ENG [link] [comments] 

I’m beginner in coding and was practicing by myself. below is the code i wrote.

 print("the result of the operation is", sum) input_answer=input ("give the correct answer to see if you are worthy: ") magic=1000000000 skill_level=0 sum= magic*skill_level print(sum) if sum< 1: print("you are not worthy") else: print("You are worthy") 

submitted by /u/Future_SFT_ENG
[link] [comments]  I’m beginner in coding and was practicing by myself. below is the code i wrote. print(“the result of the operation is”, sum) input_answer=input (“give the correct answer to see if you are worthy: “) magic=1000000000 skill_level=0 sum= magic*skill_level print(sum) if sum< 1: print(“you are not worthy”) else: print(“You are worthy”) submitted by /u/Future_SFT_ENG [link] [comments]

Read more

User and Password Interface Pt. 2 /u/Take-The-L-Train Python Education

User and Password Interface Pt. 2 /u/Take-The-L-Train Python Education

This is a continuation of a post I made earlier. I think I have a better grasp of while loops and if/else statements, but there are still a few kinks in my code.

The code is:

  1. print(‘Welcome to the USG Ishimura.’) 2.
  2. user = input(‘Please enter your user ID: ‘)
  3. print(‘Welcome, ‘ , user) 5.
  4. while True:
  5. x = input(‘Please enter your passcode: ‘)
  6. if x == ‘987413’:
  7. if user == ‘Isaac Clarke’:
  8. print(‘Access granted.’)
  9. break
  10. else:
  11. print(‘Access denied. Please try again.’)
  12. if x == ‘987319’:
  13. if user == ‘Zachary Hammond’:
  14. print(‘Access granted.’)
  15. break
  16. else:
  17. print(‘Access denied. Please try again.’)
  18. if x == ‘987665’:
  19. if user == ‘Kendra Daniels’:
  20. print(‘Access granted.’)
  21. break
  22. else:
  23. print(‘Access denied. Please try again.’)

Everything’s working the way that I want it to, but when I put in Zachary Hammond or Kendra Daniels’ username and passcode, the terminal will print out ‘Access denied. Please try again.’ as well as ‘Access granted.’ Basically, both the if and the else statement are printing out at the same time. How can I correct this so only the if or the else statement will print out at once?

submitted by /u/Take-The-L-Train
[link] [comments]

​r/learnpython This is a continuation of a post I made earlier. I think I have a better grasp of while loops and if/else statements, but there are still a few kinks in my code. The code is: print(‘Welcome to the USG Ishimura.’) 2. user = input(‘Please enter your user ID: ‘) print(‘Welcome, ‘ , user) 5. while True: x = input(‘Please enter your passcode: ‘) if x == ‘987413’: if user == ‘Isaac Clarke’: print(‘Access granted.’) break else: print(‘Access denied. Please try again.’) if x == ‘987319’: if user == ‘Zachary Hammond’: print(‘Access granted.’) break else: print(‘Access denied. Please try again.’) if x == ‘987665’: if user == ‘Kendra Daniels’: print(‘Access granted.’) break else: print(‘Access denied. Please try again.’) Everything’s working the way that I want it to, but when I put in Zachary Hammond or Kendra Daniels’ username and passcode, the terminal will print out ‘Access denied. Please try again.’ as well as ‘Access granted.’ Basically, both the if and the else statement are printing out at the same time. How can I correct this so only the if or the else statement will print out at once? submitted by /u/Take-The-L-Train [link] [comments] 

This is a continuation of a post I made earlier. I think I have a better grasp of while loops and if/else statements, but there are still a few kinks in my code.

The code is:

  1. print(‘Welcome to the USG Ishimura.’) 2.
  2. user = input(‘Please enter your user ID: ‘)
  3. print(‘Welcome, ‘ , user) 5.
  4. while True:
  5. x = input(‘Please enter your passcode: ‘)
  6. if x == ‘987413’:
  7. if user == ‘Isaac Clarke’:
  8. print(‘Access granted.’)
  9. break
  10. else:
  11. print(‘Access denied. Please try again.’)
  12. if x == ‘987319’:
  13. if user == ‘Zachary Hammond’:
  14. print(‘Access granted.’)
  15. break
  16. else:
  17. print(‘Access denied. Please try again.’)
  18. if x == ‘987665’:
  19. if user == ‘Kendra Daniels’:
  20. print(‘Access granted.’)
  21. break
  22. else:
  23. print(‘Access denied. Please try again.’)

Everything’s working the way that I want it to, but when I put in Zachary Hammond or Kendra Daniels’ username and passcode, the terminal will print out ‘Access denied. Please try again.’ as well as ‘Access granted.’ Basically, both the if and the else statement are printing out at the same time. How can I correct this so only the if or the else statement will print out at once?

submitted by /u/Take-The-L-Train
[link] [comments]  This is a continuation of a post I made earlier. I think I have a better grasp of while loops and if/else statements, but there are still a few kinks in my code. The code is: print(‘Welcome to the USG Ishimura.’) 2. user = input(‘Please enter your user ID: ‘) print(‘Welcome, ‘ , user) 5. while True: x = input(‘Please enter your passcode: ‘) if x == ‘987413’: if user == ‘Isaac Clarke’: print(‘Access granted.’) break else: print(‘Access denied. Please try again.’) if x == ‘987319’: if user == ‘Zachary Hammond’: print(‘Access granted.’) break else: print(‘Access denied. Please try again.’) if x == ‘987665’: if user == ‘Kendra Daniels’: print(‘Access granted.’) break else: print(‘Access denied. Please try again.’) Everything’s working the way that I want it to, but when I put in Zachary Hammond or Kendra Daniels’ username and passcode, the terminal will print out ‘Access denied. Please try again.’ as well as ‘Access granted.’ Basically, both the if and the else statement are printing out at the same time. How can I correct this so only the if or the else statement will print out at once? submitted by /u/Take-The-L-Train [link] [comments]

Read more

Learning Python best way /u/Flimsy_Gur7966 Python Education

Learning Python best way /u/Flimsy_Gur7966 Python Education

Hi guys! Im in love with python and so far i take p4e and the python crash course from coursera, i want to expand my little knowledge way more, i saw in Udemy a couple of courses “100 days of code” “python for data science and machine learning” and “python bootcamp from zero to hero” all 3 for arounf 68$ dollars, im more of a guy that learns by typing and messing with the program, you guys think those 3 udemy programs would be good or should i invest somewhere else?

submitted by /u/Flimsy_Gur7966
[link] [comments]

​r/learnpython Hi guys! Im in love with python and so far i take p4e and the python crash course from coursera, i want to expand my little knowledge way more, i saw in Udemy a couple of courses “100 days of code” “python for data science and machine learning” and “python bootcamp from zero to hero” all 3 for arounf 68$ dollars, im more of a guy that learns by typing and messing with the program, you guys think those 3 udemy programs would be good or should i invest somewhere else? submitted by /u/Flimsy_Gur7966 [link] [comments] 

Hi guys! Im in love with python and so far i take p4e and the python crash course from coursera, i want to expand my little knowledge way more, i saw in Udemy a couple of courses “100 days of code” “python for data science and machine learning” and “python bootcamp from zero to hero” all 3 for arounf 68$ dollars, im more of a guy that learns by typing and messing with the program, you guys think those 3 udemy programs would be good or should i invest somewhere else?

submitted by /u/Flimsy_Gur7966
[link] [comments]  Hi guys! Im in love with python and so far i take p4e and the python crash course from coursera, i want to expand my little knowledge way more, i saw in Udemy a couple of courses “100 days of code” “python for data science and machine learning” and “python bootcamp from zero to hero” all 3 for arounf 68$ dollars, im more of a guy that learns by typing and messing with the program, you guys think those 3 udemy programs would be good or should i invest somewhere else? submitted by /u/Flimsy_Gur7966 [link] [comments]

Read more

I have a Intro to Programming Python exam soon. /u/Regaliceratops_888 Python Education

I have a Intro to Programming Python exam soon. /u/Regaliceratops_888 Python Education

It will be a semester 1 exam and I’m stressing pretty hard on it, although it will be open note. Any good study guides or resources online to help me prepare?

Are these Quizlet sets useful resources? https://quizlet.com/188060105/intro-to-python-final-exam-flash-cards/

https://quizlet.com/398381641/introduction-to-programming-final-exam-review-python-flash-cards/

submitted by /u/Regaliceratops_888
[link] [comments]

​r/learnpython It will be a semester 1 exam and I’m stressing pretty hard on it, although it will be open note. Any good study guides or resources online to help me prepare? Are these Quizlet sets useful resources? https://quizlet.com/188060105/intro-to-python-final-exam-flash-cards/ https://quizlet.com/398381641/introduction-to-programming-final-exam-review-python-flash-cards/ submitted by /u/Regaliceratops_888 [link] [comments] 

It will be a semester 1 exam and I’m stressing pretty hard on it, although it will be open note. Any good study guides or resources online to help me prepare?

Are these Quizlet sets useful resources? https://quizlet.com/188060105/intro-to-python-final-exam-flash-cards/

https://quizlet.com/398381641/introduction-to-programming-final-exam-review-python-flash-cards/

submitted by /u/Regaliceratops_888
[link] [comments]  It will be a semester 1 exam and I’m stressing pretty hard on it, although it will be open note. Any good study guides or resources online to help me prepare? Are these Quizlet sets useful resources? https://quizlet.com/188060105/intro-to-python-final-exam-flash-cards/ https://quizlet.com/398381641/introduction-to-programming-final-exam-review-python-flash-cards/ submitted by /u/Regaliceratops_888 [link] [comments]

Read more

why is my code for 21 game not working (the main problem is in try and except statement according to me) /u/Own-Recipe5931 Python Education

why is my code for 21 game not working (the main problem is in try and except statement according to me) /u/Own-Recipe5931 Python Education

import random startup = random.randint(1,3) print("My number is ", startup) check = startup + 3 nexnum = int(input("Enter your number n- ")) def check_round(): while nexnum > check: print("Your number is too highn Please try again") nexnum = int(input("-")) while nexnum or startup >= 21: try: nexnum = int (nexnum) check_round() except: print("Please enter a whole number") nexnum = int(input("-")) continue func1 = nexnum + 3 func2 = nexnum - 1 startup = random.randint(func2, func1) nexnum = int(input("Enter your next numbern-")) continue 

submitted by /u/Own-Recipe5931
[link] [comments]

​r/learnpython import random startup = random.randint(1,3) print(“My number is “, startup) check = startup + 3 nexnum = int(input(“Enter your number n- “)) def check_round(): while nexnum > check: print(“Your number is too highn Please try again”) nexnum = int(input(“-“)) while nexnum or startup >= 21: try: nexnum = int (nexnum) check_round() except: print(“Please enter a whole number”) nexnum = int(input(“-“)) continue func1 = nexnum + 3 func2 = nexnum – 1 startup = random.randint(func2, func1) nexnum = int(input(“Enter your next numbern-“)) continue submitted by /u/Own-Recipe5931 [link] [comments] 

import random startup = random.randint(1,3) print("My number is ", startup) check = startup + 3 nexnum = int(input("Enter your number n- ")) def check_round(): while nexnum > check: print("Your number is too highn Please try again") nexnum = int(input("-")) while nexnum or startup >= 21: try: nexnum = int (nexnum) check_round() except: print("Please enter a whole number") nexnum = int(input("-")) continue func1 = nexnum + 3 func2 = nexnum - 1 startup = random.randint(func2, func1) nexnum = int(input("Enter your next numbern-")) continue 

submitted by /u/Own-Recipe5931
[link] [comments]  import random startup = random.randint(1,3) print(“My number is “, startup) check = startup + 3 nexnum = int(input(“Enter your number n- “)) def check_round(): while nexnum > check: print(“Your number is too highn Please try again”) nexnum = int(input(“-“)) while nexnum or startup >= 21: try: nexnum = int (nexnum) check_round() except: print(“Please enter a whole number”) nexnum = int(input(“-“)) continue func1 = nexnum + 3 func2 = nexnum – 1 startup = random.randint(func2, func1) nexnum = int(input(“Enter your next numbern-“)) continue submitted by /u/Own-Recipe5931 [link] [comments]

Read more

Who here uses the following tech stack: FastAPI, HTMX, TailwindCSS, and Sqlite. /u/WynActTroph Python Education

Who here uses the following tech stack: FastAPI, HTMX, TailwindCSS, and Sqlite. /u/WynActTroph Python Education

How is your project doing performance wise? Is this tech stack suitable for a production ready micro saas product? Where did you deploy your project? What was the biggest hurdles you face when developing?

submitted by /u/WynActTroph
[link] [comments]

​r/learnpython How is your project doing performance wise? Is this tech stack suitable for a production ready micro saas product? Where did you deploy your project? What was the biggest hurdles you face when developing? submitted by /u/WynActTroph [link] [comments] 

How is your project doing performance wise? Is this tech stack suitable for a production ready micro saas product? Where did you deploy your project? What was the biggest hurdles you face when developing?

submitted by /u/WynActTroph
[link] [comments]  How is your project doing performance wise? Is this tech stack suitable for a production ready micro saas product? Where did you deploy your project? What was the biggest hurdles you face when developing? submitted by /u/WynActTroph [link] [comments]

Read more